aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-19 02:04:29 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:49 -0500
commit0531c467da6438f278e9420a30f73eea2fdb73bd (patch)
tree5359c84ca3c691c05768696b30d8481da765dd17 /arch/blackfin
parent441504df6b81302c06010083c8d63b1465ead405 (diff)
Blackfin: bf537-stamp: move ADF7021 MAC storage into platform resources
Just generate a random MAC on the demo board since the ADF702x lacks dedicated storage for such things. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 26429702db58..f78861a617d9 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -22,6 +22,7 @@
22#endif 22#endif
23#include <linux/i2c.h> 23#include <linux/i2c.h>
24#include <linux/i2c/adp5588.h> 24#include <linux/i2c/adp5588.h>
25#include <linux/etherdevice.h>
25#include <linux/ata_platform.h> 26#include <linux/ata_platform.h>
26#include <linux/irq.h> 27#include <linux/irq.h>
27#include <linux/interrupt.h> 28#include <linux/interrupt.h>
@@ -816,6 +817,12 @@ static struct adf702x_platform_data adf7021_platform_data = {
816 .adf702x_regs = adf7021_regs, 817 .adf702x_regs = adf7021_regs,
817 .tx_reg = TXREG, 818 .tx_reg = TXREG,
818}; 819};
820static inline void adf702x_mac_init(void)
821{
822 random_ether_addr(adf7021_platform_data.mac_addr);
823}
824#else
825static inline void adf702x_mac_init(void) {}
819#endif 826#endif
820 827
821#if defined(CONFIG_MTD_DATAFLASH) \ 828#if defined(CONFIG_MTD_DATAFLASH) \
@@ -1967,6 +1974,7 @@ static int __init stamp_init(void)
1967{ 1974{
1968 printk(KERN_INFO "%s(): registering device resources\n", __func__); 1975 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1969 bfin_plat_nand_init(); 1976 bfin_plat_nand_init();
1977 adf702x_mac_init();
1970 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 1978 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
1971 i2c_register_board_info(0, bfin_i2c_board_info, 1979 i2c_register_board_info(0, bfin_i2c_board_info,
1972 ARRAY_SIZE(bfin_i2c_board_info)); 1980 ARRAY_SIZE(bfin_i2c_board_info));