[U-Boot] [PATCH] usb: musb: set target address for non-multipoint devices

Mike Frysinger vapier at gentoo.org
Mon Aug 9 20:35:01 CEST 2010


From: Bryan Wu <bryan.wu at analog.com>

Signed-off-by: Bryan Wu <bryan.wu at analog.com>
Signed-off-by: Cliff Cai <cliff.cai at analog.com>
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 drivers/usb/musb/musb_hcd.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index dd2aa7f..abb84b2 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -917,6 +917,13 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 
 	dev->status = 0;
 	dev->act_len = len;
+
+#ifdef MUSB_NO_MULTIPOINT
+	/* Set device address to USB_FADDR register */
+	if (setup->request == USB_REQ_SET_ADDRESS)
+		writew(dev->devnum, &musbr->faddr);
+#endif
+
 	return len;
 }
 
-- 
1.7.2



More information about the U-Boot mailing list