From: Amit Virdi <amit.virdi@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] USB:gadget:designware Support high speed
Date: Tue, 6 Mar 2012 11:14:37 +0530 [thread overview]
Message-ID: <4F55A445.9070903@st.com> (raw)
In-Reply-To: <201203051915.36384.marex@denx.de>
Dear Marek,
On 3/5/2012 11:45 PM, Marek Vasut wrote:
> Dear Amit Virdi,
>
>> From: Vipin KUMAR<vipin.kumar@st.com>
>>
>> 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>
>> ---
>> 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);
>
> Won't this break anything?
You're right. Perhaps, it's better to configure FS only if the FS is
configured. I'll amend this part.
>>
>> 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)
>
> This staticisation stuff should go in a separate patch please.
>
Ok.
>> {
>> 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
>
> You can define this without the ifdef
>
Ok.
>> #define UDC_IN_ENDPOINT 3
>> #define UDC_OUT_PACKET_SIZE 64
>> #define UDC_IN_PACKET_SIZE 64
>
Thanks for reviewing.
Best Regards
Amit Virdi
next prev parent reply other threads:[~2012-03-06 5:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 12:03 [U-Boot] [PATCH 0/4] USB: Add support for designware UDC Amit Virdi
2012-02-16 12:03 ` [U-Boot] [PATCH 1/4] USB:gadget:designware USB device controller (UDC) implementation Amit Virdi
2012-03-05 18:12 ` Marek Vasut
2012-03-06 4:32 ` Amit Virdi
2012-02-16 12:03 ` [U-Boot] [PATCH 2/4] USB:gadget:designware Device controller bugfixes Amit Virdi
2012-03-05 18:13 ` Marek Vasut
2012-03-06 4:34 ` Amit Virdi
2012-02-16 12:03 ` [U-Boot] [PATCH 3/4] USB:gadget:designware Support high speed Amit Virdi
2012-03-05 18:15 ` Marek Vasut
2012-03-06 5:44 ` Amit Virdi [this message]
2012-02-16 12:03 ` [U-Boot] [PATCH 4/4] USB:gadget:designware Fix memory nonalignment issue Amit Virdi
2012-03-05 18:21 ` Marek Vasut
2012-03-06 9:36 ` Amit Virdi
2012-03-06 9:51 ` Marek Vasut
2012-03-06 16:08 ` Mike Frysinger
2012-03-07 7:14 ` Amit Virdi
2012-03-06 16:09 ` Mike Frysinger
2012-03-07 7:04 ` Amit Virdi
2012-02-24 11:56 ` [U-Boot] [PATCH 0/4] USB: Add support for designware UDC Amit Virdi
2012-03-05 18:06 ` Marek Vasut
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=4F55A445.9070903@st.com \
--to=amit.virdi@st.com \
--cc=u-boot@lists.denx.de \
/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