linux/arch/arm/mach-davinci
Rajashekhara, Sudhakar 810198bc9c ARM: davinci: da850 EVM: read mac address from SPI flash
DA850/OMAP-L138 EMAC driver uses random mac address instead of
a fixed one because the mac address is not stuffed into EMAC
platform data.

This patch provides a function which reads the mac address
stored in SPI flash (registered as MTD device) and populates the
EMAC platform data. The function which reads the mac address is
registered as a callback which gets called upon addition of MTD
device.

NOTE: In case the MAC address stored in SPI flash is erased, follow
the instructions at [1] to restore it.

[1] http://processors.wiki.ti.com/index.php/GSG:_OMAP-L138_DVEVM_Additional_Procedures#Restoring_MAC_address_on_SPI_Flash

Modifications in v2:
Guarded registering the mtd_notifier only when MTD is enabled.
Earlier this was handled using mtd_has_partitions() call, but
this has been removed in Linux v3.0.

Modifications in v3:
a. Guarded da850_evm_m25p80_notify_add() function and
   da850evm_spi_notifier structure with CONFIG_MTD macros.
b. Renamed da850_evm_register_mtd_user() function to
   da850_evm_setup_mac_addr() and removed the struct mtd_notifier
   argument to this function.
c. Passed the da850evm_spi_notifier structure to register_mtd_user()
   function.

Modifications in v4:
Moved the da850_evm_setup_mac_addr() function within the first
CONFIG_MTD ifdef construct.

Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Cc: stable@kernel.org
2011-09-07 14:23:01 +05:30
..
include/mach Merge branch 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-26 17:41:04 -07:00
aemif.c davinci: aemif: signedness bug in davinci_aemif_setup_timing() 2010-12-10 07:33:51 -08:00
board-da830-evm.c ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size 2011-07-18 15:29:58 -04:00
board-da850-evm.c ARM: davinci: da850 EVM: read mac address from SPI flash 2011-09-07 14:23:01 +05:30
board-dm355-evm.c ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size 2011-07-18 15:29:58 -04:00
board-dm355-leopard.c ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size 2011-07-18 15:29:58 -04:00
board-dm365-evm.c Merge branch 'devel-stable' into for-next 2011-07-22 23:09:07 +01:00
board-dm644x-evm.c ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size 2011-07-18 15:29:58 -04:00
board-dm646x-evm.c Merge branch 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-25 12:38:42 -07:00
board-mityomapl138.c Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-07-24 10:20:54 -07:00
board-neuros-osd2.c ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size 2011-07-18 15:29:58 -04:00
board-omapl138-hawk.c ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size 2011-07-18 15:29:58 -04:00
board-sffsdr.c ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size 2011-07-18 15:29:58 -04:00
board-tnetv107x-evm.c ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size 2011-07-18 15:29:58 -04:00
cdce949.c davinci: misc cleanups from sparse 2010-05-06 15:02:01 -07:00
clock.c Merge branch 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-26 17:41:04 -07:00
clock.h Merge branch 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-26 17:41:04 -07:00
common.c Davinci: aintc/cpintc - use ioremap() 2010-05-13 10:05:28 -07:00
cp_intc.c arm: Cleanup the irq namespace 2011-03-29 14:47:57 +02:00
cpufreq.c [CPUFREQ] use dynamic debug instead of custom infrastructure 2011-05-04 11:50:57 -04:00
cpuidle.c davinci: cpuidle: move mapping of DDR2 controller registers out of driver 2010-02-04 13:29:38 -08:00
da830.c davinci: macro rename DA8XX_LPSC0_DMAX to DA8XX_LPSC0_PRUSS. 2011-03-11 10:48:29 -08:00
da850.c davinci: da850: add support for SATA interface 2011-07-08 11:13:08 +05:30
devices-da8xx.c davinci: da850: add support for SATA interface 2011-07-08 11:13:08 +05:30
devices-tnetv107x.c davinci: add tnetv107x ssp platform device 2011-03-15 08:17:22 -07:00
devices.c davinci: make PCM platform devices static 2011-06-08 14:41:37 +05:30
dm355.c Revert wrong fixes for common misspellings 2011-04-26 23:31:11 -07:00
dm365.c davinci: spi: move event queue parameter to platform data 2011-02-28 14:53:29 -08:00
dm644x.c Revert wrong fixes for common misspellings 2011-04-26 23:31:11 -07:00
dm646x.c Merge branch 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-25 12:38:42 -07:00
dma.c arm: mach-davinci: check irq2ctlr() result 2010-09-24 07:40:25 -07:00
gpio-tnetv107x.c davinci: tnetv107x: fix register indexing for GPIOs numbers > 31 2011-02-28 14:53:19 -08:00
gpio.c arm: davinci: Fix low level gpio irq handlers' argument 2011-07-12 14:21:43 +05:30
io.c Davinci: iotable based ioremap() interception 2010-05-13 10:05:31 -07:00
irq.c Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-19 22:10:05 -07:00
Kconfig ARM: Davinci: Fix I2C build errors 2011-04-25 14:19:32 +05:30
Makefile davinci: Initial support for Omapl138-Hawkboard 2010-09-24 07:40:32 -07:00
Makefile.boot davinci: da8xx: Add base DA830/OMAP-L137 SoC support 2009-08-26 10:56:59 +03:00
mux.c Davinci: pinmux - use ioremap() 2010-05-13 10:05:29 -07:00
mux.h Davinci: eliminate pinmux offset verbosity 2010-05-06 15:02:09 -07:00
pm.c net: remove mm.h inclusion from netdevice.h 2011-06-21 19:17:20 -07:00
psc.c davinci: enable forced transitions on PSC 2011-07-08 11:10:09 +05:30
serial.c Davinci: serial - conditional reset via pwremu 2010-05-06 15:02:10 -07:00
sleep.S davinci: add power management support 2010-02-04 13:29:55 -08:00
sram.c DaVinci: remove unneeded #include's 2009-11-25 10:21:31 -08:00
time.c Merge branch 'devel-stable' into devel 2011-01-06 22:33:32 +00:00
tnetv107x.c davinci: add tnetv107x ssp platform device 2011-03-15 08:17:22 -07:00
usb.c DA8xx: assign name to MUSB IRQ resource 2010-12-11 12:15:53 +02:00