diff options
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, |