Hi,
* David Brownell <[EMAIL PROTECTED]> [060831 07:17]:
> Hi,
>
> Attached is the compressed version of a patch, against 2.6.18-rc4, with a
> driver
> for the "Mentor USB Highspeed Dual-Role Controller" (musb hdrc) silicon IP.
Here's an additional patch that fixes the ep register access for tusb6010.
Regards,
Tony
MUSB: Fix TUSB register access
TUSB uses non-flat register model, and also has TUSB specific
ep registers in addition to shared MUSB ep registers.
Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
--- a/drivers/usb/musb/musbdefs.h
+++ b/drivers/usb/musb/musbdefs.h
@@ -329,6 +329,10 @@ struct musb_hw_ep {
void __iomem *fifo;
void __iomem *regs;
+#ifdef CONFIG_USB_TUSB6010
+ void __iomem *conf;
+#endif
+
/* index in musb->aLocalEnd[] */
u8 bLocalEnd;
--- a/drivers/usb/musb/musbhdrc.h
+++ b/drivers/usb/musb/musbhdrc.h
@@ -108,8 +108,7 @@ #define MGC_FLAT_OFFSET(_bEnd, _bOffset)
#ifdef CONFIG_USB_TUSB6010
/* TUSB6010 EP0 configuration register is special */
#define MGC_TUSB_OFFSET(_bEnd, _bOffset) \
- (_bEnd ? (0x400 + (((_bEnd - 1) & 0xf) << 2) + (_bOffset)) : \
- ((_bEnd - 0x400) + TUSB_EP0_CONF + (_bOffset)))
+ (0x10 + _bOffset)
#include "tusb6010.h" /* needed "only" for TUSB_EP0_CONF */
#endif
--- a/drivers/usb/musb/plat_uds.c
+++ b/drivers/usb/musb/plat_uds.c
@@ -1127,6 +1127,10 @@ #endif
#ifdef CONFIG_USB_TUSB6010
hw_ep->fifo_async = pThis->async + 0x400 + MUSB_FIFO_OFFSET(i);
hw_ep->fifo_sync = pThis->sync + 0x400 + MUSB_FIFO_OFFSET(i);
+ if (i == 0)
+ hw_ep->conf = pBase - 0x400 + TUSB_EP0_CONF;
+ else
+ hw_ep->conf = pBase + 0x400 + (((i - 1) & 0xf) << 2);
#endif
hw_ep->regs = MGC_END_OFFSET(i, 0) + pBase;
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -34,7 +34,7 @@ #include "musbdefs.h"
void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *buf)
{
- void __iomem *ep_conf = hw_ep->regs;
+ void __iomem *ep_conf = hw_ep->conf;
void __iomem *fifo = hw_ep->fifo;
u8 epnum = hw_ep->bLocalEnd;
u8 *bufp = (u8 *)buf;
@@ -90,7 +90,7 @@ void musb_write_fifo(struct musb_hw_ep *
void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf)
{
- void __iomem *ep_conf = hw_ep->regs;
+ void __iomem *ep_conf = hw_ep->conf;
void __iomem *fifo = hw_ep->fifo;
u8 epnum = hw_ep->bLocalEnd;
u8 *bufp = (u8 *)buf;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel