aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/syslib
diff options
context:
space:
mode:
authorAl Viro <viro@www.linux.org.uk>2005-04-25 10:55:57 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-25 10:55:57 -0400
commit92a11f9e7cb876e6cf9080e4a1642142cb9221b2 (patch)
treebe7957195d3f013327b45add983e5106356286e0 /arch/ppc/syslib
parent9090e001f28de4bccae232f1b78e78fad5132ecb (diff)
[PATCH] ppc iomem annotations: ->io_base_virt
* ->io_base_virt in struct pci_controller is iomem pointer. Marked as such. Most of the places that used it are already annotated to expect iomem. * places that did gratitious (and wrong) casts a-la isa_io_base = (unsigned long)ioremap(...); hose->io_base_virt = (void *)isa_io_base; turned into hose->io_base_virt = ioremap(...); isa_io_base = (unsigned long)hose->io_base_virt; * pci_bus_io_base() annotated as returning iomem pointer. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/syslib')
-rw-r--r--arch/ppc/syslib/m8260_pci.c5
-rw-r--r--arch/ppc/syslib/mpc52xx_pci.c8
-rw-r--r--arch/ppc/syslib/ppc85xx_setup.c12
3 files changed, 10 insertions, 15 deletions
diff --git a/arch/ppc/syslib/m8260_pci.c b/arch/ppc/syslib/m8260_pci.c
index bd564fb35ab6..057cc3f8ff37 100644
--- a/arch/ppc/syslib/m8260_pci.c
+++ b/arch/ppc/syslib/m8260_pci.c
@@ -171,10 +171,9 @@ void __init m8260_find_bridges(void)
171 m8260_setup_pci(hose); 171 m8260_setup_pci(hose);
172 hose->pci_mem_offset = MPC826x_PCI_MEM_OFFSET; 172 hose->pci_mem_offset = MPC826x_PCI_MEM_OFFSET;
173 173
174 isa_io_base = 174 hose->io_base_virt = ioremap(MPC826x_PCI_IO_BASE,
175 (unsigned long) ioremap(MPC826x_PCI_IO_BASE,
176 MPC826x_PCI_IO_SIZE); 175 MPC826x_PCI_IO_SIZE);
177 hose->io_base_virt = (void *) isa_io_base; 176 isa_io_base = (unsigned long) hose->io_base_virt;
178 177
179 /* setup resources */ 178 /* setup resources */
180 pci_init_resource(&hose->mem_resources[0], 179 pci_init_resource(&hose->mem_resources[0],
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c
index c723efd954a6..59cf3e8bd1a0 100644
--- a/arch/ppc/syslib/mpc52xx_pci.c
+++ b/arch/ppc/syslib/mpc52xx_pci.c
@@ -205,13 +205,11 @@ mpc52xx_find_bridges(void)
205 205
206 hose->pci_mem_offset = MPC52xx_PCI_MEM_OFFSET; 206 hose->pci_mem_offset = MPC52xx_PCI_MEM_OFFSET;
207 207
208 isa_io_base = 208 hose->io_base_virt = ioremap(MPC52xx_PCI_IO_BASE, MPC52xx_PCI_IO_SIZE);
209 (unsigned long) ioremap(MPC52xx_PCI_IO_BASE, 209 isa_io_base = (unsigned long) hose->io_base_virt;
210 MPC52xx_PCI_IO_SIZE);
211 hose->io_base_virt = (void *) isa_io_base;
212 210
213 hose->cfg_addr = &pci_regs->car; 211 hose->cfg_addr = &pci_regs->car;
214 hose->cfg_data = (void __iomem *) isa_io_base; 212 hose->cfg_data = hose->io_base_virt;
215 213
216 /* Setup resources */ 214 /* Setup resources */
217 pci_init_resource(&hose->mem_resources[0], 215 pci_init_resource(&hose->mem_resources[0],
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c
index 81f1968c3269..152c3ef1312a 100644
--- a/arch/ppc/syslib/ppc85xx_setup.c
+++ b/arch/ppc/syslib/ppc85xx_setup.c
@@ -280,16 +280,14 @@ mpc85xx_setup_hose(void)
280 hose_a->io_space.end = MPC85XX_PCI1_UPPER_IO; 280 hose_a->io_space.end = MPC85XX_PCI1_UPPER_IO;
281 hose_a->io_base_phys = MPC85XX_PCI1_IO_BASE; 281 hose_a->io_base_phys = MPC85XX_PCI1_IO_BASE;
282#ifdef CONFIG_85xx_PCI2 282#ifdef CONFIG_85xx_PCI2
283 isa_io_base = 283 hose_a->io_base_virt = ioremap(MPC85XX_PCI1_IO_BASE,
284 (unsigned long) ioremap(MPC85XX_PCI1_IO_BASE,
285 MPC85XX_PCI1_IO_SIZE + 284 MPC85XX_PCI1_IO_SIZE +
286 MPC85XX_PCI2_IO_SIZE); 285 MPC85XX_PCI2_IO_SIZE);
287#else 286#else
288 isa_io_base = 287 hose_a->io_base_virt = ioremap(MPC85XX_PCI1_IO_BASE,
289 (unsigned long) ioremap(MPC85XX_PCI1_IO_BASE,
290 MPC85XX_PCI1_IO_SIZE); 288 MPC85XX_PCI1_IO_SIZE);
291#endif 289#endif
292 hose_a->io_base_virt = (void *) isa_io_base; 290 isa_io_base = (unsigned long)hose_a->io_base_virt;
293 291
294 /* setup resources */ 292 /* setup resources */
295 pci_init_resource(&hose_a->mem_resources[0], 293 pci_init_resource(&hose_a->mem_resources[0],
@@ -329,8 +327,8 @@ mpc85xx_setup_hose(void)
329 hose_b->io_space.start = MPC85XX_PCI2_LOWER_IO; 327 hose_b->io_space.start = MPC85XX_PCI2_LOWER_IO;
330 hose_b->io_space.end = MPC85XX_PCI2_UPPER_IO; 328 hose_b->io_space.end = MPC85XX_PCI2_UPPER_IO;
331 hose_b->io_base_phys = MPC85XX_PCI2_IO_BASE; 329 hose_b->io_base_phys = MPC85XX_PCI2_IO_BASE;
332 hose_b->io_base_virt = (void *) isa_io_base + MPC85XX_PCI1_IO_SIZE; 330 hose_b->io_base_virt = hose_a->io_base_virt + MPC85XX_PCI1_IO_SIZE;
333 331
334 /* setup resources */ 332 /* setup resources */
335 pci_init_resource(&hose_b->mem_resources[0], 333 pci_init_resource(&hose_b->mem_resources[0],
336 MPC85XX_PCI2_LOWER_MEM, 334 MPC85XX_PCI2_LOWER_MEM,