summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJan Weitzel <j.weitzel@phytec.de>2013-12-10 15:30:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-12-12 09:09:06 +0100
commit537c4abb6fce41347c11ecca10f6b1f07089c07c (patch)
tree57f2775d62b4141bab50d92bfdf4bc79c1ddaff5 /arch
parentdb9d2e9f95c8dd2cd1c02facfe235bdc1a59f560 (diff)
downloadbarebox-537c4abb6fce41347c11ecca10f6b1f07089c07c.tar.gz
barebox-537c4abb6fce41347c11ecca10f6b1f07089c07c.tar.xz
ARM: OMAP: early call am33xx_register_ethaddr
am33xx_register_ethaddr must be called before cpsw driver start. Move it from devices_initcall to coredevice_initcall. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/beaglebone/board.c12
-rw-r--r--arch/arm/boards/pcm051/board.c13
2 files changed, 21 insertions, 4 deletions
diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
index 439c4c21f8..6445d81001 100644
--- a/arch/arm/boards/beaglebone/board.c
+++ b/arch/arm/boards/beaglebone/board.c
@@ -40,6 +40,16 @@
#include "beaglebone.h"
+static int beaglebone_coredevice_init(void)
+{
+ if (!of_machine_is_compatible("ti,am335x-bone"))
+ return 0;
+
+ am33xx_register_ethaddr(0, 0);
+ return 0;
+}
+coredevice_initcall(beaglebone_coredevice_init);
+
static int beaglebone_devices_init(void)
{
int black;
@@ -54,8 +64,6 @@ static int beaglebone_devices_init(void)
omap_set_bootmmc_devname("mmc1");
}
- am33xx_register_ethaddr(0, 0);
-
black = is_beaglebone_black();
globalvar_add_simple("board.variant", black ? "boneblack" : "bone");
diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c
index 91e82084b5..60f00bba0b 100644
--- a/arch/arm/boards/pcm051/board.c
+++ b/arch/arm/boards/pcm051/board.c
@@ -30,6 +30,17 @@
#include <mach/am33xx-silicon.h>
#include <mach/bbu.h>
+
+static int pcm051_coredevice_init(void)
+{
+ if (!of_machine_is_compatible("phytec,pcm051"))
+ return 0;
+
+ am33xx_register_ethaddr(0, 0);
+ return 0;
+}
+coredevice_initcall(pcm051_coredevice_init);
+
static struct omap_barebox_part pcm051_barebox_part = {
.nand_offset = SZ_512K,
.nand_size = SZ_512K,
@@ -42,8 +53,6 @@ static int pcm051_devices_init(void)
if (!of_machine_is_compatible("phytec,pcm051"))
return 0;
- am33xx_register_ethaddr(0, 0);
-
switch (bootsource_get()) {
case BOOTSOURCE_SPI:
of_device_enable_path("/chosen/environment-spi");