[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110312225102.27728.59452.stgit@otae.warmcat.com>
Date: Sat, 12 Mar 2011 22:51:02 +0000
From: Andy Green <andy@...mcat.com>
To: linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc: patches@...aro.org, Andy Green <andy.green@...aro.org>
Subject: [RFC PATCH 4/5] OMAP2+: Set onboard Ethernet MAC address using unique
CPU ID data
This is part of an RFC patch series introducing asynchronous platform
data, which may be attached to discovered bus devices at probe time
based on the device path.
As part of the series, platform_data is enabled in usbnet layer.
This patch used the usbnet platform data in the panda board
definition file to set the MAC address of the USB <-> Ethernet
onboard bridge to a unique value derived from unique CPU ID
data.
Signed-off-by: Andy Green <andy.green@...aro.org>
---
arch/arm/mach-omap2/board-omap4panda.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 7c7aa74..312154b 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -35,6 +35,7 @@
#include <mach/hardware.h>
#include <mach/omap4-common.h>
+#include <mach/id.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -404,7 +405,8 @@ static struct omap_board_mux board_mux[] __initdata = {
#endif
struct usbnet_platform_data panda_usbnet_platform_data_usb1_1 = {
- .flags = USBNET_PLATDATA_FLAG__FORCE_ETH_IFNAME,
+ .flags = USBNET_PLATDATA_FLAG__FORCE_ETH_IFNAME |
+ USBNET_PLATDATA_FLAG__USE_MAC,
};
struct platform_async_platform_data panda_async_pdata_map[] = {
@@ -422,6 +424,8 @@ static void __init omap4_panda_init(void)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, package);
+ omap2_die_id_to_mac(panda_usbnet_platform_data_usb1_1.mac,
+ sizeof(panda_usbnet_platform_data_usb1_1.mac));
platform_async_platform_data_register(panda_async_pdata_map,
ARRAY_SIZE(panda_async_pdata_map));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists