mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/8] pm9g45: use w1 serial number to generate local mac address
Date: Sun, 28 Oct 2012 02:24:08 +0200	[thread overview]
Message-ID: <1351383852-8488-4-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1351383852-8488-1-git-send-email-plagnioj@jcrosoft.com>

The OUI will be 'ron' => 72:6F:6E

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/pm9g45/init.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
index 907c6bb..f3764bb 100644
--- a/arch/arm/boards/pm9g45/init.c
+++ b/arch/arm/boards/pm9g45/init.c
@@ -36,6 +36,7 @@
 #include <mach/at91sam9_smc.h>
 #include <mach/sam9_smc.h>
 #include <linux/w1-gpio.h>
+#include <w1_mac_address.h>
 
 struct w1_gpio_platform_data w1_pdata = {
 	.pin = AT91_PIN_PA31,
@@ -128,6 +129,13 @@ static void pm9g45_phy_init(void)
 	at91_set_gpio_value(AT91_PIN_PD2, 1);
 }
 
+static void pm9g45_add_device_eth(void)
+{
+	w1_mac_address_register(0, true, "ron", "w1-1-0");
+	pm9g45_phy_init();
+	at91_add_device_eth(0, &macb_pdata);
+}
+
 static int pm9g45_mem_init(void)
 {
 	at91_add_device_sdram(128 * 1024 * 1024);
@@ -143,8 +151,7 @@ static int pm9g45_devices_init(void)
 
 	pm_add_device_nand();
 	pm9g45_add_device_mci();
-	pm9g45_phy_init();
-	at91_add_device_eth(0, &macb_pdata);
+	pm9g45_add_device_eth();
 	pm9g45_add_device_usbh();
 
 	devfs_add_partition("nand0", 0x00000, SZ_128K, DEVFS_PARTITION_FIXED, "at91bootstrap_raw");
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-10-28  0:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28  0:21 [PATCH 0/8] pm9g45/pm9253/pm9261: add 1-wire support Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:24 ` [PATCH 1/8] arm: at91: add gpio_is_valid support Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:24   ` [PATCH 2/8] w1: introduce helper to generate mac address from 1-wire id Jean-Christophe PLAGNIOL-VILLARD
2012-10-29  8:33     ` Sascha Hauer
2012-10-29 11:29       ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:24   ` [PATCH 3/8] pm9g45: add 1-wire support Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:24   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-10-28  0:24   ` [PATCH 5/8] pm9263: " Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:24   ` [PATCH 6/8] pm9263: use w1 serial number to generate local mac address Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:24   ` [PATCH 7/8] pm9261: add 1-wire support Jean-Christophe PLAGNIOL-VILLARD
2012-10-28  0:24   ` [PATCH 8/8] pm9261: use w1 serial number to generate local mac address Jean-Christophe PLAGNIOL-VILLARD
2012-10-29 13:40 [PATCH 0/8 v2:wqa] pm9g45/pm9253/pm9261: add 1-wire support Jean-Christophe PLAGNIOL-VILLARD
2012-10-29 13:46 ` [PATCH 1/8] arm: at91: add gpio_is_valid support Jean-Christophe PLAGNIOL-VILLARD
2012-10-29 13:47   ` [PATCH 4/8] pm9g45: use w1 serial number to generate local mac address Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 20:54 [PATCH 0/8 v3] pm9g45/pm9253/pm9261: add 1-wire support Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 21:00 ` [PATCH 1/8] arm: at91: add gpio_is_valid support Jean-Christophe PLAGNIOL-VILLARD
2012-10-30 21:00   ` [PATCH 4/8] pm9g45: use w1 serial number to generate local mac address Jean-Christophe PLAGNIOL-VILLARD

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=1351383852-8488-4-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --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