Revision 810198bc9c109489dfadc57131c5183ce6ad2d7d authored by Rajashekhara, Sudhakar on 12 July 2011, 10:28:53 UTC, committed by Sekhar Nori on 07 September 2011, 08:53:01 UTC
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
1 parent ddf2835
History
File Mode Size
caching
configfs
nfs
pohmelfs
00-INDEX -rw-r--r-- 3.8 KB
9p.txt -rw-r--r-- 5.6 KB
Locking -rw-r--r-- 21.7 KB
Makefile -rw-r--r-- 217 bytes
adfs.txt -rw-r--r-- 2.6 KB
affs.txt -rw-r--r-- 8.0 KB
afs.txt -rw-r--r-- 7.8 KB
autofs4-mount-control.txt -rw-r--r-- 17.3 KB
automount-support.txt -rw-r--r-- 4.6 KB
befs.txt -rw-r--r-- 3.5 KB
bfs.txt -rw-r--r-- 2.1 KB
btrfs.txt -rw-r--r-- 2.8 KB
ceph.txt -rw-r--r-- 5.2 KB
cifs.txt -rw-r--r-- 2.3 KB
coda.txt -rw-r--r-- 48.6 KB
cramfs.txt -rw-r--r-- 2.5 KB
debugfs.txt -rw-r--r-- 7.0 KB
devpts.txt -rw-r--r-- 5.0 KB
directory-locking -rw-r--r-- 5.0 KB
dlmfs.txt -rw-r--r-- 4.2 KB
dnotify.txt -rw-r--r-- 2.9 KB
dnotify_test.c -rw-r--r-- 772 bytes
ecryptfs.txt -rw-r--r-- 2.3 KB
exofs.txt -rw-r--r-- 8.5 KB
ext2.txt -rw-r--r-- 17.9 KB
ext3.txt -rw-r--r-- 8.1 KB
ext4.txt -rw-r--r-- 25.8 KB
fiemap.txt -rw-r--r-- 9.4 KB
files.txt -rw-r--r-- 4.1 KB
fuse.txt -rw-r--r-- 15.8 KB
gfs2-glocks.txt -rw-r--r-- 5.5 KB
gfs2-uevents.txt -rw-r--r-- 3.7 KB
gfs2.txt -rw-r--r-- 1.8 KB
hfs.txt -rw-r--r-- 2.9 KB
hfsplus.txt -rw-r--r-- 1.7 KB
hpfs.txt -rw-r--r-- 14.8 KB
inotify.txt -rw-r--r-- 10.7 KB
isofs.txt -rw-r--r-- 2.5 KB
jfs.txt -rw-r--r-- 1.8 KB
locks.txt -rw-r--r-- 2.7 KB
logfs.txt -rw-r--r-- 9.6 KB
mandatory-locking.txt -rw-r--r-- 8.0 KB
ncpfs.txt -rw-r--r-- 574 bytes
nilfs2.txt -rw-r--r-- 8.1 KB
ntfs.txt -rw-r--r-- 31.3 KB
ocfs2.txt -rw-r--r-- 4.3 KB
omfs.txt -rw-r--r-- 4.0 KB
path-lookup.txt -rw-r--r-- 18.4 KB
porting -rw-r--r-- 15.4 KB
proc.txt -rw-r--r-- 69.9 KB
quota.txt -rw-r--r-- 3.1 KB
ramfs-rootfs-initramfs.txt -rw-r--r-- 15.8 KB
relay.txt -rw-r--r-- 21.1 KB
romfs.txt -rw-r--r-- 8.3 KB
seq_file.txt -rw-r--r-- 12.0 KB
sharedsubtree.txt -rw-r--r-- 29.0 KB
spufs.txt -rw-r--r-- 20.3 KB
squashfs.txt -rw-r--r-- 10.4 KB
sysfs-pci.txt -rw-r--r-- 5.2 KB
sysfs-tagging.txt -rw-r--r-- 1.8 KB
sysfs.txt -rw-r--r-- 11.2 KB
sysv-fs.txt -rw-r--r-- 7.4 KB
tmpfs.txt -rw-r--r-- 6.5 KB
ubifs.txt -rw-r--r-- 5.1 KB
udf.txt -rw-r--r-- 3.4 KB
ufs.txt -rw-r--r-- 1.2 KB
vfat.txt -rw-r--r-- 13.3 KB
vfs.txt -rw-r--r-- 46.8 KB
xfs-delayed-logging-design.txt -rw-r--r-- 40.5 KB
xfs.txt -rw-r--r-- 10.2 KB
xip.txt -rw-r--r-- 3.0 KB

back to top