usb: musb: set target address for non-multipoint devices
Subsystems (2)
PATCH 1/1 usb: musb: set target address for non-multipoint devices
From: Bryan Wu <[email protected]>
--- drivers/usb/musb/musb_hcd.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/usb/musb/musb_hcd.c +7 -0
@@ -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; }
Signature · 1 line
1.7.2
PATCH 1/1 usb: musb: set target address for non-multipoint devices
Quoted 14 lines · Mike Frysinger
From: Bryan Wu <[email protected]>
Signed-off-by Bryan Wu <[email protected]>Signed-off-by Cliff Cai <[email protected]>Signed-off-by Mike Frysinger <[email protected]>--- drivers/usb/musb/musb_hcd.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)drivers/usb/musb/musb_hcd.c +0
-0
drivers/usb/musb/musb_hcd.c int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer, · line 924
Quoted 8 lines
drivers/usb/musb/musb_hcd.c +5
-0@@ -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);
FAddr is a 8-bit regisrer, isn't it?
WBR, Sergei
PATCH 1/1 usb: musb: set target address for non-multipoint devices
Quoted 14 lines · Sergei Shtylyov
drivers/usb/musb/musb_hcd.c int submit_control_msg(struct usb_device *dev, · line 924
Quoted 11 lines · Mike Frysinger
drivers/usb/musb/musb_hcd.c +5
-0@@ -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);? FAddr is a 8-bit regisrer, isn't it?
on Blackfin systems, it is 16bit ... i'll have to double check to see what the hardware does with an 8bit access. i see there are other places in the code where 8bit is already being done, so those might need to be addressed as well ...
-mike
PATCH 1/1 usb: musb: set target address for non-multipoint devices
Quoted 16 lines · Mike Frysinger
Quoted 14 lines · Sergei Shtylyov
drivers/usb/musb/musb_hcd.c int submit_control_msg(struct usb_device *dev, · line 924
Quoted 11 lines · Mike Frysinger
drivers/usb/musb/musb_hcd.c +5
-0@@ -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);? FAddr is a 8-bit regisrer, isn't it?
Quoted 4 lines
on Blackfin systems, it is 16bit ... i'll have to double check to see what the hardware does with an 8bit access. ?i see there are other places in the code where 8bit is already being done, so those might need to be addressed as well ...
yeah, Blackfin hardware likes to reject 8bit accesses to this mmr. although, i just remembered that in the musb code only, we specifically rewrite all readb/writeb to readw/writew for Blackfin systems. so i'll change this patch to writeb as you suggested. -mike
PATCH v2 1/1 usb: musb: set target address for non-multipoint devices
In reply to Mike FrysingerFrom: Bryan Wu <[email protected]>
---
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(-)
drivers/usb/musb/musb_hcd.c +7 -0
@@ -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; }
Signature · 1 line
1.7.2
PATCH v2 1/1 usb: musb: set target address for non-multipoint devices
Hi,
2010/8/10 Mike Frysinger <[email protected]>:
Quoted 9 lines
From: Bryan Wu <[email protected]>
Signed-off-by Bryan Wu <[email protected]>Signed-off-by Cliff Cai <[email protected]>Signed-off-by Mike Frysinger <[email protected]>---
v2
? ? ? ?- use writeb instead of writew as pointed out by Sergei Shtylyov
Applied to u-boot-usb.
Thanks.
Remy