From patchwork Sat Mar 12 22:50:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 531 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:23 -0000 Delivered-To: patches@linaro.org Received: by 10.224.45.75 with SMTP id d11cs13750qaf; Sat, 12 Mar 2011 14:50:43 -0800 (PST) Received: by 10.216.62.67 with SMTP id x45mr837514wec.92.1299970242911; Sat, 12 Mar 2011 14:50:42 -0800 (PST) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id n33si10971004wei.90.2011.03.12.14.50.42 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:50:42 -0800 (PST) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.50 as permitted sender) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.50 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by wwc33 with SMTP id 33so4669225wwc.31 for ; Sat, 12 Mar 2011 14:50:42 -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=AE4h+dHEpHtuuOBjdATsosqL/BRw5B2pjKIMwgbc8Ks=; b=cjmwH0BmN3BNPu9uzR/UOA40atqs5YfD8vLM5IoXBjWzFT2Ki9EhezE0FS02c7F7Vu oON5bQW0LibMf/Sih3polhSlHlsCL1By5HLVRZcVdaEvggL+E8HLSmsyshBA1n4QOgvh akd0EmwDyj6/Tt5YnZSSIgYF7jax0/LZbX6F8= 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=CqfIskxVUVNq3wOSjrXarnpJsY0WwOSW/f1ngYx7sMreHEH40G9u0xpvT41/L9Bzh/ JsIgsvJIIThsT+UwRzMepzCofAEK4VTGNeQ0KuidQZ7FzuDlS74U/8v27C/30hGcaem8 qliiree16+11EegrJMkzQXSint/IVRtBSI8us= Received: by 10.216.140.15 with SMTP id d15mr9182627wej.64.1299970242105; Sat, 12 Mar 2011 14:50:42 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id k76sm2302194wej.43.2011.03.12.14.50.40 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:50:41 -0800 (PST) Sender: Andy Green From: Andy Green Subject: [RFC PATCH 1/5] OMAP2+: Panda introduce async platform data definition 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:50:39 +0000 Message-ID: <20110312225039.27728.24017.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 defines the usbnet platform data, allowing the panda board definition file to assert the naming of the usbnet network interface should be eth%d instead of usb%d. Signed-off-by: Andy Green --- arch/arm/mach-omap2/board-omap4panda.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index e944025..7c7aa74 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -26,6 +26,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include @@ -397,6 +403,17 @@ static struct omap_board_mux board_mux[] __initdata = { #define board_mux NULL #endif +struct usbnet_platform_data panda_usbnet_platform_data_usb1_1 = { + .flags = USBNET_PLATDATA_FLAG__FORCE_ETH_IFNAME, +}; + +struct platform_async_platform_data panda_async_pdata_map[] = { + { + .device_path = "usb1/1-1/1-1.1", + .platform_data = &panda_usbnet_platform_data_usb1_1, + }, +}; + static void __init omap4_panda_init(void) { int package = OMAP_PACKAGE_CBS; @@ -405,6 +422,9 @@ static void __init omap4_panda_init(void) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, package); + platform_async_platform_data_register(panda_async_pdata_map, + ARRAY_SIZE(panda_async_pdata_map)); + omap4_panda_i2c_init(); platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); omap_serial_init();