ci_udc: force full-speed operation if !CONFIG_USB_GADGET_DUALSPEED
PATCH 1/1 ci_udc: force full-speed operation if !CONFIG_USB_GADGET_DUALSPEED
--- drivers/usb/gadget/ci_udc.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/usb/gadget/ci_udc.c +5 -0
@@ -777,6 +777,11 @@ static int ci_pullup(struct usb_gadget *gadget, int is_on)/* select DEVICE mode */ writel (USBMODE_DEVICE , &udc->usbmode); +#if !defined(CONFIG_USB_GADGET_DUALSPEED ) && defined(CONFIG_MX6 ) +/* force full-speed mode */ +writel (readl (&udc->portsc)|(1 <<24 ), &udc->portsc); +#endif +writel (0xffffffff , &udc->epflush);/* Turn on the USB connection by enabling the pullup resistor */
Signature · 1 line
1.9.1
PATCH 1/1 ci_udc: force full-speed operation if !CONFIG_USB_GADGET_DUALSPEED
Quoted 11 lines · Eric Nelson
Signed-off-by Eric Nelson <[email protected]>--- drivers/usb/gadget/ci_udc.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/usb/gadget/ci_udc.c +0
-0@@ -777,6 +777,11 @@ static int ci_pullup(struct usb_gadget *gadget, int
is_on) /* select DEVICE mode */
drivers/usb/gadget/ci_udc.c static int ci_pullup(struct usb_gadget *gadget, int is_on) · line 784
Quoted 7 lines
drivers/usb/gadget/ci_udc.c +5
-0writel (USBMODE_DEVICE , &udc->usbmode); +#if !defined(CONFIG_USB_GADGET_DUALSPEED ) && defined(CONFIG_MX6 ) +/* force full-speed mode */ +writel (readl (&udc->portsc)|(1 <<24 ), &udc->portsc); +#endif +
setbits_le32() and I'm sure you know better than to use 1 << 24 . Please define that bit proper. And you also know you should supply a commit message, right ?
drivers/usb/gadget/ci_udc.c static int ci_pullup(struct usb_gadget *gadget, int is_on) · line 787
Quoted 3 lines
drivers/usb/gadget/ci_udc.c +0
-0writel (0xffffffff , &udc->epflush);/* Turn on the USB connection by enabling the pullup resistor */
Best regards,
Marek Vasut
PATCH 1/1 ci_udc: force full-speed operation if !CONFIG_USB_GADGET_DUALSPEED
Hi Marek,
Quoted 14 lines · Marek Vasut
Quoted 13 lines · Eric Nelson
Signed-off-by Eric Nelson <[email protected]>--- drivers/usb/gadget/ci_udc.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/usb/gadget/ci_udc.c +0
-0@@ -777,6 +777,11 @@ static int ci_pullup(struct usb_gadget *gadget, int
is_on) /* select DEVICE mode */
writel(USBMODE_DEVICE, &udc->usbmode);
Quoted 9 lines
drivers/usb/gadget/ci_udc.c static int ci_pullup(struct usb_gadget *gadget, int is_on) · line 784
Quoted 5 lines
drivers/usb/gadget/ci_udc.c +5
-0+#if !defined(CONFIG_USB_GADGET_DUALSPEED ) && defined(CONFIG_MX6 ) +/* force full-speed mode */ +writel (readl (&udc->portsc)|(1 <<24 ), &udc->portsc); +#endif +
setbits_le32()and I'm sure you know better than to use 1 << 24 . Please define that bit proper.
Yep. Will do.
Quoted 3 lines
And you also know you should supply a commit message, right ?
I'll give it another shot in V2.
Quoted 4 lines
drivers/usb/gadget/ci_udc.c static int ci_pullup(struct usb_gadget *gadget, int is_on) · line 787
Quoted 3 lines
drivers/usb/gadget/ci_udc.c +0
-0writel (0xffffffff , &udc->epflush);/* Turn on the USB connection by enabling the pullup resistor */
Regards,
Eric
PATCH v2 1/1 usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
In reply to Eric NelsonForce full-speed (12 Mbit/s) operation if CONFIG_USB_GADGET_DUALSPEED is not defined.
The controller is capable of high-speed (480 Mbit/s) operation, but some designs may require the use of lower-speed operation.
--- drivers/usb/gadget/ci_udc.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/usb/gadget/ci_udc.c +6 -0
@@ -766,6 +766,7 @@ void udc_disconnect(void)static int ci_pullup (struct usb_gadget *gadget,int is_on) { +u32 regval;struct ci_udc *udc = (struct ci_udc *)controller.ctrl->hcor;if (is_on) {/* RESET */
@@ -777,6 +778,11 @@ static int ci_pullup(struct usb_gadget *gadget, int is_on)/* select DEVICE mode */ writel (USBMODE_DEVICE , &udc->usbmode); +#if !defined(CONFIG_USB_GADGET_DUALSPEED ) && defined(CONFIG_MX6 ) +/* Port force Full-Speed Connect */ +setbits_le32 (&udc->portsc,PFSC ); +#endif +writel (0xffffffff , &udc->epflush);/* Turn on the USB connection by enabling the pullup resistor */
Signature · 1 line
1.9.1
PATCH v2 1/1 usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
drivers/usb/gadget/ci_udc.c static int ci_pullup(struct usb_gadget *gadget, int is_on) · line 781
Quoted 5 lines · Eric Nelson
drivers/usb/gadget/ci_udc.c +1
-0@@ -777,6 +778,11 @@ static int ci_pullup(struct usb_gadget *gadget, int is_on)/* select DEVICE mode */ writel (USBMODE_DEVICE , &udc->usbmode); +#if !defined(CONFIG_USB_GADGET_DUALSPEED ) && defined(CONFIG_MX6 )
why only MX6 ?
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140928/0effd476/attachment.pgp>
PATCH v2 1/1 usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 10 lines · Felipe Balbi
Review static int ci_pullup(struct usb_gadget · line 782
Quoted 6 lines · Eric Nelson
(quoted diff) +1
-0@@ -777,6 +778,11 @@ static int ci_pullup(struct usb_gadget *gadget, int is_on) /* select DEVICE mode */ writel(USBMODE_DEVICE, &udc->usbmode); +#if !defined(CONFIG_USB_GADGET_DUALSPEED) && defined(CONFIG_MX6)why only MX6 ?
This shouldn't be the case. I'll fix in V3.
I also just noticed an extraneous variable declaration. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJUKLZJAAoJEFUqXmm9AiVrK9gH/0XPpea8XDasyCtElV3WolzP C4RaqGrL6iRL2haiuY4zhIHv3KMxg+1L2P6rGrbYFn7+15mNhSMwqkSleRcDL8bw 47j5snivpd0BEnznC+dIzc/vghJ+gpkZdwmnRsfAvfGN+PWV1jNJUSR+jFkzTS6F 19rp2TIoIR9XgFx9chHmluI1iWp39yXTFhgqXLoLLMYMR0qXKTp8TV7asXvWLBsw +Rrlqf58j3rEmhBA8zNDIbDJe/aQDKbxHcZrK386n2izBK3fZqf4Ew2Pln8vSToU jHLnEwUp0PoeolUg1EK3oAlitNnwE7GLxxEoxsA/v7KaLzyUoR/c4wpG5/pIu2A= =Hdj5
-----END PGP SIGNATURE-----
PATCH 1/1 usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
In reply to Felipe BalbiForce full-speed (12 Mbit/s) operation if CONFIG_USB_GADGET_DUALSPEED is not defined.
The controller is capable of high-speed (480 Mbit/s) operation, but some designs may require the use of lower-speed operation.
---
V2 uses PFSC constant, setbits_le32, and expands commit message V3 removes restriction on i.MX6 and extraneous declaration
drivers/usb/gadget/ci_udc.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/usb/gadget/ci_udc.c +5 -0
@@ -777,6 +777,11 @@ static int ci_pullup(struct usb_gadget *gadget, int is_on)/* select DEVICE mode */ writel (USBMODE_DEVICE , &udc->usbmode); +#if !defined(CONFIG_USB_GADGET_DUALSPEED ) +/* Port force Full-Speed Connect */ +setbits_le32 (&udc->portsc,PFSC ); +#endif +writel (0xffffffff , &udc->epflush);/* Turn on the USB connection by enabling the pullup resistor */
Signature · 1 line
1.9.1
PATCH 1/1 usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
Quoted 7 lines · Eric Nelson
Force full-speed (12 Mbit/s) operation if
CONFIG_USB_GADGET_DUALSPEEDis not defined.The controller is capable of high-speed (480 Mbit/s) operation, but some designs may require the use of lower-speed operation.
Signed-off-by Eric Nelson <[email protected]>
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140929/301c63b1/attachment.pgp>
PATCH 1/1 usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
Quoted 10 lines · Felipe Balbi
Quoted 7 lines · Eric Nelson
Force full-speed (12 Mbit/s) operation if
CONFIG_USB_GADGET_DUALSPEEDis not defined.The controller is capable of high-speed (480 Mbit/s) operation, but some designs may require the use of lower-speed operation.
Signed-off-by Eric Nelson <[email protected]>Reviewed-by Felipe Balbi <[email protected]>
This looks good indeed
Best regards,
Marek Vasut
PATCH 1/1 usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
Thanks Marek and Felipe,
Quoted 8 lines · Marek Vasut
Quoted 7 lines · Felipe Balbi
Quoted 6 lines · Eric Nelson
Force full-speed (12 Mbit/s) operation if
CONFIG_USB_GADGET_DUALSPEEDis not defined.The controller is capable of high-speed (480 Mbit/s) operation, but some designs may require the use of lower-speed operation.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Eric Nelson <[email protected]>Reviewed-by Felipe Balbi <[email protected]>Acked-by Marek Vasut <[email protected]>This looks good indeed
We've found that it comes in handy, especially in prototypes of SOM carrier boards, where the USB signals tend to take some twisty routes.
Regards,
Eric
Marek Vasut
AppliedPATCH 1/1 usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
In reply to Eric NelsonQuoted 10 lines · Eric Nelson
Force full-speed (12 Mbit/s) operation if
CONFIG_USB_GADGET_DUALSPEEDis not defined.The controller is capable of high-speed (480 Mbit/s) operation, but some designs may require the use of lower-speed operation.
Signed-off-by Eric Nelson <[email protected]>---
V2 uses PFSC constant,setbits_le32, and expands commit message V3 removes restriction on i.MX6 and extraneous declaration
Applied, thanks.
Best regards,
Marek Vasut