From: Andy Green <andy.green@linaro.org>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: nicolas.pitre@linaro.org, s-jan@ti.com, arnd@arndb.de,
patches@linaro.org, tony@atomide.com, rostedt@goodmis.org
Subject: [PATCH 3/3] OMAP4 PANDA register ethernet and wlan for automatic mac allocation
Date: Fri, 29 Jun 2012 13:55:26 +0800 [thread overview]
Message-ID: <20120629055524.11091.57217.stgit@build.warmcat.com> (raw)
In-Reply-To: <20120629054404.11091.31289.stgit@build.warmcat.com>
From: Andy Green <andy@warmcat.com>
This provides the board-specific device paths needed to get
the panda boardfile working with the MAC address fixup api.
On Pandaboard / ES, neither the onboard Ethernet or onboard WLAN
module have onboard arrangements for MAC storage, without this
series yielding randomized MAC per-boot and consequent DHCP problems,
or in the case of wlan0 a MAC set by a firmware file in the rootfs
which unless customized yields a MAC of 00:00:00:00:00:00. No
official MAC is reserved for either network device even if you do
take the approach to customize the firmware file.
This gets sane, consistent MAC addresses on both devices which
should stand a good probability of differing between PandaBoards.
Signed-off-by: Andy Green <andy.green@linaro.org>
---
arch/arm/mach-omap2/board-omap4panda.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 982fb26..07a17b0 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -486,6 +486,15 @@ static void omap4_panda_init_rev(void)
}
}
+/*
+ * These device paths represent onboard network devices which have
+ * no MAC address set at boot, and need synthetic ones assigning
+ */
+static const char * const panda_fixup_mac_device_paths[] = {
+ "usb1/1-1/1-1.1/1-1.1:1.0", /* smsc USB <-> Ethernet bridge */
+ "wl12xx", /* wlan0 module */
+};
+
static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;
@@ -496,6 +505,10 @@ static void __init omap4_panda_init(void)
omap4_mux_init(board_mux, NULL, package);
omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
+
+ omap_register_mac_device_fixup_paths(panda_fixup_mac_device_paths,
+ ARRAY_SIZE(panda_fixup_mac_device_paths));
+
ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
if (ret)
pr_err("error setting wl12xx data: %d\n", ret);
next prev parent reply other threads:[~2012-06-29 5:55 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 5:55 [PATCH 0/3] Add ability to set defaultless network device MAC addresses to deterministic computed locally administered values Andy Green
2012-06-29 5:55 ` [PATCH 1/3] OMAP2+: add cpu id register to MAC address helper Andy Green
2012-06-29 9:05 ` Tony Lindgren
2012-06-29 9:13 ` Andy Green
2012-06-29 5:55 ` [PATCH 2/3] OMAP2+ devices add mac address allocation register api Andy Green
2012-06-29 8:51 ` Arnd Bergmann
2012-06-29 9:03 ` Andy Green
2012-06-29 9:40 ` Tony Lindgren
2012-06-29 10:07 ` Andy Green
2012-06-29 12:03 ` Tony Lindgren
2012-06-29 13:45 ` Arnd Bergmann
2012-06-29 13:55 ` Tony Lindgren
2012-06-29 13:59 ` Andy Green
2012-06-29 14:33 ` Arnd Bergmann
2012-06-29 14:52 ` Tony Lindgren
2012-06-29 15:05 ` Arnd Bergmann
2012-07-01 8:58 ` Tony Lindgren
2012-07-02 7:15 ` Arnd Bergmann
2012-07-02 10:51 ` Tony Lindgren
2012-06-29 14:03 ` Andy Green
2012-06-29 14:38 ` Arnd Bergmann
2012-06-29 5:55 ` Andy Green [this message]
2012-06-29 11:55 ` [PATCH 3/3] OMAP4 PANDA register ethernet and wlan for automatic mac allocation Tony Lindgren
2012-06-29 8:50 ` [PATCH 0/3] Add ability to set defaultless network device MAC addresses to deterministic computed locally administered values Arnd Bergmann
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=20120629055524.11091.57217.stgit@build.warmcat.com \
--to=andy.green@linaro.org \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=patches@linaro.org \
--cc=rostedt@goodmis.org \
--cc=s-jan@ti.com \
--cc=tony@atomide.com \
/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;
as well as URLs for NNTP newsgroup(s).