1 Index: linux-2.6.23.12/arch/arm/mach-ixp4xx/fsg-setup.c
2 ===================================================================
3 --- linux-2.6.23.12.orig/arch/arm/mach-ixp4xx/fsg-setup.c 2008-01-05 13:56:28.000000000 +1030
4 +++ linux-2.6.23.12/arch/arm/mach-ixp4xx/fsg-setup.c 2008-01-05 13:56:43.000000000 +1030
6 #include <asm/mach-types.h>
7 #include <asm/mach/arch.h>
8 #include <asm/mach/flash.h>
11 static struct flash_platform_data fsg_flash_data = {
12 .map_name = "cfi_probe",
15 static void __init fsg_init(void)
22 fsg_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
24 (void)platform_device_register(&fsg_uart);
26 platform_add_devices(fsg_devices, ARRAY_SIZE(fsg_devices));
30 + * Map in a portion of the flash and read the MAC addresses.
31 + * Since it is stored in BE in the flash itself, we need to
32 + * byteswap it if we're in LE mode.
34 + if ((f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x400000))) {
36 + for (i = 0; i < 6; i++) {
37 + fsg_plat_eth[0].hwaddr[i] = readb(f + 0x3C0422 + i);
38 + fsg_plat_eth[1].hwaddr[i] = readb(f + 0x3C043B + i);
41 + fsg_plat_eth[0].hwaddr[0] = readb(f + 0x3C0422 + 3);
42 + fsg_plat_eth[0].hwaddr[1] = readb(f + 0x3C0422 + 2);
43 + fsg_plat_eth[0].hwaddr[2] = readb(f + 0x3C0422 + 1);
44 + fsg_plat_eth[0].hwaddr[3] = readb(f + 0x3C0422 + 0);
45 + fsg_plat_eth[0].hwaddr[4] = readb(f + 0x3C0422 + 7);
46 + fsg_plat_eth[0].hwaddr[5] = readb(f + 0x3C0422 + 6);
48 + fsg_plat_eth[1].hwaddr[0] = readb(f + 0x3C0422 + 3);
49 + fsg_plat_eth[1].hwaddr[1] = readb(f + 0x3C0422 + 2);
50 + fsg_plat_eth[1].hwaddr[2] = readb(f + 0x3C0422 + 1);
51 + fsg_plat_eth[1].hwaddr[3] = readb(f + 0x3C0422 + 0);
52 + fsg_plat_eth[1].hwaddr[4] = readb(f + 0x3C0422 + 7);
53 + fsg_plat_eth[1].hwaddr[5] = readb(f + 0x3C0422 + 6);
57 + printk(KERN_INFO "FSG: Using MAC address %.2x:%.2x:%.2x:%.2x:%.2x:%.2x for port 0\n",
58 + fsg_plat_eth[0].hwaddr[0], fsg_plat_eth[0].hwaddr[1],
59 + fsg_plat_eth[0].hwaddr[2], fsg_plat_eth[0].hwaddr[3],
60 + fsg_plat_eth[0].hwaddr[4], fsg_plat_eth[0].hwaddr[5]);
61 + printk(KERN_INFO "FSG: Using MAC address %.2x:%.2x:%.2x:%.2x:%.2x:%.2x for port 1\n",
62 + fsg_plat_eth[1].hwaddr[0], fsg_plat_eth[1].hwaddr[1],
63 + fsg_plat_eth[1].hwaddr[2], fsg_plat_eth[1].hwaddr[3],
64 + fsg_plat_eth[1].hwaddr[4], fsg_plat_eth[1].hwaddr[5]);
68 MACHINE_START(FSG, "Freecom FSG-3")