summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_core.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-03-20 20:11:12 +0100
committerFelipe Balbi <balbi@ti.com>2015-05-26 10:46:54 -0500
commit6cc2af6d50204e8a1034ecd162378ceea22b09e8 (patch)
treeda62fadb96bb790ebbdc9ce0b1fbe7fbcaf4a2f3 /drivers/usb/musb/musb_core.h
parent0cb74b3dc45a5448161eb481d4709cdda2a889fd (diff)
usb: musb: Make busctl_offset an io-op rather then a define
The Allwinner (sunxi) implementation of the musb has its busctl registers indexed by the MUSB_INDEX register rather then in a flat address space. This commit turns MUSB_BUSCTL_OFFSET from a macro into an io-op which can be overridden from the platform ops. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.h')
-rw-r--r--drivers/usb/musb/musb_core.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index b8372f6006e3..4b886d0f6bdf 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -67,7 +67,6 @@ struct musb_ep;
#include "musb_dma.h"
#include "musb_io.h"
-#include "musb_regs.h"
#include "musb_gadget.h"
#include <linux/usb/hcd.h>
@@ -191,6 +190,7 @@ struct musb_platform_ops {
void (*ep_select)(void __iomem *mbase, u8 epnum);
u16 fifo_mode;
u32 (*fifo_offset)(u8 epnum);
+ u32 (*busctl_offset)(u8 epnum, u16 offset);
u8 (*readb)(const void __iomem *addr, unsigned offset);
void (*writeb)(void __iomem *addr, unsigned offset, u8 data);
u16 (*readw)(const void __iomem *addr, unsigned offset);
@@ -444,6 +444,9 @@ struct musb {
#endif
};
+/* This must be included after struct musb is defined */
+#include "musb_regs.h"
+
static inline struct musb *gadget_to_musb(struct usb_gadget *g)
{
return container_of(g, struct musb, g);