source: trunk/target/linux/ixp4xx/patches-2.6.35/050-disable_dmabounce.patch @ 21895

Last change on this file since 21895 was 21895, checked in by acoul, 6 years ago

ixp4xx: add kernel 2.6.35 preliminary support

File size: 3.4 KB
  • arch/arm/Kconfig

    a b config ARCH_IXP4XX 
    435435        select CPU_XSCALE 
    436436        select GENERIC_GPIO 
    437437        select GENERIC_CLOCKEVENTS 
    438         select DMABOUNCE if PCI 
    439438        help 
    440439          Support for Intel's IXP4XX (XScale) family of processors. 
    441440 
  • arch/arm/mach-ixp4xx/Kconfig

    a b config IXP4XX_INDIRECT_PCI 
    199199          need to use the indirect method instead. If you don't know 
    200200          what you need, leave this option unselected. 
    201201 
     202config IXP4XX_LEGACY_DMABOUNCE 
     203        bool "Legacy PCI DMA bounce support" 
     204        depends on PCI 
     205        default n 
     206        select DMABOUNCE 
     207        help 
     208          The IXP4xx is limited to a 64MB window for PCI DMA, which 
     209          requires that PCI accesses >= 64MB are bounced via buffers 
     210          below 64MB. 
     211 
     212          The kernel has traditionally handled this issue by using ARM 
     213          specific DMA bounce support code for all accesses >= 64MB. 
     214          That code causes problems of its own, so it is desirable to 
     215          disable it. 
     216 
     217          Enabling this option makes IXP4xx continue to use the problematic 
     218          ARM DMA bounce code. Disabling this option makes IXP4xx use the 
     219          kernel's generic bounce code. 
     220 
     221          Say 'N'. 
     222 
     223config IXP4XX_ZONE_DMA 
     224        bool "Support > 64MB RAM" 
     225        depends on !IXP4XX_LEGACY_DMABOUNCE 
     226        default y 
     227        select ZONE_DMA 
     228        help 
     229          The IXP4xx is limited to a 64MB window for PCI DMA, which 
     230          requires that PCI accesses above 64MB are bounced via buffers 
     231          below 64MB. 
     232 
     233          Disabling this option allows you to omit the support code for 
     234          DMA-able memory allocations and DMA bouncing, but the kernel 
     235          will then not work properly if more than 64MB of RAM is present. 
     236 
     237          Say 'Y' unless your platform is limited to <= 64MB of RAM. 
     238 
    202239config IXP4XX_QMGR 
    203240        tristate "IXP4xx Queue Manager support" 
    204241        help 
  • arch/arm/mach-ixp4xx/common-pci.c

    a b static int abort_handler(unsigned long a 
    321321 */ 
    322322static int ixp4xx_pci_platform_notify(struct device *dev) 
    323323{ 
    324         if(dev->bus == &pci_bus_type) { 
    325                 *dev->dma_mask =  SZ_64M - 1; 
     324        if (dev->bus == &pci_bus_type) { 
     325                *dev->dma_mask = SZ_64M - 1; 
    326326                dev->coherent_dma_mask = SZ_64M - 1; 
     327#ifdef CONFIG_DMABOUNCE 
    327328                dmabounce_register_dev(dev, 2048, 4096); 
     329#endif 
    328330        } 
    329331        return 0; 
    330332} 
    331333 
    332334static int ixp4xx_pci_platform_notify_remove(struct device *dev) 
    333335{ 
    334         if(dev->bus == &pci_bus_type) { 
     336#ifdef CONFIG_DMABOUNCE 
     337        if (dev->bus == &pci_bus_type) 
    335338                dmabounce_unregister_dev(dev); 
    336         } 
     339#endif 
    337340        return 0; 
    338341} 
    339342 
     343#ifdef CONFIG_DMABOUNCE 
    340344int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) 
    341345{ 
    342         return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M); 
     346        return (dev->bus == &pci_bus_type ) && ((dma_addr + size) > SZ_64M); 
    343347} 
     348#endif 
    344349 
     350#ifdef CONFIG_ZONE_DMA 
    345351/* 
    346352 * Only first 64MB of memory can be accessed via PCI. 
    347353 * We use GFP_DMA to allocate safe buffers to do map/unmap. 
    void __init ixp4xx_adjust_zones(int node 
    364370        zhole_size[1] = zhole_size[0]; 
    365371        zhole_size[0] = 0; 
    366372} 
     373#endif 
    367374 
    368375void __init ixp4xx_pci_preinit(void) 
    369376{ 
  • arch/arm/mach-ixp4xx/include/mach/memory.h

    a b  
    1616 
    1717#if !defined(__ASSEMBLY__) && defined(CONFIG_PCI) 
    1818 
     19#ifdef CONFIG_ZONE_DMA 
    1920void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes); 
    2021 
    2122#define arch_adjust_zones(node, size, holes) \ 
    2223        ixp4xx_adjust_zones(node, size, holes) 
     24#endif 
    2325 
    2426#define ISA_DMA_THRESHOLD (SZ_64M - 1) 
    2527#define MAX_DMA_ADDRESS         (PAGE_OFFSET + SZ_64M) 
Note: See TracBrowser for help on using the repository browser.