summaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/patches-2.6.23/062-nas100d_setup_mac.patch
diff options
context:
space:
mode:
authorkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-12-28 21:00:01 +0000
committerkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-12-28 21:00:01 +0000
commit58f98ac38244ed93bb01dcf377937f1aec45202b (patch)
tree35b9cc8a3d433d2c1bb70fe82b947f404becf8c2 /target/linux/ixp4xx/patches-2.6.23/062-nas100d_setup_mac.patch
parentff57652cf6b0f7a2f7e6f99a3293fbac1d0b6c5d (diff)
* upgrade ixp4xx to 2.6.23.12
* upgrade to the new ethernet driver (temporary breaks Marvell switch support on Compex units) * handle NPE microcodes in a user friendly way - YAY for Intel for changing the license * add support for the Lanready AP1000 (used in for example the Ligowave LGO2AGN) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10016 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ixp4xx/patches-2.6.23/062-nas100d_setup_mac.patch')
-rw-r--r--target/linux/ixp4xx/patches-2.6.23/062-nas100d_setup_mac.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/patches-2.6.23/062-nas100d_setup_mac.patch b/target/linux/ixp4xx/patches-2.6.23/062-nas100d_setup_mac.patch
new file mode 100644
index 000000000..df40a6e96
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.23/062-nas100d_setup_mac.patch
@@ -0,0 +1,52 @@
+diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
+index d4d8540..b8c99fa 100644
+--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
++++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
+@@ -17,6 +17,7 @@
+ #include <linux/serial_8250.h>
+ #include <linux/leds.h>
+ #include <linux/i2c-gpio.h>
++#include <linux/mtd/mtd.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+@@ -151,6 +152,30 @@ static struct platform_device *nas100d_devices[] __initdata = {
+ &nas100d_eth[0],
+ };
+
++static void nas100d_flash_add(struct mtd_info *mtd)
++{
++ if (strcmp(mtd->name, "RedBoot config") == 0) {
++ size_t retlen;
++ u_char mac[6];
++
++ if (mtd->read(mtd, 0x0FD8, 6, &retlen, mac) == 0 && retlen == 6) {
++ printk(KERN_INFO "nas100d mac: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
++ mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
++ memcpy(nas100d_plat_eth[0].hwaddr, mac, 6);
++ } else {
++ printk(KERN_ERR "nas100d mac: read failed\n");
++ }
++ }
++}
++
++static void nas100d_flash_remove(struct mtd_info *mtd) {
++}
++
++static struct mtd_notifier nas100d_flash_notifier = {
++ .add = nas100d_flash_add,
++ .remove = nas100d_flash_remove,
++};
++
+ static void nas100d_power_off(void)
+ {
+ /* This causes the box to drop the power and go dead. */
+@@ -183,6 +208,8 @@ static void __init nas100d_init(void)
+ (void)platform_device_register(&nas100d_uart);
+
+ platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices));
++
++ register_mtd_user(&nas100d_flash_notifier);
+ }
+
+ MACHINE_START(NAS100D, "Iomega NAS 100d")