From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] usb-a926x: add usb device support
Date: Mon, 12 Dec 2011 15:46:57 +0100 [thread overview]
Message-ID: <1323701217-26236-4-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1323701217-26236-1-git-send-email-plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Gregory HERMANT <gregory.hermant@calao-systems.com>
---
arch/arm/boards/usb-a926x/init.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c
index 5354582..686f638 100644
--- a/arch/arm/boards/usb-a926x/init.c
+++ b/arch/arm/boards/usb-a926x/init.c
@@ -165,6 +165,22 @@ static struct at91_usbh_data ek_usbh_data = {
.ports = 2,
};
+/*
+ * USB Device port
+ */
+static struct at91_udc_data __initdata ek_udc_data = {
+ .vbus_pin = AT91_PIN_PB11,
+ .pullup_pin = -EINVAL, /* pull-up driven by UDC */
+};
+
+static void __init ek_add_device_udc(void)
+{
+ if (machine_is_usb_a9260() || machine_is_usb_a9g20())
+ ek_udc_data.vbus_pin = AT91_PIN_PC5;
+
+ at91_add_device_udc(&ek_udc_data);
+}
+
static int usb_a9260_devices_init(void)
{
usb_a9260_add_device_nand();
@@ -172,6 +188,7 @@ static int usb_a9260_devices_init(void)
at91_add_device_eth(&macb_pdata);
usb_a9260_add_device_mci();
at91_add_device_usbh_ohci(&ek_usbh_data);
+ ek_add_device_udc();
#ifdef CONFIG_AT91_HAVE_SRAM_128M
at91_add_device_sdram(128 * 1024 * 1024);
--
1.7.7
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2011-12-12 14:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 14:46 [PATCH 1/4] at91sam9263: fix mci clock Jean-Christophe PLAGNIOL-VILLARD
2011-12-12 14:46 ` [PATCH 2/4] at91: add udc usb device controller support Jean-Christophe PLAGNIOL-VILLARD
2011-12-13 10:37 ` Sascha Hauer
2011-12-13 15:06 ` [PATCH 2/4 V2] " Jean-Christophe PLAGNIOL-VILLARD
2011-12-12 14:46 ` [PATCH 3/4] at91: add at91_udc resource Jean-Christophe PLAGNIOL-VILLARD
2011-12-14 15:37 ` Jean-Christophe PLAGNIOL-VILLARD
2011-12-12 14:46 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
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=1323701217-26236-4-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