root/trunk/patches/2.6.22/62-nas100d-setup-mac.patch
| Revision 917, 1.5 kB (checked in by gordon, 3 years ago) |
|---|
-
a/arch/arm/mach-ixp4xx/nas100d-setup.c
old new 17 17 #include <linux/serial_8250.h> 18 18 #include <linux/leds.h> 19 19 #include <linux/i2c-gpio.h> 20 #include <linux/mtd/mtd.h> 20 21 21 22 #include <asm/mach-types.h> 22 23 #include <asm/mach/arch.h> … … 151 152 &nas100d_eth[0], 152 153 }; 153 154 155 static void nas100d_flash_add(struct mtd_info *mtd) 156 { 157 if (strcmp(mtd->name, "RedBoot config") == 0) { 158 size_t retlen; 159 u_char mac[6]; 160 161 if (mtd->read(mtd, 0x0FD8, 6, &retlen, mac) == 0 && retlen == 6) { 162 printk(KERN_INFO "nas100d mac: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", 163 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); 164 memcpy(nas100d_plat_eth[0].hwaddr, mac, 6); 165 } else { 166 printk(KERN_ERR "nas100d mac: read failed\n"); 167 } 168 } 169 } 170 171 static void nas100d_flash_remove(struct mtd_info *mtd) { 172 } 173 174 static struct mtd_notifier nas100d_flash_notifier = { 175 .add = nas100d_flash_add, 176 .remove = nas100d_flash_remove, 177 }; 178 154 179 static void nas100d_power_off(void) 155 180 { 156 181 /* This causes the box to drop the power and go dead. */ … … 183 208 (void)platform_device_register(&nas100d_uart); 184 209 185 210 platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices)); 211 212 register_mtd_user(&nas100d_flash_notifier); 186 213 } 187 214 188 215 MACHINE_START(NAS100D, "Iomega NAS 100d")
Note: See TracBrowser for help on using the browser.
