diff options
author | Vipin KUMAR <vipin.kumar@st.com> | 2012-03-06 23:39:39 +0000 |
---|---|---|
committer | Marek Vasut <marek.vasut@gmail.com> | 2012-03-19 00:08:17 +0100 |
commit | 23b0e6946b9794266a2b699030b7b75c3fffb81d (patch) | |
tree | a7d86d62f014af62e321137c52266aa7ee61d508 /drivers/usb | |
parent | dc3e77391859f49a7b0ff403d5708f5d6ea7aba8 (diff) | |
download | u-boot-imx-23b0e6946b9794266a2b699030b7b75c3fffb81d.zip u-boot-imx-23b0e6946b9794266a2b699030b7b75c3fffb81d.tar.gz u-boot-imx-23b0e6946b9794266a2b699030b7b75c3fffb81d.tar.bz2 |
USB:gadget:designware Support high speed
This patch adds the support for usb device high speed for designware peripheral.
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/designware_udc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c index 3c20f3d..205f54a 100644 --- a/drivers/usb/gadget/designware_udc.c +++ b/drivers/usb/gadget/designware_udc.c @@ -566,8 +566,13 @@ int udc_init(void) writel(~0x0, &udc_regs_p->dev_int_mask); writel(~0x0, &udc_regs_p->endp_int_mask); +#ifndef CONFIG_USBD_HS writel(DEV_CONF_FS_SPEED | DEV_CONF_REMWAKEUP | DEV_CONF_SELFPOW | DEV_CONF_PHYINT_16, &udc_regs_p->dev_conf); +#else + writel(DEV_CONF_HS_SPEED | DEV_CONF_REMWAKEUP | DEV_CONF_SELFPOW | + DEV_CONF_PHYINT_16, &udc_regs_p->dev_conf); +#endif writel(DEV_CNTL_SOFTDISCONNECT, &udc_regs_p->dev_cntl); @@ -577,6 +582,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 |