mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 9/9] at91sam9x5ek: add usb support
Date: Mon, 21 Jan 2013 21:09:56 +0100	[thread overview]
Message-ID: <1358798996-26595-9-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1358798996-26595-1-git-send-email-plagnioj@jcrosoft.com>

warning: the ohci work only without MMU

enable:
 - ehci
 - usb strorage
 - usb net asix

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9x5ek/init.c     |   20 +++++++++++++++-----
 arch/arm/configs/at91sam9x5ek_defconfig |    6 ++++++
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boards/at91sam9x5ek/init.c b/arch/arm/boards/at91sam9x5ek/init.c
index f230205..5e11241 100644
--- a/arch/arm/boards/at91sam9x5ek/init.c
+++ b/arch/arm/boards/at91sam9x5ek/init.c
@@ -192,14 +192,24 @@ static void ek_add_device_spi(void)
 	at91_add_device_spi(0, &spi_pdata);
 }
 
+#if defined(CONFIG_USB_OHCI) || defined(CONFIG_USB_EHCI)
 /*
- * USB Host port
+ * USB HS Host port (common to OHCI & EHCI)
  */
-static struct at91_usbh_data __initdata ek_usbh_data = {
-	.ports		= 2,
-	.vbus_pin	= {AT91_PIN_PD20, AT91_PIN_PD19},
+static struct at91_usbh_data ek_usbh_hs_data = {
+	.ports			= 2,
+	.vbus_pin		= {AT91_PIN_PD19, AT91_PIN_PD20},
 };
 
+static void ek_add_device_usb(void)
+{
+	at91_add_device_usbh_ohci(&ek_usbh_hs_data);
+	at91_add_device_usbh_ehci(&ek_usbh_hs_data);
+}
+#else
+static void ek_add_device_usb(void) {}
+#endif
+
 struct gpio_led leds[] = {
 	{
 		.gpio	= AT91_PIN_PB18,
@@ -250,7 +260,7 @@ static int at91sam9x5ek_devices_init(void)
 	ek_add_device_eth();
 	ek_add_device_spi();
 	ek_add_device_mci();
-	at91_add_device_usbh_ohci(&ek_usbh_data);
+	ek_add_device_usb();
 	ek_add_led();
 	ek_add_device_i2c();
 
diff --git a/arch/arm/configs/at91sam9x5ek_defconfig b/arch/arm/configs/at91sam9x5ek_defconfig
index 0df8631..400a35b 100644
--- a/arch/arm/configs/at91sam9x5ek_defconfig
+++ b/arch/arm/configs/at91sam9x5ek_defconfig
@@ -52,6 +52,8 @@ CONFIG_NET_NFS=y
 CONFIG_NET_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_DRIVER_NET_MACB=y
+CONFIG_NET_USB=y
+CONFIG_NET_USB_ASIX=y
 CONFIG_DRIVER_SPI_ATMEL=y
 CONFIG_MTD_M25P80=y
 CONFIG_I2C=y
@@ -66,6 +68,10 @@ CONFIG_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_NAND_ATMEL_PMECC=y
 CONFIG_UBI=y
+CONFIG_USB=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_EHCI_ATMEL=y
+CONFIG_USB_STORAGE=y
 CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 CONFIG_MCI_ATMEL=y
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-01-21 20:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 20:07 [PATCH 0/9] atmel: add ehci support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09 ` [PATCH 1/9] usb: add parameters info on usb device Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 2/9] usb: fix for USB_ST_STALLED status reporting in ehci_submit_async() Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 3/9] ehci: if caps ressource is not provided discover it via cr_capbase Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 4/9] ehci: add atmel support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 5/9] at91: usb: allow to specicfy inverted vbus Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 6/9] at91sam9g45: add ehci support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 7/9] at91sam9m10g45ek: add usb support Jean-Christophe PLAGNIOL-VILLARD
2013-01-22  8:30     ` Sascha Hauer
2013-01-22 14:15       ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-22 14:24         ` Sascha Hauer
2013-01-22 14:46           ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` [PATCH 8/9] at91sam9x5: add ehci support Jean-Christophe PLAGNIOL-VILLARD
2013-01-21 20:09   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-01-23 19:28 ` [PATCH 0/9] atmel: " Sascha Hauer

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=1358798996-26595-9-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.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