aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorLi Yang <leoli@freescale.com>2007-04-28 02:07:32 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-23 02:45:49 -0400
commitfcbd963912acc0c5d51bb27f8654f2a91fcff322 (patch)
treeed3f48b5a66db31ffbbf91f3d8ad16dd7fa17d04 /drivers/usb/gadget
parent8d062b9a3516c6fbcf749bcc864fdb8b3def1caa (diff)
USB: fsl_usb2_udc: Fix UMTI_WIDE support and a compile warning
Change PORT_WIDTH bit for UMTI_WIDE mode and fix a compile warning introduced in last revision. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c
index 157054ea3978..3ca2b3159f00 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -228,13 +228,15 @@ static int dr_controller_setup(struct fsl_udc *udc)
228 228
229 /* Config PHY interface */ 229 /* Config PHY interface */
230 portctrl = fsl_readl(&dr_regs->portsc1); 230 portctrl = fsl_readl(&dr_regs->portsc1);
231 portctrl &= ~PORTSCX_PHY_TYPE_SEL; 231 portctrl &= ~(PORTSCX_PHY_TYPE_SEL & PORTSCX_PORT_WIDTH);
232 switch (udc->phy_mode) { 232 switch (udc->phy_mode) {
233 case FSL_USB2_PHY_ULPI: 233 case FSL_USB2_PHY_ULPI:
234 portctrl |= PORTSCX_PTS_ULPI; 234 portctrl |= PORTSCX_PTS_ULPI;
235 break; 235 break;
236 case FSL_USB2_PHY_UTMI:
237 case FSL_USB2_PHY_UTMI_WIDE: 236 case FSL_USB2_PHY_UTMI_WIDE:
237 portctrl |= PORTSCX_PTW_16BIT;
238 /* fall through */
239 case FSL_USB2_PHY_UTMI:
238 portctrl |= PORTSCX_PTS_UTMI; 240 portctrl |= PORTSCX_PTS_UTMI;
239 break; 241 break;
240 case FSL_USB2_PHY_SERIAL: 242 case FSL_USB2_PHY_SERIAL:
@@ -625,7 +627,7 @@ static void fsl_free_buffer(struct usb_ep *_ep, void *buf,
625 struct fsl_ep *ep; 627 struct fsl_ep *ep;
626 628
627 if (!_ep) 629 if (!_ep)
628 return NULL; 630 return;
629 631
630 ep = container_of(_ep, struct fsl_ep, ep); 632 ep = container_of(_ep, struct fsl_ep, ep);
631 633