1 diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
2 index e0d0dde..6e24916 100644
3 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c
4 +++ b/arch/arm/mach-ixp4xx/nslu2-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 @@ -167,6 +168,30 @@ static struct platform_device *nslu2_devices[] __initdata = {
17 +static void nslu2_flash_add(struct mtd_info *mtd)
19 + if (strcmp(mtd->name, "RedBoot") == 0) {
23 + if (mtd->read(mtd, 0x3FFB0, 6, &retlen, mac) == 0 && retlen == 6) {
24 + printk(KERN_INFO "nslu2 mac: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
25 + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
26 + memcpy(nslu2_plat_eth[0].hwaddr, mac, 6);
28 + printk(KERN_ERR "nslu2 mac: read failed\n");
33 +static void nslu2_flash_remove(struct mtd_info *mtd) {
36 +static struct mtd_notifier nslu2_flash_notifier = {
37 + .add = nslu2_flash_add,
38 + .remove = nslu2_flash_remove,
41 static void nslu2_power_off(void)
43 /* This causes the box to drop the power and go dead. */
44 @@ -209,6 +234,8 @@ static void __init nslu2_init(void)
45 (void)platform_device_register(&nslu2_uart);
47 platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));
49 + register_mtd_user(&nslu2_flash_notifier);
52 MACHINE_START(NSLU2, "Linksys NSLU2")