1 Index: linux-2.6.19/arch/arm/mach-ixp4xx/avila-setup.c
2 ===================================================================
3 --- linux-2.6.19.orig/arch/arm/mach-ixp4xx/avila-setup.c 2007-01-23 03:12:36.000000000 -0800
4 +++ linux-2.6.19/arch/arm/mach-ixp4xx/avila-setup.c 2007-01-23 03:12:47.000000000 -0800
7 #include <linux/serial_8250.h>
8 #include <linux/slab.h>
9 +#ifdef CONFIG_SENSORS_EEPROM
10 +#include <linux/i2c.h>
11 +#include <linux/eeprom.h>
14 #include <asm/types.h>
15 #include <asm/setup.h>
20 +#ifdef CONFIG_SENSORS_EEPROM
21 +static int loft_eeprom_do(struct notifier_block *self, unsigned long event, void *t)
23 + struct eeprom_data *data = t;
27 + /* The MACs are the first 12 bytes in the eeprom at address 0x51 */
28 + if (event == EEPROM_REGISTER && data->client.addr == 0x51) {
29 + data->attr->read(&data->client.dev.kobj, macs, 0, 12);
30 + memcpy(&plat_mac0.hwaddr, macs, 6);
31 + memcpy(&plat_mac1.hwaddr, macs + 6, 6);
37 +static struct notifier_block loft_eeprom_notifier = {
38 + .notifier_call = loft_eeprom_do
42 static void __init avila_init(void)
45 +#ifdef CONFIG_SENSORS_EEPROM
46 + register_eeprom_notifier(&loft_eeprom_notifier);
49 avila_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
50 avila_flash_resource.end =