Changeset 21879


Ignore:
Timestamp:
2010-06-22T16:10:55+02:00 (8 years ago)
Author:
acoul
Message:

ixp4xx: add Mikael Petterssons patch works for 2.6.33 & 2.6.35

Location:
trunk/target/linux/ixp4xx
Files:
6 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ixp4xx/patches-2.6.35/050-disable_dmabounce.patch

    r21797 r21879  
    11--- a/arch/arm/Kconfig 
    22+++ b/arch/arm/Kconfig 
    3 @@ -417,7 +417,6 @@ config ARCH_IXP4XX 
     3@@ -435,7 +435,6 @@ config ARCH_IXP4XX 
     4        select CPU_XSCALE 
    45        select GENERIC_GPIO 
    5         select GENERIC_TIME 
    66        select GENERIC_CLOCKEVENTS 
    77-       select DMABOUNCE if PCI 
     
    1111--- a/arch/arm/mach-ixp4xx/Kconfig 
    1212+++ b/arch/arm/mach-ixp4xx/Kconfig 
    13 @@ -199,6 +199,45 @@ config IXP4XX_INDIRECT_PCI 
     13@@ -199,6 +199,43 @@ config IXP4XX_INDIRECT_PCI 
    1414          need to use the indirect method instead. If you don't know 
    1515          what you need, leave this option unselected. 
    1616  
    1717+config IXP4XX_LEGACY_DMABOUNCE 
    18 +       bool "legacy PCI DMA bounce support" 
     18+       bool "Legacy PCI DMA bounce support" 
    1919+       depends on PCI 
    2020+       default n 
     
    2222+       help 
    2323+         The IXP4xx is limited to a 64MB window for PCI DMA, which 
    24 +         requires that PCI accesses above 64MB are bounced via buffers 
    25 +         below 64MB. Furthermore the IXP4xx has an erratum where PCI 
    26 +         read prefetches just below the 64MB limit can trigger lockups. 
     24+         requires that PCI accesses >= 64MB are bounced via buffers 
     25+         below 64MB. 
    2726+ 
    28 +         The kernel has traditionally handled these two issue by using 
    29 +         ARM specific DMA bounce support code for all accesses >= 64MB. 
     27+         The kernel has traditionally handled this issue by using ARM 
     28+         specific DMA bounce support code for all accesses >= 64MB. 
    3029+         That code causes problems of its own, so it is desirable to 
    31 +         disable it. As the kernel now has a workaround for the PCI read 
    32 +         prefetch erratum, it no longer requires the ARM bounce code. 
     30+         disable it. 
    3331+ 
    3432+         Enabling this option makes IXP4xx continue to use the problematic 
     
    5957--- a/arch/arm/mach-ixp4xx/common-pci.c 
    6058+++ b/arch/arm/mach-ixp4xx/common-pci.c 
    61 @@ -321,27 +321,38 @@ static int abort_handler(unsigned long a 
     59@@ -321,27 +321,33 @@ static int abort_handler(unsigned long a 
    6260  */ 
    6361 static int ixp4xx_pci_platform_notify(struct device *dev) 
     
    8987 int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) 
    9088 { 
    91 +       /* Note that this returns true for the last page below 64M due to 
    92 +        * IXP4xx erratum 15 (SCR 1289), which states that PCI prefetches 
    93 +        * can cross the boundary between valid memory and a reserved region 
    94 +        * causing AHB bus errors and a lock-up. 
    95 +        */ 
    96         return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M); 
     89-       return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M); 
     90+       return (dev->bus == &pci_bus_type ) && ((dma_addr + size) > SZ_64M); 
    9791 } 
    9892+#endif 
     
    10296  * Only first 64MB of memory can be accessed via PCI. 
    10397  * We use GFP_DMA to allocate safe buffers to do map/unmap. 
    104 @@ -364,6 +375,7 @@ void __init ixp4xx_adjust_zones(int node 
     98@@ -364,6 +370,7 @@ void __init ixp4xx_adjust_zones(int node 
    10599        zhole_size[1] = zhole_size[0]; 
    106100        zhole_size[0] = 0; 
Note: See TracChangeset for help on using the changeset viewer.