Add pci_devfn_t and use with __SIMPLE_DEVICE__
Declare the functions that may be used in both romstage and ramstage with simple device model. This will later allow to define PCI access functions for ramstage using the inlined functions from romstage. Change-Id: I32ff622883ceee4628e6b1b01023b970e379113f Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3508 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
@ -39,7 +39,7 @@
|
||||
void set_debug_port(unsigned int port)
|
||||
{
|
||||
u32 dword;
|
||||
device_t dev = PCI_DEV(0, CK804_DEVN_BASE + 2, 1); /* USB EHCI */
|
||||
pci_devfn_t dev = PCI_DEV(0, CK804_DEVN_BASE + 2, 1); /* USB EHCI */
|
||||
|
||||
/* Write the port number to 0x74[15:12]. */
|
||||
dword = pci_read_config32(dev, 0x74);
|
||||
@ -50,7 +50,7 @@ void set_debug_port(unsigned int port)
|
||||
|
||||
void enable_usbdebug(unsigned int port)
|
||||
{
|
||||
device_t dev = PCI_DEV(0, CK804_DEVN_BASE + 2, 1); /* USB EHCI */
|
||||
pci_devfn_t dev = PCI_DEV(0, CK804_DEVN_BASE + 2, 1); /* USB EHCI */
|
||||
|
||||
/* Mark the requested physical USB port (1-15) as the Debug Port. */
|
||||
set_debug_port(port);
|
||||
|
Reference in New Issue
Block a user