diff options
author | Tony Lindgren <tony@atomide.com> | 2014-11-24 11:05:03 -0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-25 08:47:06 -0600 |
commit | d026e9c76aac3632af174cf02d5c94defa5e6026 (patch) | |
tree | 2eee0a3c62ae59c3e5a366f61172c7ff2b883a2a /drivers/usb/musb/tusb6010.c | |
parent | 1b40fc57a517878cf4c2e16ce29cc9a066dc1064 (diff) | |
download | lwn-d026e9c76aac3632af174cf02d5c94defa5e6026.tar.gz lwn-d026e9c76aac3632af174cf02d5c94defa5e6026.zip |
usb: musb: Change end point selection to use new IO access
This allows the endpoints to work when multiple MUSB glue
layers are built in.
Cc: Fabio Baltieri <fabio.baltieri@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Apelete Seketeli <apelete@seketeli.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/tusb6010.c')
-rw-r--r-- | drivers/usb/musb/tusb6010.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 16c4475e640c..3a5ffd575438 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -131,6 +131,17 @@ static u32 tusb_fifo_offset(u8 epnum) return 0x200 + (epnum * 0x20); } +static u32 tusb_ep_offset(u8 epnum, u16 offset) +{ + return 0x10 + offset; +} + +/* TUSB mapping: "flat" plus ep0 special cases */ +static void tusb_ep_select(void __iomem *mbase, u8 epnum) +{ + musb_writeb(mbase, MUSB_INDEX, epnum); +} + /* * TUSB6010 doesn't allow 8-bit access; 16-bit access is the minimum. */ @@ -1174,6 +1185,8 @@ static const struct musb_platform_ops tusb_ops = { .init = tusb_musb_init, .exit = tusb_musb_exit, + .ep_offset = tusb_ep_offset, + .ep_select = tusb_ep_select, .fifo_offset = tusb_fifo_offset, .readb = tusb_readb, .writeb = tusb_writeb, |