diff options
Diffstat (limited to 'drivers/pcmcia/cardbus.c')
-rw-r--r-- | drivers/pcmcia/cardbus.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index 4cd70d056810..5e9b636cbf71 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c | |||
@@ -27,8 +27,8 @@ | |||
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
30 | #include <linux/io.h> | ||
30 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
31 | #include <asm/io.h> | ||
32 | 32 | ||
33 | #include <pcmcia/cs_types.h> | 33 | #include <pcmcia/cs_types.h> |
34 | #include <pcmcia/ss.h> | 34 | #include <pcmcia/ss.h> |
@@ -58,7 +58,7 @@ | |||
58 | image number and an offset within that image. xlate_rom_addr() | 58 | image number and an offset within that image. xlate_rom_addr() |
59 | converts an image/offset address to an absolute offset from the | 59 | converts an image/offset address to an absolute offset from the |
60 | ROM's base address. | 60 | ROM's base address. |
61 | 61 | ||
62 | =====================================================================*/ | 62 | =====================================================================*/ |
63 | 63 | ||
64 | static u_int xlate_rom_addr(void __iomem *b, u_int addr) | 64 | static u_int xlate_rom_addr(void __iomem *b, u_int addr) |
@@ -85,10 +85,10 @@ static u_int xlate_rom_addr(void __iomem *b, u_int addr) | |||
85 | These are similar to setup_cis_mem and release_cis_mem for 16-bit | 85 | These are similar to setup_cis_mem and release_cis_mem for 16-bit |
86 | cards. The "result" that is used externally is the cb_cis_virt | 86 | cards. The "result" that is used externally is the cb_cis_virt |
87 | pointer in the struct pcmcia_socket structure. | 87 | pointer in the struct pcmcia_socket structure. |
88 | 88 | ||
89 | =====================================================================*/ | 89 | =====================================================================*/ |
90 | 90 | ||
91 | static void cb_release_cis_mem(struct pcmcia_socket * s) | 91 | static void cb_release_cis_mem(struct pcmcia_socket *s) |
92 | { | 92 | { |
93 | if (s->cb_cis_virt) { | 93 | if (s->cb_cis_virt) { |
94 | dev_dbg(&s->dev, "cb_release_cis_mem()\n"); | 94 | dev_dbg(&s->dev, "cb_release_cis_mem()\n"); |
@@ -98,7 +98,7 @@ static void cb_release_cis_mem(struct pcmcia_socket * s) | |||
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | static int cb_setup_cis_mem(struct pcmcia_socket * s, struct resource *res) | 101 | static int cb_setup_cis_mem(struct pcmcia_socket *s, struct resource *res) |
102 | { | 102 | { |
103 | unsigned int start, size; | 103 | unsigned int start, size; |
104 | 104 | ||
@@ -124,10 +124,11 @@ static int cb_setup_cis_mem(struct pcmcia_socket * s, struct resource *res) | |||
124 | 124 | ||
125 | This is used by the CIS processing code to read CIS information | 125 | This is used by the CIS processing code to read CIS information |
126 | from a CardBus device. | 126 | from a CardBus device. |
127 | 127 | ||
128 | =====================================================================*/ | 128 | =====================================================================*/ |
129 | 129 | ||
130 | int read_cb_mem(struct pcmcia_socket * s, int space, u_int addr, u_int len, void *ptr) | 130 | int read_cb_mem(struct pcmcia_socket *s, int space, u_int addr, u_int len, |
131 | void *ptr) | ||
131 | { | 132 | { |
132 | struct pci_dev *dev; | 133 | struct pci_dev *dev; |
133 | struct resource *res; | 134 | struct resource *res; |
@@ -181,7 +182,7 @@ fail: | |||
181 | cb_alloc() and cb_free() allocate and free the kernel data | 182 | cb_alloc() and cb_free() allocate and free the kernel data |
182 | structures for a Cardbus device, and handle the lowest level PCI | 183 | structures for a Cardbus device, and handle the lowest level PCI |
183 | device setup issues. | 184 | device setup issues. |
184 | 185 | ||
185 | =====================================================================*/ | 186 | =====================================================================*/ |
186 | 187 | ||
187 | /* | 188 | /* |
@@ -207,14 +208,14 @@ static void cardbus_assign_irqs(struct pci_bus *bus, int irq) | |||
207 | } | 208 | } |
208 | } | 209 | } |
209 | 210 | ||
210 | int __ref cb_alloc(struct pcmcia_socket * s) | 211 | int __ref cb_alloc(struct pcmcia_socket *s) |
211 | { | 212 | { |
212 | struct pci_bus *bus = s->cb_dev->subordinate; | 213 | struct pci_bus *bus = s->cb_dev->subordinate; |
213 | struct pci_dev *dev; | 214 | struct pci_dev *dev; |
214 | unsigned int max, pass; | 215 | unsigned int max, pass; |
215 | 216 | ||
216 | s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); | 217 | s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); |
217 | // pcibios_fixup_bus(bus); | 218 | /* pcibios_fixup_bus(bus); */ |
218 | 219 | ||
219 | max = bus->secondary; | 220 | max = bus->secondary; |
220 | for (pass = 0; pass < 2; pass++) | 221 | for (pass = 0; pass < 2; pass++) |
@@ -241,7 +242,7 @@ int __ref cb_alloc(struct pcmcia_socket * s) | |||
241 | return 0; | 242 | return 0; |
242 | } | 243 | } |
243 | 244 | ||
244 | void cb_free(struct pcmcia_socket * s) | 245 | void cb_free(struct pcmcia_socket *s) |
245 | { | 246 | { |
246 | struct pci_dev *bridge = s->cb_dev; | 247 | struct pci_dev *bridge = s->cb_dev; |
247 | 248 | ||