1 Index: 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
6 #include <asm/mach/arch.h>
7 #include <asm/mach/flash.h>
8 #include <asm/mach/time.h>
11 static struct flash_platform_data nslu2_flash_data = {
12 .map_name = "cfi_probe",
14 .resource = nslu2_uart_resources,
17 +/* Built-in 10/100 Ethernet MAC interfaces */
18 +static struct eth_plat_info nslu2_plat_eth[] = {
26 +static struct platform_device nslu2_eth[] = {
28 + .name = "ixp4xx_eth",
29 + .id = IXP4XX_ETH_NPEB,
30 + .dev.platform_data = nslu2_plat_eth,
34 static struct platform_device *nslu2_devices[] __initdata = {
38 #ifdef CONFIG_LEDS_IXP4XX
44 static void nslu2_power_off(void)
47 static void __init nslu2_init(void)
54 nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
56 (void)platform_device_register(&nslu2_uart);
58 platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));
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.
66 + if ((f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x40000))) {
68 + for (i = 0; i < 6; i++) {
69 + nslu2_plat_eth[0].hwaddr[i] = readb(f + 0x3FFB0 + i);
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);
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]);
88 MACHINE_START(NSLU2, "Linksys NSLU2")