[U-Boot] [PATCH 22/28] SPEAr : High speed support for designware peripheral
Vipin KUMAR
vipin.kumar at st.com
Wed Jul 14 07:09:58 CEST 2010
From: Vipin KUMAR <vipin.kumar at st.com>
This patch adds the support for usb device high speed for designware peripheral.
Signed-off-by: Vipin Kumar <vipin.kumar at st.com>
---
drivers/usb/gadget/designware_udc.c | 13 +++++++++----
include/usb/designware_udc.h | 3 +++
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c
index 3c20f3d..d4b53a2 100644
--- a/drivers/usb/gadget/designware_udc.c
+++ b/drivers/usb/gadget/designware_udc.c
@@ -566,7 +566,7 @@ int udc_init(void)
writel(~0x0, &udc_regs_p->dev_int_mask);
writel(~0x0, &udc_regs_p->endp_int_mask);
- writel(DEV_CONF_FS_SPEED | DEV_CONF_REMWAKEUP | DEV_CONF_SELFPOW |
+ writel(DEV_CONF_HS_SPEED | DEV_CONF_REMWAKEUP | DEV_CONF_SELFPOW |
DEV_CONF_PHYINT_16, &udc_regs_p->dev_conf);
writel(DEV_CNTL_SOFTDISCONNECT, &udc_regs_p->dev_cntl);
@@ -577,6 +577,11 @@ int udc_init(void)
return 0;
}
+int is_usbd_high_speed(void)
+{
+ return (readl(&udc_regs_p->dev_stat) & DEV_STAT_ENUM) ? 0 : 1;
+}
+
/*
* udc_setup_ep - setup endpoint
* Associate a physical endpoint with endpoint_instance
@@ -792,7 +797,7 @@ void udc_startup_events(struct usb_device_instance *device)
/*
* Plug detection interrupt handling
*/
-void dw_udc_plug_irq(void)
+static void dw_udc_plug_irq(void)
{
if (readl(&plug_regs_p->plug_state) & PLUG_STATUS_ATTACHED) {
/*
@@ -816,7 +821,7 @@ void dw_udc_plug_irq(void)
/*
* Device interrupt handling
*/
-void dw_udc_dev_irq(void)
+static void dw_udc_dev_irq(void)
{
if (readl(&udc_regs_p->dev_int) & DEV_INT_USBRESET) {
writel(~0x0, &udc_regs_p->endp_int_mask);
@@ -886,7 +891,7 @@ void dw_udc_dev_irq(void)
/*
* Endpoint interrupt handling
*/
-void dw_udc_endpoint_irq(void)
+static void dw_udc_endpoint_irq(void)
{
while (readl(&udc_regs_p->endp_int) & ENDP0_INT_CTRLOUT) {
diff --git a/include/usb/designware_udc.h b/include/usb/designware_udc.h
index ae98e8c..8d48ae9 100644
--- a/include/usb/designware_udc.h
+++ b/include/usb/designware_udc.h
@@ -197,6 +197,9 @@ struct udcfifo_regs {
#define UDC_INT_PACKET_SIZE 64
#define UDC_OUT_ENDPOINT 2
#define UDC_BULK_PACKET_SIZE 64
+#if defined(CONFIG_USBD_HS)
+#define UDC_BULK_HS_PACKET_SIZE 512
+#endif
#define UDC_IN_ENDPOINT 3
#define UDC_OUT_PACKET_SIZE 64
#define UDC_IN_PACKET_SIZE 64
--
1.6.0.2
More information about the U-Boot
mailing list