Changeset 21895


Ignore:
Timestamp:
2010-06-24T16:40:36+02:00 (6 years ago)
Author:
acoul
Message:

ixp4xx: add kernel 2.6.35 preliminary support

Location:
trunk/target/linux/ixp4xx
Files:
1 added
8 edited
7 copied

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ixp4xx/patches-2.6.35/020-gateworks_i2c_pld.patch

    r21891 r21895  
    392392--- a/drivers/gpio/Makefile 
    393393+++ b/drivers/gpio/Makefile 
    394 @@ -22,3 +22,4 @@ obj-$(CONFIG_GPIO_CS5535)     += cs5535-gpio 
    395  obj-$(CONFIG_GPIO_BT8XX)       += bt8xxgpio.o 
    396  obj-$(CONFIG_GPIO_VR41XX)      += vr41xx_giu.o 
    397  obj-$(CONFIG_GPIO_WM831X)      += wm831x-gpio.o 
     394@@ -31,3 +31,4 @@ obj-$(CONFIG_GPIO_WM8994)     += wm8994-gpio 
     395 obj-$(CONFIG_GPIO_SCH)         += sch_gpio.o 
     396 obj-$(CONFIG_GPIO_RDC321X)     += rdc321x-gpio.o 
     397 obj-$(CONFIG_GPIO_JANZ_TTL)    += janz-ttl.o 
    398398+obj-$(CONFIG_GPIO_GW_I2C_PLD)  += gw_i2c_pld.o 
    399399--- /dev/null 
  • trunk/target/linux/ixp4xx/patches-2.6.35/050-disable_dmabounce.patch

    r21891 r21895  
    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; 
     
    110104 void __init ixp4xx_pci_preinit(void) 
    111105 { 
    112 @@ -513,19 +525,35 @@ struct pci_bus * __devinit ixp4xx_scan_b 
    113  int 
    114  pci_set_dma_mask(struct pci_dev *dev, u64 mask) 
    115  { 
    116 -       if (mask >= SZ_64M - 1 ) 
    117 +#ifdef CONFIG_DMABOUNCE 
    118 +       if (mask >= SZ_64M - 1) 
    119                 return 0; 
    120   
    121         return -EIO; 
    122 +#else 
    123 +       /* Only honour masks < SZ_64M. Silently ignore masks >= SZ_64M 
    124 +          as generic drivers do not know about IXP4xx PCI DMA quirks. */ 
    125 +       if (mask < SZ_64M) 
    126 +               dev->dma_mask = mask; 
    127 +       return 0; 
    128 +#endif 
    129  } 
    130       
    131  int 
    132  pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) 
    133  { 
    134 -       if (mask >= SZ_64M - 1 ) 
    135 +#ifdef CONFIG_DMABOUNCE 
    136 +       if (mask >= SZ_64M - 1) 
    137                 return 0; 
    138   
    139         return -EIO; 
    140 +#else 
    141 +       /* Only honour masks < SZ_64M. Silently ignore masks >= SZ_64M 
    142 +          as generic drivers do not know about IXP4xx PCI DMA quirks. */ 
    143 +       if (mask < SZ_64M) 
    144 +               dev->dev.coherent_dma_mask = mask; 
    145 +       return 0; 
    146 +#endif 
    147  } 
    148   
    149  EXPORT_SYMBOL(ixp4xx_pci_read); 
    150106--- a/arch/arm/mach-ixp4xx/include/mach/memory.h 
    151107+++ b/arch/arm/mach-ixp4xx/include/mach/memory.h 
  • trunk/target/linux/ixp4xx/patches-2.6.35/090-increase_entropy_pools.patch

    r18283 r21895  
    1111+#define OUTPUT_POOL_WORDS 64 
    1212+#define SEC_XFER_SIZE 1024 
     13 #define EXTRACT_SIZE 10 
    1314  
    1415 /* 
    15   * The minimum number of bits of entropy before we wake up a read on 
  • trunk/target/linux/ixp4xx/patches-2.6.35/295-latch_led_driver.patch

    r21891 r21895  
    3030+ */ 
    3131+#include <linux/kernel.h> 
     32+#include <linux/slab.h> 
    3233+#include <linux/init.h> 
    3334+#include <linux/platform_device.h> 
  • trunk/target/linux/ixp4xx/patches-2.6.35/300-avila_fetch_mac.patch

    r21891 r21895  
    11--- a/arch/arm/mach-ixp4xx/avila-setup.c 
    22+++ b/arch/arm/mach-ixp4xx/avila-setup.c 
    3 @@ -14,10 +14,16 @@ 
     3@@ -14,9 +14,14 @@ 
    44 #include <linux/kernel.h> 
    55 #include <linux/init.h> 
     
    1111 #include <linux/tty.h> 
    1212 #include <linux/serial_8250.h> 
    13  #include <linux/slab.h> 
    1413+#include <linux/i2c.h> 
    1514+#include <linux/i2c/at24.h> 
    16 + 
    1715 #include <linux/i2c-gpio.h> 
    1816 #include <asm/types.h> 
    1917 #include <asm/setup.h> 
    20 @@ -31,6 +37,13 @@ 
     18@@ -30,6 +35,13 @@ 
    2119 #define AVILA_SDA_PIN  7 
    2220 #define AVILA_SCL_PIN  6 
     
    3230        .map_name       = "cfi_probe", 
    3331        .width          = 2, 
    34 @@ -134,16 +147,181 @@ static struct platform_device avila_pata 
     32@@ -133,16 +145,181 @@ static struct platform_device avila_pata 
    3533        .resource               = avila_pata_resources, 
    3634 }; 
     
    214212        avila_flash_resource.end = 
    215213                IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 
    216 @@ -161,7 +339,28 @@ static void __init avila_init(void) 
     214@@ -160,7 +337,28 @@ static void __init avila_init(void) 
    217215  
    218216        platform_device_register(&avila_pata); 
  • trunk/target/linux/ixp4xx/patches-2.6.35/301-avila_led.patch

    r21891 r21895  
    11--- a/arch/arm/mach-ixp4xx/avila-setup.c 
    22+++ b/arch/arm/mach-ixp4xx/avila-setup.c 
    3 @@ -24,6 +24,7 @@ 
     3@@ -22,6 +22,7 @@ 
     4 #include <linux/serial_8250.h> 
    45 #include <linux/i2c.h> 
    56 #include <linux/i2c/at24.h> 
    6   
    77+#include <linux/leds.h> 
    88 #include <linux/i2c-gpio.h> 
    99 #include <asm/types.h> 
    1010 #include <asm/setup.h> 
    11 @@ -172,6 +173,72 @@ static struct platform_device avila_npec 
     11@@ -170,6 +171,72 @@ static struct platform_device avila_npec 
    1212        .dev.platform_data      = &avila_npec_data, 
    1313 }; 
     
    8282        &avila_i2c_gpio, 
    8383        &avila_flash, 
    84 @@ -182,12 +249,16 @@ static void __init avila_gw23xx_setup(vo 
     84@@ -180,12 +247,16 @@ static void __init avila_gw23xx_setup(vo 
    8585 { 
    8686        platform_device_register(&avila_npeb_device); 
     
    9999  
    100100 static void __init avila_gw2345_setup(void) 
    101 @@ -198,22 +269,30 @@ static void __init avila_gw2345_setup(vo 
     101@@ -196,22 +267,30 @@ static void __init avila_gw2345_setup(vo 
    102102  
    103103        avila_npec_data.phy = 5; /* port 5 of the KS8995 switch */ 
     
    130130  
    131131 static void __init avila_gw2355_setup(void) 
    132 @@ -224,11 +303,29 @@ static void __init avila_gw2355_setup(vo 
     132@@ -222,11 +301,29 @@ static void __init avila_gw2355_setup(vo 
    133133  
    134134        avila_npec_data.phy = 16; 
  • trunk/target/linux/ixp4xx/patches-2.6.35/310-gtwx5717_spi_bus.patch

    r21891 r21895  
    11--- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c 
    22+++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c 
    3 @@ -28,6 +28,7 @@ 
     3@@ -27,6 +27,7 @@ 
     4 #include <linux/serial.h> 
    45 #include <linux/tty.h> 
    56 #include <linux/serial_8250.h> 
    6  #include <linux/slab.h> 
    77+#include <linux/spi/spi_gpio_old.h> 
    88 #include <asm/types.h> 
    99 #include <asm/setup.h> 
    1010 #include <asm/memory.h> 
    11 @@ -147,9 +148,41 @@ static struct platform_device gtwx5715_f 
     11@@ -146,9 +147,41 @@ static struct platform_device gtwx5715_f 
    1212        .resource       = &gtwx5715_flash_resource, 
    1313 }; 
  • trunk/target/linux/ixp4xx/patches-2.6.35/520-tw2662_support.patch

    r21892 r21895  
    119119--- /dev/null 
    120120+++ b/arch/arm/mach-ixp4xx/tw2662-setup.c 
    121 @@ -0,0 +1,208 @@ 
     121@@ -0,0 +1,212 @@ 
    122122+/* 
    123123+ * arch/arm/mach-ixp4xx/tw2662-setup.c 
     
    309309+ 
    310310+       platform_add_devices(tw2662_devices, ARRAY_SIZE(tw2662_devices)); 
    311 +       /* hack MACs as most of these boards have a broken eeprom */ 
    312 +       random_ether_addr(tw2662_plat_eth[0].hwaddr); 
    313 +       random_ether_addr(tw2662_plat_eth[1].hwaddr); 
     311+ 
     312+       if (!(is_valid_ether_addr(tw2662_plat_eth[0].hwaddr))) 
     313+               random_ether_addr(tw2662_plat_eth[0].hwaddr); 
     314+       if (!(is_valid_ether_addr(tw2662_plat_eth[1].hwaddr))) { 
     315+               memcpy(tw2662_plat_eth[1].hwaddr, tw2662_plat_eth[0].hwaddr, ETH_ALEN); 
     316+               tw2662_plat_eth[1].hwaddr[5] = (tw2662_plat_eth[0].hwaddr[5] + 1); 
     317+       } 
    314318+ 
    315319+} 
  • trunk/target/linux/ixp4xx/patches-2.6.35/600-skb_avoid_dmabounce.patch

    r21891 r21895  
    11--- a/net/core/skbuff.c 
    22+++ b/net/core/skbuff.c 
    3 @@ -264,6 +264,10 @@ struct sk_buff *__alloc_skb(unsigned int 
    4         if (!skb) 
     3@@ -183,6 +183,10 @@ struct sk_buff *__alloc_skb(unsigned int 
    54                goto out; 
     5        prefetchw(skb); 
    66  
    77+#ifdef CONFIG_ARCH_IXP4XX  
  • trunk/target/linux/ixp4xx/patches-2.6.35/601-arm-dma_free_coherent.patch

    r21894 r21895  
    11--- a/arch/arm/mm/dma-mapping.c 
    22+++ b/arch/arm/mm/dma-mapping.c 
    3 @@ -384,7 +384,8 @@ EXPORT_SYMBOL(dma_mmap_writecombine); 
     3@@ -381,7 +381,8 @@ EXPORT_SYMBOL(dma_mmap_writecombine); 
    44  */ 
    55 void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle) 
  • trunk/target/linux/ixp4xx/patches-2.6.35/603-arm-kluin-array-indexing.patch

    r21894 r21895  
    11--- a/arch/arm/kernel/setup.c 
    22+++ b/arch/arm/kernel/setup.c 
    3 @@ -322,12 +322,13 @@ static void __init setup_processor(void) 
     3@@ -323,12 +323,13 @@ static void __init setup_processor(void) 
    44 void cpu_init(void) 
    55 { 
     
    1616        /* 
    1717         * Define the placement constraint for the inline asm directive below. 
    18 @@ -386,13 +387,14 @@ static struct machine_desc * __init setu 
     18@@ -387,13 +388,14 @@ static struct machine_desc * __init setu 
    1919  
    2020 static int __init arm_add_memory(unsigned long start, unsigned long size) 
Note: See TracChangeset for help on using the changeset viewer.