root/trunk/patches/2.6.22/63-avila-setup-mac.patch
| Revision 917, 1.4 KB (checked in by gordon, 3 years ago) |
|---|
-
arch/arm/mach-ixp4xx/avila-setup.c
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c index 10ed5d6..c24db55 100644
a b 19 19 #include <linux/serial_8250.h> 20 20 #include <linux/slab.h> 21 21 #include <linux/i2c-gpio.h> 22 #ifdef CONFIG_SENSORS_EEPROM 23 #include <linux/i2c.h> 24 #include <linux/eeprom.h> 25 #endif 22 26 23 27 #include <asm/types.h> 24 28 #include <asm/setup.h> … … 165 169 &avila_eth[1], 166 170 }; 167 171 172 #ifdef CONFIG_SENSORS_EEPROM 173 static int avila_eeprom_do(struct notifier_block *self, unsigned long event, void *t) 174 { 175 struct eeprom_data *data = t; 176 177 char macs[12]; 178 179 /* The MACs are the first 12 bytes in the eeprom at address 0x51 */ 180 if (event == EEPROM_REGISTER && data->client.addr == 0x51) { 181 data->attr->read(&data->client.dev.kobj, macs, 0, 12); 182 memcpy(avila_plat_eth[0].hwaddr, macs, 6); 183 memcpy(avila_plat_eth[1].hwaddr, macs + 6, 6); 184 } 185 186 return NOTIFY_DONE; 187 } 188 189 static struct notifier_block avila_eeprom_notifier = { 190 .notifier_call = avila_eeprom_do 191 }; 192 #endif 193 168 194 static void __init avila_init(void) 169 195 { 170 196 ixp4xx_sys_init(); … … 186 212 187 213 platform_device_register(&avila_pata); 188 214 215 #ifdef CONFIG_SENSORS_EEPROM 216 register_eeprom_notifier(&avila_eeprom_notifier); 217 #endif 189 218 } 190 219 191 220 MACHINE_START(AVILA, "Gateworks Avila Network Platform")
Note: See TracBrowser
for help on using the browser.
