aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 77022b588816..128b9329ef25 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -33,6 +33,7 @@
33#include <linux/i2c/twl.h> 33#include <linux/i2c/twl.h>
34 34
35#include <mach/hardware.h> 35#include <mach/hardware.h>
36#include <mach/id.h>
36#include <asm/mach-types.h> 37#include <asm/mach-types.h>
37#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
38#include <asm/mach/map.h> 39#include <asm/mach/map.h>
@@ -560,6 +561,9 @@ static struct platform_device omap_dm9000_dev = {
560 561
561static void __init omap_dm9000_init(void) 562static void __init omap_dm9000_init(void)
562{ 563{
564 unsigned char *eth_addr = omap_dm9000_platdata.dev_addr;
565 struct omap_die_id odi;
566
563 if (gpio_request(OMAP_DM9000_GPIO_IRQ, "dm9000 irq") < 0) { 567 if (gpio_request(OMAP_DM9000_GPIO_IRQ, "dm9000 irq") < 0) {
564 printk(KERN_ERR "Failed to request GPIO%d for dm9000 IRQ\n", 568 printk(KERN_ERR "Failed to request GPIO%d for dm9000 IRQ\n",
565 OMAP_DM9000_GPIO_IRQ); 569 OMAP_DM9000_GPIO_IRQ);
@@ -567,6 +571,16 @@ static void __init omap_dm9000_init(void)
567 } 571 }
568 572
569 gpio_direction_input(OMAP_DM9000_GPIO_IRQ); 573 gpio_direction_input(OMAP_DM9000_GPIO_IRQ);
574
575 /* init the mac address using DIE id */
576 omap_get_die_id(&odi);
577
578 eth_addr[0] = 0x02; /* locally administered */
579 eth_addr[1] = odi.id_1 & 0xff;
580 eth_addr[2] = (odi.id_0 & 0xff000000) >> 24;
581 eth_addr[3] = (odi.id_0 & 0x00ff0000) >> 16;
582 eth_addr[4] = (odi.id_0 & 0x0000ff00) >> 8;
583 eth_addr[5] = (odi.id_0 & 0x000000ff);
570} 584}
571 585
572static struct platform_device *devkit8000_devices[] __initdata = { 586static struct platform_device *devkit8000_devices[] __initdata = {