diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-21 08:48:33 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-21 08:48:33 +0100 |
commit | f70cac8d9c7125f83048f8b3d1c60f5a041a165c (patch) | |
tree | 0d0efd72c1a41f973a919b16aac1d8210ed1ee30 /arch/arm/mach-davinci/board-da850-evm.c | |
parent | 4722cd7741c6404f967f7a7b8b666540b6c1663e (diff) | |
parent | 08aab447c56a5388cf0c768da476ad022f00fef8 (diff) | |
download | op-kernel-dev-f70cac8d9c7125f83048f8b3d1c60f5a041a165c.zip op-kernel-dev-f70cac8d9c7125f83048f8b3d1c60f5a041a165c.tar.gz |
Merge branch 'kprobes-test' of git://git.yxit.co.uk/linux into devel-stable
Diffstat (limited to 'arch/arm/mach-davinci/board-da850-evm.c')
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 85a2c7e..6e41cb5 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -115,6 +115,32 @@ static struct spi_board_info da850evm_spi_info[] = { }, }; +#ifdef CONFIG_MTD +static void da850_evm_m25p80_notify_add(struct mtd_info *mtd) +{ + char *mac_addr = davinci_soc_info.emac_pdata->mac_addr; + size_t retlen; + + if (!strcmp(mtd->name, "MAC-Address")) { + mtd->read(mtd, 0, ETH_ALEN, &retlen, mac_addr); + if (retlen == ETH_ALEN) + pr_info("Read MAC addr from SPI Flash: %pM\n", + mac_addr); + } +} + +static struct mtd_notifier da850evm_spi_notifier = { + .add = da850_evm_m25p80_notify_add, +}; + +static void da850_evm_setup_mac_addr(void) +{ + register_mtd_user(&da850evm_spi_notifier); +} +#else +static void da850_evm_setup_mac_addr(void) { } +#endif + static struct mtd_partition da850_evm_norflash_partition[] = { { .name = "bootloaders + env", @@ -1244,6 +1270,8 @@ static __init void da850_evm_init(void) if (ret) pr_warning("da850_evm_init: sata registration failed: %d\n", ret); + + da850_evm_setup_mac_addr(); } #ifdef CONFIG_SERIAL_8250_CONSOLE |