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

Mike Frysinger vapier at gentoo.org
Tue Aug 10 00:41:12 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>
---
v2
	- use writeb instead of writew as pointed out by Sergei Shtylyov

 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..8a761df 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)
+		writeb(dev->devnum, &musbr->faddr);
+#endif
+
 	return len;
 }
 
-- 
1.7.2



More information about the U-Boot mailing list