1 diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c
2 index ec3d517..7cc7201 100644
3 --- a/arch/arm/mach-ixp4xx/fsg-setup.c
4 +++ b/arch/arm/mach-ixp4xx/fsg-setup.c
6 #include <linux/serial_8250.h>
7 #include <linux/leds.h>
8 #include <linux/i2c-gpio.h>
9 +#include <linux/mtd/mtd.h>
11 #include <asm/mach-types.h>
12 #include <asm/mach/arch.h>
13 @@ -177,6 +178,34 @@ static struct platform_device *fsg_devices[] __initdata = {
17 +static void fsg_flash_add(struct mtd_info *mtd)
19 + if (strcmp(mtd->name, "RedBoot config") == 0) {
23 + if (mtd->read(mtd, 0x0422, 6, &retlen, mac) == 0 && retlen == 6) {
24 + printk(KERN_INFO "eth0 mac: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
25 + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
26 + memcpy(fsg_plat_eth[0].hwaddr, mac, 6);
28 + printk(KERN_INFO "eth1 mac: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
29 + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
30 + memcpy(fsg_plat_eth[1].hwaddr, mac, 6);
32 + printk(KERN_ERR "fsg mac: read failed\n");
37 +static void fsg_flash_remove(struct mtd_info *mtd) {
40 +static struct mtd_notifier fsg_flash_notifier = {
41 + .add = fsg_flash_add,
42 + .remove = fsg_flash_remove,
45 static void __init fsg_init(void)
48 @@ -198,6 +227,8 @@ static void __init fsg_init(void)
49 (void)platform_device_register(&fsg_uart);
51 platform_add_devices(fsg_devices, ARRAY_SIZE(fsg_devices));
53 + register_mtd_user(&fsg_flash_notifier);
56 MACHINE_START(FSG, "Freecom FSG-3")