8 #include <linux/kernel.h>
10 #include <linux/pci.h>
11 #include <linux/types.h>
16 # define DPRINTK(args...) printk(args);
18 # define DPRINTK(args...)
35 return ((bus->
number & 0xff) << 16) |
36 ((devfn & 0xff) << 8) |
49 mace->pci.config_addr = mkaddr(bus, devfn, reg);
52 *val =
mace->pci.config_data.b[(reg & 3) ^ 3];
55 *val =
mace->pci.config_data.w[((reg >> 1) & 1) ^ 1];
58 *val =
mace->pci.config_data.l;
68 if (bus->
number == 0 && reg == 0x40 && size == 4 &&
69 (devfn == (1 << 3) || devfn == (2 << 3)))
72 DPRINTK(
"read%d: reg=%08x,val=%02x\n", size * 8, reg, *val);
78 mace_pci_write_config(
struct pci_bus *bus,
unsigned int devfn,
79 int reg,
int size,
u32 val)
81 mace->pci.config_addr = mkaddr(bus, devfn, reg);
84 mace->pci.config_data.b[(reg & 3) ^ 3] = val;
87 mace->pci.config_data.w[((reg >> 1) & 1) ^ 1] =
val;
94 DPRINTK(
"write%d: reg=%08x,val=%02x\n", size * 8, reg, val);
100 .read = mace_pci_read_config,
101 .write = mace_pci_write_config,