root/trunk/patches/2.6.22/63-avila-setup-mac.patch

Revision 917, 1.4 KB (checked in by gordon, 3 years ago)

Update IXP4XX network drivers to Krzysztof's latest version from git

  • 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  
    1919#include <linux/serial_8250.h> 
    2020#include <linux/slab.h> 
    2121#include <linux/i2c-gpio.h> 
     22#ifdef CONFIG_SENSORS_EEPROM 
     23#include <linux/i2c.h> 
     24#include <linux/eeprom.h> 
     25#endif 
    2226 
    2327#include <asm/types.h> 
    2428#include <asm/setup.h> 
     
    165169        &avila_eth[1], 
    166170}; 
    167171 
     172#ifdef CONFIG_SENSORS_EEPROM 
     173static 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 
     189static struct notifier_block avila_eeprom_notifier = { 
     190        .notifier_call = avila_eeprom_do 
     191}; 
     192#endif 
     193 
    168194static void __init avila_init(void) 
    169195{ 
    170196        ixp4xx_sys_init(); 
     
    186212 
    187213        platform_device_register(&avila_pata); 
    188214 
     215#ifdef CONFIG_SENSORS_EEPROM 
     216        register_eeprom_notifier(&avila_eeprom_notifier); 
     217#endif 
    189218} 
    190219 
    191220MACHINE_START(AVILA, "Gateworks Avila Network Platform") 
Note: See TracBrowser for help on using the browser.