diff options
author | Krzysztof Hałasa <khc@pm.waw.pl> | 2009-03-13 12:57:04 -0400 |
---|---|---|
committer | Krzysztof Hałasa <khc@pm.waw.pl> | 2009-03-17 10:00:55 -0400 |
commit | 0a07232ff62d1523c5fa7292180890f4de670b95 (patch) | |
tree | 7b190acf8cf61b8ba5bdca7f94676f45f048be8c /arch/arm/mach-ixp4xx | |
parent | fec6c6fec3e20637bee5d276fb61dd8b49a3f9cc (diff) |
IXP4xx: workaround for PCI prefetch problems near 64 MB boundary.
Map unused registers at the end of DMA region at 64 MB to allow PCI masters
to cross the boundary when prefetching data from SDRAM.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r-- | arch/arm/mach-ixp4xx/common-pci.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index d816c51320c7..2d0f09e9819d 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 | ||
368 | void __init ixp4xx_pci_preinit(void) | 368 | void __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 |