55 #define PCI_FIXUP_OPT_OVERRIDE_NAME (1<<0) 57 void FixupPCI(
const struct _int_map *,
int (*swizzler)(
int,
int) );
60 extern unsigned char pci_bus_count(
void);
62 int indirect_pci_read_config_byte(
65 unsigned char function,
70 int indirect_pci_read_config_word(
73 unsigned char function,
78 int indirect_pci_read_config_dword(
81 unsigned char function,
86 int indirect_pci_write_config_byte(
89 unsigned char function,
94 int indirect_pci_write_config_word(
97 unsigned char function,
102 int indirect_pci_write_config_dword(
105 unsigned char function,
106 unsigned char offset,
111 int FindPCIbridge(
int mybus,
struct pcibridge *pb );
115 void pci_out_le32( uint32_t base, uint32_t addr, uint32_t val);
116 void pci_out_32( uint32_t base, uint32_t addr, uint32_t val);
117 uint8_t pci_in_8 ( uint32_t base, uint32_t addr );
118 int16_t pci_in_le16 ( uint32_t base, uint32_t addr );
119 uint32_t pci_in_le32 ( uint32_t base, uint32_t addr );
120 int16_t pci_in_16 ( uint32_t base, uint32_t addr );
121 uint32_t pci_in_32 ( uint32_t base, uint32_t addr );
122 void pci_out_8 ( uint32_t base, uint32_t addr, uint8_t val );
123 void pci_out_le16( uint32_t base, uint32_t addr, uint16_t val );
124 void pci_out_16( uint32_t base, uint32_t addr, uint16_t val );
125 void pci_out_32 ( uint32_t base, uint32_t addr, uint32_t val);
127 #define out_32(_addr, _val) pci_out_32(BSP_PCI_BASE_ADDRESS, _addr, _val) 128 #define out_le32(_addr, _val) pci_out_le32(BSP_PCI_BASE_ADDRESS, _addr, _val) 129 #define out_32(_addr, _val) pci_out_32(BSP_PCI_BASE_ADDRESS, _addr, _val) 130 #define in_8(_addr) pci_in_8( BSP_PCI_BASE_ADDRESS, _addr ) 131 #define in_le16(_addr) pci_in_le16( BSP_PCI_BASE_ADDRESS, _addr ) 132 #define in_le32(_addr) pci_in_le32( BSP_PCI_BASE_ADDRESS, _addr ) 133 #define in_16(_addr) pci_in_16( BSP_PCI_BASE_ADDRESS, _addr ) 134 #define in_32(_addr) pci_in_32( BSP_PCI_BASE_ADDRESS, _addr ) 135 #define out_8(_addr,_val) pci_out_8( BSP_PCI_BASE_ADDRESS, _addr, _val ) 136 #define out_le16(_addr,_val) pci_out_le16( BSP_PCI_BASE_ADDRESS, _addr, _val ) 137 #define out_16(_addr,_val) pci_out_16( BSP_PCI_BASE_ADDRESS, _addr, _val )