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 6/9] at91sam9g45: add ehci support
Date: Mon, 21 Jan 2013 21:09:53 +0100	[thread overview]
Message-ID: <1358798996-26595-6-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1358798996-26595-1-git-send-email-plagnioj@jcrosoft.com>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/mach-at91/at91sam9g45.c         |    1 +
 arch/arm/mach-at91/at91sam9g45_devices.c |   22 ++++++++++++++++++++++
 arch/arm/mach-at91/include/mach/board.h  |    1 +
 3 files changed, 24 insertions(+)

diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 7118efe..6e88bf1 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -187,6 +187,7 @@ static struct clk *periph_clocks[] __initdata = {
 static struct clk_lookup periph_clocks_lookups[] = {
 	/* One additional fake clock for ohci */
 	CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
+	CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci", &uhphs_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci0", &mmc0_clk),
 	CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci1", &mmc1_clk),
 	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 7d44ee0..c4ca7c6 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -55,6 +55,28 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
 void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data) {}
 #endif
 
+#if defined(CONFIG_USB_EHCI)
+void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data)
+{
+	int i;
+
+	if (!data)
+		return;
+
+	/* Enable VBus control for UHP ports */
+	for (i = 0; i < data->ports; i++) {
+		if (gpio_is_valid(data->vbus_pin[i]))
+			at91_set_gpio_output(data->vbus_pin[i],
+					     data->vbus_pin_active_low[i]);
+	}
+
+	add_generic_device("atmel-ehci", DEVICE_ID_SINGLE, NULL, AT91SAM9G45_EHCI_BASE,
+			1024 * 1024, IORESOURCE_MEM, data);
+}
+#else
+void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) {}
+#endif
+
 #if defined(CONFIG_DRIVER_NET_MACB)
 void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
 {
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 0994770..b0afcf9 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -32,6 +32,7 @@ struct at91_usbh_data {
 	u8	vbus_pin_active_low[2];	/* vbus polarity */
 };
 extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data);
+extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data);
 
 void atmel_nand_load_image(void *dest, int size, int pagesize, int blocksize);
 
-- 
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: " 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   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
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   ` [PATCH 9/9] at91sam9x5ek: add usb support Jean-Christophe PLAGNIOL-VILLARD
2013-01-23 19:28 ` [PATCH 0/9] atmel: add ehci support 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-6-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