27 #include <linux/pci.h>
28 #include <linux/types.h>
32 #define PCICONFDREG (void __iomem *)KSEG1ADDR(0x0f000c14)
33 #define PCICONFAREG (void __iomem *)KSEG1ADDR(0x0f000c18)
35 static inline int set_pci_configuration_address(
unsigned char number,
36 unsigned int devfn,
int where)
42 if (
PCI_SLOT(devfn) < 11 || where > 0xff)
61 static int pci_config_read(
struct pci_bus *
bus,
unsigned int devfn,
int where,
67 if (set_pci_configuration_address(bus->
number, devfn, where) < 0)
74 *val = (data >> ((where & 3) << 3)) & 0xffU;
77 *val = (data >> ((where & 2) << 3)) & 0xffffU;
89 static int pci_config_write(
struct pci_bus *bus,
unsigned int devfn,
int where,
95 if (set_pci_configuration_address(bus->
number, devfn, where) < 0)
102 shift = (where & 3) << 3;
103 data &= ~(0xff
U << shift);
104 data |= ((val & 0xff
U) << shift);
107 shift = (where & 2) << 3;
108 data &= ~(0xffff
U << shift);
109 data |= ((val & 0xffff
U) << shift);
124 .read = pci_config_read,
125 .write = pci_config_write,