1 Index: linux-2.6.20-rc5-git2/arch/arm/mach-ixp4xx/nas100d-setup.c
2 ===================================================================
3 --- linux-2.6.20-rc5-git2.orig/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-01-23 03:04:25.000000000 -0800
4 +++ linux-2.6.20-rc5-git2/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-01-23 03:04:31.000000000 -0800
6 #include <linux/serial.h>
7 #include <linux/serial_8250.h>
8 #include <linux/leds.h>
9 +#include <linux/mtd/mtd.h>
11 #include <asm/mach-types.h>
12 #include <asm/mach/arch.h>
17 +static void nas100d_flash_add(struct mtd_info *mtd)
19 + if (strcmp(mtd->name, "RedBoot config") == 0) {
23 + if (mtd->read(mtd, 0x0FD8, 6, &retlen, mac) == 0 && retlen == 6) {
24 + printk(KERN_INFO "nas100d mac: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
25 + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
26 + memcpy(plat_mac0.hwaddr, mac, 6);
28 + printk(KERN_ERR "nas100d mac: read failed\n");
33 +static void nas100d_flash_remove(struct mtd_info *mtd) {
36 +static struct mtd_notifier nas100d_flash_notifier = {
37 + .add = nas100d_flash_add,
38 + .remove = nas100d_flash_remove,
41 static void nas100d_power_off(void)
43 /* This causes the box to drop the power and go dead. */
45 (void)platform_device_register(&nas100d_uart);
47 platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices));
49 + register_mtd_user(&nas100d_flash_notifier);
52 MACHINE_START(NAS100D, "Iomega NAS 100d")