summaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/patches/740-avila_loft_mac_platform.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-06 16:27:37 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-06 16:27:37 +0000
commit17c7b6c3fdc48301e50d22cc6138ede16bd1be24 (patch)
treea5d41b991a151e72663527a96fbc6c494565d65c /target/linux/ixp4xx/patches/740-avila_loft_mac_platform.patch
parent5389989abaa52926b22f9f030d1481df1e73d745 (diff)
strip the kernel version suffix from target directories, except for brcm-2.4 (the -2.4 will be included in the board name here). CONFIG_LINUX_<ver>_<board> becomes CONFIG_TARGET_<board>, same for profiles.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8653 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ixp4xx/patches/740-avila_loft_mac_platform.patch')
-rw-r--r--target/linux/ixp4xx/patches/740-avila_loft_mac_platform.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/patches/740-avila_loft_mac_platform.patch b/target/linux/ixp4xx/patches/740-avila_loft_mac_platform.patch
new file mode 100644
index 000000000..952a05506
--- /dev/null
+++ b/target/linux/ixp4xx/patches/740-avila_loft_mac_platform.patch
@@ -0,0 +1,50 @@
+Index: linux-2.6.19/arch/arm/mach-ixp4xx/avila-setup.c
+===================================================================
+--- linux-2.6.19.orig/arch/arm/mach-ixp4xx/avila-setup.c 2007-01-23 03:12:36.000000000 -0800
++++ linux-2.6.19/arch/arm/mach-ixp4xx/avila-setup.c 2007-01-23 03:12:47.000000000 -0800
+@@ -18,6 +18,10 @@
+ #include <linux/tty.h>
+ #include <linux/serial_8250.h>
+ #include <linux/slab.h>
++#ifdef CONFIG_SENSORS_EEPROM
++#include <linux/i2c.h>
++#include <linux/eeprom.h>
++#endif
+
+ #include <asm/types.h>
+ #include <asm/setup.h>
+@@ -198,9 +202,34 @@
+ &avila_npe_ucode,
+ };
+
++#ifdef CONFIG_SENSORS_EEPROM
++static int loft_eeprom_do(struct notifier_block *self, unsigned long event, void *t)
++{
++ struct eeprom_data *data = t;
++
++ char macs[12];
++
++ /* The MACs are the first 12 bytes in the eeprom at address 0x51 */
++ if (event == EEPROM_REGISTER && data->client.addr == 0x51) {
++ data->attr->read(&data->client.dev.kobj, macs, 0, 12);
++ memcpy(&plat_mac0.hwaddr, macs, 6);
++ memcpy(&plat_mac1.hwaddr, macs + 6, 6);
++ }
++
++ return NOTIFY_DONE;
++}
++
++static struct notifier_block loft_eeprom_notifier = {
++ .notifier_call = loft_eeprom_do
++};
++#endif
++
+ static void __init avila_init(void)
+ {
+ ixp4xx_sys_init();
++#ifdef CONFIG_SENSORS_EEPROM
++ register_eeprom_notifier(&loft_eeprom_notifier);
++#endif
+
+ avila_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
+ avila_flash_resource.end =