From patchwork Sat Mar 12 22:51:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 535 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:24 -0000 Delivered-To: patches@linaro.org Received: by 10.224.45.75 with SMTP id d11cs13758qaf; Sat, 12 Mar 2011 14:51:06 -0800 (PST) Received: by 10.227.177.199 with SMTP id bj7mr1483132wbb.140.1299970265364; Sat, 12 Mar 2011 14:51:05 -0800 (PST) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id d3si10980797wbe.24.2011.03.12.14.51.04 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:51:05 -0800 (PST) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by mail-wy0-f178.google.com with SMTP id 26so4062942wyj.37 for ; Sat, 12 Mar 2011 14:51:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:subject:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version:content-type :content-transfer-encoding; bh=iaPp8T5wemUisJ61eDZP4QjOAhrJcIlfCRw8KEi37B0=; b=K5uC3SYOZnOidIRn6agoQbdygKX5X+2QIjf4/4bnxm+m9o5HdkdQkjd9clQM4h+N4V CNtpjkwu3JCGmU6TPirC+DT5QuEZxiyYfV0DUltGtMFHIBRyBHKO8UJH8sgaulHw1Tl8 0pG3Mg8cn3QKdEl8OzhuB5EXX7ExyczcFLrNQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=c4hxcEu44pIKmPL2nGefbwwtwVz40CtoUj8PSznYoo825tdf1567lYxlehFsSMg8KR BG2BUj35dq9w8IGIUWWBwEKweniLq4TjETzfwWmsM2t9j3+S60QR5D5mnOwPswDXZ/5G 0ERIlIwfqubztAKnde8PB30ocyx5kis0WMNOI= Received: by 10.227.203.145 with SMTP id fi17mr4962330wbb.106.1299970264602; Sat, 12 Mar 2011 14:51:04 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id w25sm4696344wbd.17.2011.03.12.14.51.03 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:51:04 -0800 (PST) Sender: Andy Green From: Andy Green Subject: [RFC PATCH 4/5] OMAP2+: Set onboard Ethernet MAC address using unique CPU ID data To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Andy Green Date: Sat, 12 Mar 2011 22:51:02 +0000 Message-ID: <20110312225102.27728.59452.stgit@otae.warmcat.com> In-Reply-To: <20110312224440.27728.60593.stgit@otae.warmcat.com> References: <20110312224440.27728.60593.stgit@otae.warmcat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 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 --- 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 #include +#include #include #include #include @@ -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));