From 35162a6c380e0518c09ef048ba9b9dca2edc57f9 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Sun, 27 Jan 2008 17:39:54 +0000 Subject: [PATCH] Updated with comments from l-a-k. git-svn-id: svn+ssh://svn.nslu2-linux.org/svnroot/kernel/trunk@1009 b5a20c14-2c16-0410-a384-e21c7d08ac7b --- patches/2.6.25/ixp4xx-4771-ethernet-support.patch | 85 +++++++++++++---------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/patches/2.6.25/ixp4xx-4771-ethernet-support.patch b/patches/2.6.25/ixp4xx-4771-ethernet-support.patch index 426581c..7b87d2f 100644 --- a/patches/2.6.25/ixp4xx-4771-ethernet-support.patch +++ b/patches/2.6.25/ixp4xx-4771-ethernet-support.patch @@ -8,7 +8,7 @@ Enables the new ixp4xx qmgr and npe drivers in ixp4xx_defconfig. Sets up the corresponding platform data for the nslu2 and nas100d boards, and reads the ethernet MAC address from the internal flash. -Tested on both little-endian and bit-endian platforms. +Tested on both little-endian and big-endian kernels. Signed-off-by: Rod Whitby Signed-off-by: Michael Westerhof @@ -19,10 +19,10 @@ Tested-by: Tom King arch/arm/mach-ixp4xx/nslu2-setup.c | 50 ++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 2 deletions(-) -diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig -index 2d5ae33..45192ef 100644 ---- a/arch/arm/configs/ixp4xx_defconfig -+++ b/arch/arm/configs/ixp4xx_defconfig +Index: linux-2.6.24-armeb/arch/arm/configs/ixp4xx_defconfig +=================================================================== +--- linux-2.6.24-armeb.orig/arch/arm/configs/ixp4xx_defconfig 2008-01-27 22:09:53.000000000 +1030 ++++ linux-2.6.24-armeb/arch/arm/configs/ixp4xx_defconfig 2008-01-27 22:09:53.000000000 +1030 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit @@ -33,7 +33,7 @@ index 2d5ae33..45192ef 100644 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y -@@ -174,6 +174,8 @@ CONFIG_MACH_GTWX5715=y +@@ -174,6 +174,8 @@ # CONFIG_DMABOUNCE=y # CONFIG_IXP4XX_INDIRECT_PCI is not set @@ -42,7 +42,7 @@ index 2d5ae33..45192ef 100644 # # Boot options -@@ -832,6 +834,7 @@ CONFIG_DUMMY=y +@@ -832,6 +834,7 @@ # CONFIG_PHYLIB is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y @@ -50,7 +50,7 @@ index 2d5ae33..45192ef 100644 # CONFIG_AX88796 is not set # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set -@@ -925,6 +928,7 @@ CONFIG_HDLC_X25=m +@@ -925,6 +928,7 @@ # CONFIG_PC300TOO is not set # CONFIG_FARSYNC is not set # CONFIG_DSCC4 is not set @@ -58,11 +58,19 @@ index 2d5ae33..45192ef 100644 CONFIG_DLCI=m CONFIG_DLCI_MAX=8 CONFIG_WAN_ROUTER_DRIVERS=m -diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c -index ea334f3..36421b3 100644 ---- a/arch/arm/mach-ixp4xx/nas100d-setup.c -+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c -@@ -20,6 +20,7 @@ +Index: linux-2.6.24-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c +=================================================================== +--- linux-2.6.24-armeb.orig/arch/arm/mach-ixp4xx/nas100d-setup.c 2008-01-27 22:09:53.000000000 +1030 ++++ linux-2.6.24-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c 2008-01-28 03:57:37.000000000 +1030 +@@ -12,6 +12,7 @@ + * + */ + ++#include + #include + #include + #include +@@ -20,6 +21,7 @@ #include #include #include @@ -70,7 +78,7 @@ index ea334f3..36421b3 100644 static struct flash_platform_data nas100d_flash_data = { .map_name = "cfi_probe", -@@ -123,12 +124,30 @@ static struct platform_device nas100d_uart = { +@@ -123,12 +125,30 @@ .resource = nas100d_uart_resources, }; @@ -101,17 +109,18 @@ index ea334f3..36421b3 100644 }; static void nas100d_power_off(void) -@@ -144,6 +163,9 @@ static void nas100d_power_off(void) +@@ -144,6 +164,10 @@ static void __init nas100d_init(void) { ++ DECLARE_MAC_BUF(mac_buf); + uint8_t __iomem *f; + int i; + ixp4xx_sys_init(); /* gpio 14 and 15 are _not_ clocks */ -@@ -163,6 +185,33 @@ static void __init nas100d_init(void) +@@ -163,6 +187,30 @@ (void)platform_device_register(&nas100d_uart); platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices)); @@ -136,20 +145,25 @@ index ea334f3..36421b3 100644 +#endif + iounmap(f); + } -+ printk(KERN_INFO "NAS100D: Using MAC address " -+ "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x for port 0\n", -+ nas100d_plat_eth[0].hwaddr[0], nas100d_plat_eth[0].hwaddr[1], -+ nas100d_plat_eth[0].hwaddr[2], nas100d_plat_eth[0].hwaddr[3], -+ nas100d_plat_eth[0].hwaddr[4], nas100d_plat_eth[0].hwaddr[5]); ++ printk(KERN_INFO "NAS100D: Using MAC address %s for port 0\n", ++ print_mac(mac_buf, nas100d_plat_eth[0].hwaddr)); + } MACHINE_START(NAS100D, "Iomega NAS 100d") -diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c -index 9bf8ccb..b10e094 100644 ---- a/arch/arm/mach-ixp4xx/nslu2-setup.c -+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c -@@ -23,6 +23,7 @@ +Index: linux-2.6.24-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c +=================================================================== +--- linux-2.6.24-armeb.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2008-01-27 22:09:49.000000000 +1030 ++++ linux-2.6.24-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c 2008-01-28 03:57:25.000000000 +1030 +@@ -14,6 +14,7 @@ + * Changed to conform to new style __init ixdp425 kas11 10/22/04 + */ + ++#include + #include + #include + #include +@@ -23,6 +24,7 @@ #include #include #include @@ -157,7 +171,7 @@ index 9bf8ccb..b10e094 100644 static struct flash_platform_data nslu2_flash_data = { .map_name = "cfi_probe", -@@ -138,6 +139,23 @@ static struct platform_device nslu2_uart = { +@@ -138,6 +140,23 @@ .resource = nslu2_uart_resources, }; @@ -181,7 +195,7 @@ index 9bf8ccb..b10e094 100644 static struct platform_device *nslu2_devices[] __initdata = { &nslu2_i2c_controller, &nslu2_flash, -@@ -145,6 +163,7 @@ static struct platform_device *nslu2_devices[] __initdata = { +@@ -145,6 +164,7 @@ #ifdef CONFIG_LEDS_IXP4XX &nslu2_leds, #endif @@ -189,17 +203,18 @@ index 9bf8ccb..b10e094 100644 }; static void nslu2_power_off(void) -@@ -173,6 +192,9 @@ static struct sys_timer nslu2_timer = { +@@ -173,6 +193,10 @@ static void __init nslu2_init(void) { ++ DECLARE_MAC_BUF(mac_buf); + uint8_t __iomem *f; + int i; + ixp4xx_sys_init(); nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); -@@ -189,6 +211,34 @@ static void __init nslu2_init(void) +@@ -189,6 +213,31 @@ (void)platform_device_register(&nslu2_uart); platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices)); @@ -225,15 +240,9 @@ index 9bf8ccb..b10e094 100644 +#endif + iounmap(f); + } -+ printk(KERN_INFO "NSLU2: Using MAC address " -+ "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x for port 0\n", -+ nslu2_plat_eth[0].hwaddr[0], nslu2_plat_eth[0].hwaddr[1], -+ nslu2_plat_eth[0].hwaddr[2], nslu2_plat_eth[0].hwaddr[3], -+ nslu2_plat_eth[0].hwaddr[4], nslu2_plat_eth[0].hwaddr[5]); ++ printk(KERN_INFO "NSLU2: Using MAC address %s for port 0\n", ++ print_mac(mac_buf, nslu2_plat_eth[0].hwaddr)); + } MACHINE_START(NSLU2, "Linksys NSLU2") --- -1.5.2.5 - -- 2.11.4.GIT