From: y@numalfix.phytec.de
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] ARM: OMAP: early call am33xx_register_ethaddr
Date: Tue, 10 Dec 2013 15:30:09 +0100 [thread overview]
Message-ID: <1386685809-21530-3-git-send-email-y> (raw)
In-Reply-To: <1386685809-21530-1-git-send-email-y>
From: Jan Weitzel <j.weitzel@phytec.de>
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>
---
arch/arm/boards/beaglebone/board.c | 12 ++++++++++--
arch/arm/boards/pcm051/board.c | 13 +++++++++++--
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
index 439c4c2..6445d81 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 91e8208..60f00bb 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");
--
1.7.0.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-12-10 14:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 14:30 [PATCH 1/3] net: cpsw: Fix gmii_sel config y
2013-12-10 14:30 ` [PATCH 2/3] pcm051: ethernet and dts fixes y
2013-12-10 14:30 ` y [this message]
2013-12-12 8:09 ` [PATCH 1/3] net: cpsw: Fix gmii_sel config Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386685809-21530-3-git-send-email-y \
--to=y@numalfix.phytec.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox