aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/common-pci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-28 17:03:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-28 17:03:14 -0400
commit0fe41b8982001cd14ee2c77cd776735a5024e98b (patch)
tree83e65d595c413d55259ea14fb97748ce5efe5707 /arch/arm/mach-ixp4xx/common-pci.c
parenteedf2c5296a8dfaaf9aec1a938c1d3bd73159a30 (diff)
parent9759d22c8348343b0da4e25d6150c41712686c14 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits) [ARM] 5435/1: fix compile warning in sanity_check_meminfo() [ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx [ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0 [ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins imxfb: Fix TFT mode i.MX21/27: remove ifdef CONFIG_FB_IMX imxfb: add clock support mxc: add arch_reset() function clkdev: add possibility to get a clock based on the device name i.MX1: remove fb support from mach-imx [ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined Gemini: Add support for Teltonika RUT100 Gemini: gpiolib based GPIO support v2 MAINTAINERS: add myself as Gemini architecture maintainer ARM: Add Gemini architecture v3 [ARM] OMAP: Fix compile for omap2_init_common_hw() MAINTAINERS: Add myself as Faraday ARM core variant maintainer ARM: Add support for FA526 v2 [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h [ARM] collie: fix two minor formatting nits ...
Diffstat (limited to 'arch/arm/mach-ixp4xx/common-pci.c')
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index d816c51320c7..70afcfe5b881 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -366,7 +366,7 @@ void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
366} 366}
367 367
368void __init ixp4xx_pci_preinit(void) 368void __init ixp4xx_pci_preinit(void)
369{ 369{
370 unsigned long cpuid = read_cpuid_id(); 370 unsigned long cpuid = read_cpuid_id();
371 371
372 /* 372 /*
@@ -386,17 +386,17 @@ void __init ixp4xx_pci_preinit(void)
386 386
387 pr_debug("setup PCI-AHB(inbound) and AHB-PCI(outbound) address mappings\n"); 387 pr_debug("setup PCI-AHB(inbound) and AHB-PCI(outbound) address mappings\n");
388 388
389 /* 389 /*
390 * We use identity AHB->PCI address translation 390 * We use identity AHB->PCI address translation
391 * in the 0x48000000 to 0x4bffffff address space 391 * in the 0x48000000 to 0x4bffffff address space
392 */ 392 */
393 *PCI_PCIMEMBASE = 0x48494A4B; 393 *PCI_PCIMEMBASE = 0x48494A4B;
394 394
395 /* 395 /*
396 * We also use identity PCI->AHB address translation 396 * We also use identity PCI->AHB address translation
397 * in 4 16MB BARs that begin at the physical memory start 397 * in 4 16MB BARs that begin at the physical memory start
398 */ 398 */
399 *PCI_AHBMEMBASE = (PHYS_OFFSET & 0xFF000000) + 399 *PCI_AHBMEMBASE = (PHYS_OFFSET & 0xFF000000) +
400 ((PHYS_OFFSET & 0xFF000000) >> 8) + 400 ((PHYS_OFFSET & 0xFF000000) >> 8) +
401 ((PHYS_OFFSET & 0xFF000000) >> 16) + 401 ((PHYS_OFFSET & 0xFF000000) >> 16) +
402 ((PHYS_OFFSET & 0xFF000000) >> 24) + 402 ((PHYS_OFFSET & 0xFF000000) >> 24) +
@@ -408,18 +408,19 @@ void __init ixp4xx_pci_preinit(void)
408 pr_debug("setup BARs in controller\n"); 408 pr_debug("setup BARs in controller\n");
409 409
410 /* 410 /*
411 * We configure the PCI inbound memory windows to be 411 * We configure the PCI inbound memory windows to be
412 * 1:1 mapped to SDRAM 412 * 1:1 mapped to SDRAM
413 */ 413 */
414 local_write_config(PCI_BASE_ADDRESS_0, 4, PHYS_OFFSET + 0x00000000); 414 local_write_config(PCI_BASE_ADDRESS_0, 4, PHYS_OFFSET);
415 local_write_config(PCI_BASE_ADDRESS_1, 4, PHYS_OFFSET + 0x01000000); 415 local_write_config(PCI_BASE_ADDRESS_1, 4, PHYS_OFFSET + SZ_16M);
416 local_write_config(PCI_BASE_ADDRESS_2, 4, PHYS_OFFSET + 0x02000000); 416 local_write_config(PCI_BASE_ADDRESS_2, 4, PHYS_OFFSET + SZ_32M);
417 local_write_config(PCI_BASE_ADDRESS_3, 4, PHYS_OFFSET + 0x03000000); 417 local_write_config(PCI_BASE_ADDRESS_3, 4, PHYS_OFFSET + SZ_48M);
418 418
419 /* 419 /*
420 * Enable CSR window at 0xff000000. 420 * Enable CSR window at 64 MiB to allow PCI masters
421 * to continue prefetching past 64 MiB boundary.
421 */ 422 */
422 local_write_config(PCI_BASE_ADDRESS_4, 4, 0xff000008); 423 local_write_config(PCI_BASE_ADDRESS_4, 4, PHYS_OFFSET + SZ_64M);
423 424
424 /* 425 /*
425 * Enable the IO window to be way up high, at 0xfffffc00 426 * Enable the IO window to be way up high, at 0xfffffc00
@@ -500,7 +501,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
500 return 1; 501 return 1;
501} 502}
502 503
503struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys) 504struct pci_bus * __devinit ixp4xx_scan_bus(int nr, struct pci_sys_data *sys)
504{ 505{
505 return pci_scan_bus(sys->busnr, &ixp4xx_ops, sys); 506 return pci_scan_bus(sys->busnr, &ixp4xx_ops, sys);
506} 507}