Changeset 10165


Ignore:
Timestamp:
2008-01-11T08:23:28+01:00 (10 years ago)
Author:
rwhitby
Message:

Combined the nslu2 net driver patches, based on new nslu2-linux patch

Location:
trunk/target/linux/ixp4xx/patches-2.6.23
Files:
1 deleted
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ixp4xx/patches-2.6.23/031-ixp4xx-net-drivers-nslu2.patch

    r10154 r10165  
    1 diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c 
    2 index 77277d2..e0d0dde 100644 
    3 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c 
    4 +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c 
    5 @@ -140,6 +140,23 @@ static struct platform_device nslu2_uart = { 
     1Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c 
     2=================================================================== 
     3--- linux-2.6.23.12-armeb.orig/arch/arm/mach-ixp4xx/nslu2-setup.c       2008-01-08 15:28:13.000000000 +1030 
     4+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c    2008-01-08 15:28:32.000000000 +1030 
     5@@ -24,6 +24,7 @@ 
     6 #include <asm/mach/arch.h> 
     7 #include <asm/mach/flash.h> 
     8 #include <asm/mach/time.h> 
     9+#include <asm/io.h> 
     10  
     11 static struct flash_platform_data nslu2_flash_data = { 
     12        .map_name               = "cfi_probe", 
     13@@ -140,6 +141,23 @@ 
    614        .resource               = nslu2_uart_resources, 
    715 }; 
     
    2735        &nslu2_i2c_gpio, 
    2836        &nslu2_flash, 
    29 @@ -147,6 +164,7 @@ static struct platform_device *nslu2_devices[] __initdata = { 
     37@@ -147,6 +165,7 @@ 
    3038 #ifdef CONFIG_LEDS_IXP4XX 
    3139        &nslu2_leds, 
     
    3543  
    3644 static void nslu2_power_off(void) 
     45@@ -175,6 +194,9 @@ 
     46  
     47 static void __init nslu2_init(void) 
     48 { 
     49+       uint8_t __iomem *f; 
     50+       int i; 
     51+ 
     52        ixp4xx_sys_init(); 
     53  
     54        nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); 
     55@@ -191,6 +213,33 @@ 
     56        (void)platform_device_register(&nslu2_uart); 
     57  
     58        platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices)); 
     59+ 
     60+ 
     61+       /* 
     62+        * Map in a portion of the flash and read the MAC address. 
     63+        * Since it is stored in BE in the flash itself, we need to 
     64+        * byteswap it if we're in LE mode. 
     65+        */ 
     66+       if ((f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x40000))) { 
     67+#ifdef __ARMEB__ 
     68+               for (i = 0; i < 6; i++) { 
     69+                       nslu2_plat_eth[0].hwaddr[i] = readb(f + 0x3FFB0 + i); 
     70+               } 
     71+#else 
     72+               nslu2_plat_eth[0].hwaddr[0] = readb(f + 0x3FFB0 + 3); 
     73+               nslu2_plat_eth[0].hwaddr[1] = readb(f + 0x3FFB0 + 2); 
     74+               nslu2_plat_eth[0].hwaddr[2] = readb(f + 0x3FFB0 + 1); 
     75+               nslu2_plat_eth[0].hwaddr[3] = readb(f + 0x3FFB0 + 0); 
     76+               nslu2_plat_eth[0].hwaddr[4] = readb(f + 0x3FFB0 + 7); 
     77+               nslu2_plat_eth[0].hwaddr[5] = readb(f + 0x3FFB0 + 6); 
     78+#endif 
     79+               iounmap(f); 
     80+       } 
     81+       printk(KERN_INFO "NSLU2: Using MAC address %.2x:%.2x:%.2x:%.2x:%.2x:%.2x for port 0\n", 
     82+              nslu2_plat_eth[0].hwaddr[0], nslu2_plat_eth[0].hwaddr[1], 
     83+              nslu2_plat_eth[0].hwaddr[2], nslu2_plat_eth[0].hwaddr[3], 
     84+              nslu2_plat_eth[0].hwaddr[4], nslu2_plat_eth[0].hwaddr[5]); 
     85+ 
     86 } 
     87  
     88 MACHINE_START(NSLU2, "Linksys NSLU2") 
Note: See TracChangeset for help on using the changeset viewer.