root/trunk/patches/2.6.22/61-nslu2-setup-mac.patch
| Revision 917, 1.4 KB (checked in by gordon, 3 years ago) |
|---|
-
arch/arm/mach-ixp4xx/nslu2-setup.c
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index e0d0dde..6e24916 100644
a b 19 19 #include <linux/serial_8250.h> 20 20 #include <linux/leds.h> 21 21 #include <linux/i2c-gpio.h> 22 #include <linux/mtd/mtd.h> 22 23 23 24 #include <asm/mach-types.h> 24 25 #include <asm/mach/arch.h> … … 167 168 &nslu2_eth[0], 168 169 }; 169 170 171 static void nslu2_flash_add(struct mtd_info *mtd) 172 { 173 if (strcmp(mtd->name, "RedBoot") == 0) { 174 size_t retlen; 175 u_char mac[6]; 176 177 if (mtd->read(mtd, 0x3FFB0, 6, &retlen, mac) == 0 && retlen == 6) { 178 printk(KERN_INFO "nslu2 mac: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", 179 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); 180 memcpy(nslu2_plat_eth[0].hwaddr, mac, 6); 181 } else { 182 printk(KERN_ERR "nslu2 mac: read failed\n"); 183 } 184 } 185 } 186 187 static void nslu2_flash_remove(struct mtd_info *mtd) { 188 } 189 190 static struct mtd_notifier nslu2_flash_notifier = { 191 .add = nslu2_flash_add, 192 .remove = nslu2_flash_remove, 193 }; 194 170 195 static void nslu2_power_off(void) 171 196 { 172 197 /* This causes the box to drop the power and go dead. */ … … 209 234 (void)platform_device_register(&nslu2_uart); 210 235 211 236 platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices)); 237 238 register_mtd_user(&nslu2_flash_notifier); 212 239 } 213 240 214 241 MACHINE_START(NSLU2, "Linksys NSLU2")
Note: See TracBrowser
for help on using the browser.
