root/trunk/patches/2.6.22/62-nas100d-setup-mac.patch

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

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

  • arch/arm/mach-ixp4xx/nas100d-setup.c

    diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
    index d4d8540..b8c99fa 100644
    a b  
    1717#include <linux/serial_8250.h> 
    1818#include <linux/leds.h> 
    1919#include <linux/i2c-gpio.h> 
     20#include <linux/mtd/mtd.h> 
    2021 
    2122#include <asm/mach-types.h> 
    2223#include <asm/mach/arch.h> 
     
    151152        &nas100d_eth[0], 
    152153}; 
    153154 
     155static void nas100d_flash_add(struct mtd_info *mtd) 
     156{ 
     157        if (strcmp(mtd->name, "RedBoot config") == 0) { 
     158                size_t retlen; 
     159                u_char mac[6]; 
     160 
     161                if (mtd->read(mtd, 0x0FD8, 6, &retlen, mac) == 0 && retlen == 6) { 
     162                        printk(KERN_INFO "nas100d mac: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", 
     163                                mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); 
     164                        memcpy(nas100d_plat_eth[0].hwaddr, mac, 6); 
     165                } else { 
     166                        printk(KERN_ERR "nas100d mac: read failed\n"); 
     167                } 
     168        } 
     169} 
     170 
     171static void nas100d_flash_remove(struct mtd_info *mtd) { 
     172} 
     173 
     174static struct mtd_notifier nas100d_flash_notifier = { 
     175        .add = nas100d_flash_add, 
     176        .remove = nas100d_flash_remove, 
     177}; 
     178 
    154179static void nas100d_power_off(void) 
    155180{ 
    156181        /* This causes the box to drop the power and go dead. */ 
     
    183208        (void)platform_device_register(&nas100d_uart); 
    184209 
    185210        platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices)); 
     211 
     212        register_mtd_user(&nas100d_flash_notifier); 
    186213} 
    187214 
    188215MACHINE_START(NAS100D, "Iomega NAS 100d") 
Note: See TracBrowser for help on using the browser.