mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Green <andy@warmcat.com>
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 <andy.green@linaro.org>
Subject: [RFC PATCH 1/5] OMAP2+: Panda introduce async platform data definition
Date: Sat, 12 Mar 2011 22:50:39 +0000	[thread overview]
Message-ID: <20110312225039.27728.24017.stgit@otae.warmcat.com> (raw)
In-Reply-To: <20110312224440.27728.60593.stgit@otae.warmcat.com>

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 <andy.green@linaro.org>
---

 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 <linux/usb/otg.h>
 #include <linux/i2c/twl.h>
 #include <linux/regulator/machine.h>
+#include <linux/usb.h>
+#include <linux/skbuff.h>
+#include <linux/mii.h>
+#include <linux/netdevice.h>
+#include <linux/if_ether.h>
+#include <linux/usb/usbnet.h>
 
 #include <mach/hardware.h>
 #include <mach/omap4-common.h>
@@ -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();


  reply	other threads:[~2011-03-12 22:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 22:50 [RFC PATCH 0/5] OMAP2+ / Panda implementation for async platform_data Andy Green
2011-03-12 22:50 ` Andy Green [this message]
2011-03-13  1:05   ` [RFC PATCH 1/5] OMAP2+: Panda introduce async platform data definition Greg KH
2011-03-12 22:50 ` [RFC PATCH 2/5] OMAP2+: add cpu id register to MAC address helper Andy Green
2011-03-18  8:34   ` Arnd Bergmann
2011-03-18  8:49     ` Andy Green
2011-03-18 14:37     ` Premi, Sanjeev
2011-03-18 14:47       ` Andy Green
2011-03-18  8:52   ` Roger Quadros
2011-03-18  9:13     ` Andy Green
2011-03-12 22:50 ` [RFC PATCH 3/5] OMAP2+:Common CPU DIE ID reading code reads wrong registers for OMAP4430 Andy Green
2011-03-14 18:12   ` Tony Lindgren
2011-03-12 22:51 ` [RFC PATCH 4/5] OMAP2+: Set onboard Ethernet MAC address using unique CPU ID data Andy Green
2011-03-12 22:51 ` [RFC PATCH 5/5] USBNET: SMSC95XX: if mac set in platform data no need for random one Andy Green

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=20110312225039.27728.24017.stgit@otae.warmcat.com \
    --to=andy@warmcat.com \
    --cc=andy.green@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=patches@linaro.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

Powered by JetHome