diff options
Diffstat (limited to 'arch/ia64/pci/pci.c')
-rw-r--r-- | arch/ia64/pci/pci.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 488e48a5deea..8fd7e825192b 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -43,8 +43,7 @@ | |||
43 | #define PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg) \ | 43 | #define PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg) \ |
44 | (((u64) seg << 28) | (bus << 20) | (devfn << 12) | (reg)) | 44 | (((u64) seg << 28) | (bus << 20) | (devfn << 12) | (reg)) |
45 | 45 | ||
46 | static int | 46 | int raw_pci_read(unsigned int seg, unsigned int bus, unsigned int devfn, |
47 | pci_sal_read (unsigned int seg, unsigned int bus, unsigned int devfn, | ||
48 | int reg, int len, u32 *value) | 47 | int reg, int len, u32 *value) |
49 | { | 48 | { |
50 | u64 addr, data = 0; | 49 | u64 addr, data = 0; |
@@ -68,8 +67,7 @@ pci_sal_read (unsigned int seg, unsigned int bus, unsigned int devfn, | |||
68 | return 0; | 67 | return 0; |
69 | } | 68 | } |
70 | 69 | ||
71 | static int | 70 | int raw_pci_write(unsigned int seg, unsigned int bus, unsigned int devfn, |
72 | pci_sal_write (unsigned int seg, unsigned int bus, unsigned int devfn, | ||
73 | int reg, int len, u32 value) | 71 | int reg, int len, u32 value) |
74 | { | 72 | { |
75 | u64 addr; | 73 | u64 addr; |
@@ -91,24 +89,17 @@ pci_sal_write (unsigned int seg, unsigned int bus, unsigned int devfn, | |||
91 | return 0; | 89 | return 0; |
92 | } | 90 | } |
93 | 91 | ||
94 | static struct pci_raw_ops pci_sal_ops = { | 92 | static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, |
95 | .read = pci_sal_read, | 93 | int size, u32 *value) |
96 | .write = pci_sal_write | ||
97 | }; | ||
98 | |||
99 | struct pci_raw_ops *raw_pci_ops = &pci_sal_ops; | ||
100 | |||
101 | static int | ||
102 | pci_read (struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) | ||
103 | { | 94 | { |
104 | return raw_pci_ops->read(pci_domain_nr(bus), bus->number, | 95 | return raw_pci_read(pci_domain_nr(bus), bus->number, |
105 | devfn, where, size, value); | 96 | devfn, where, size, value); |
106 | } | 97 | } |
107 | 98 | ||
108 | static int | 99 | static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, |
109 | pci_write (struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value) | 100 | int size, u32 value) |
110 | { | 101 | { |
111 | return raw_pci_ops->write(pci_domain_nr(bus), bus->number, | 102 | return raw_pci_write(pci_domain_nr(bus), bus->number, |
112 | devfn, where, size, value); | 103 | devfn, where, size, value); |
113 | } | 104 | } |
114 | 105 | ||