]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: musb: add reset hook to platform ops
authorDaniel Mack <zonque@gmail.com>
Wed, 2 Apr 2014 11:58:27 +0000 (13:58 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 21 Apr 2014 19:07:28 +0000 (14:07 -0500)
Babble interrupts require us to reset the DSPS glue layer. In order to
handle all other recovery tasks independently, add a new hook for
platform-specific implementations of the actual reset.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.h

index 7083e82776ff63012e3de51fda1b50484808f40c..5514e4c82932c5e558c3c32b3a03494d8d9d73df 100644 (file)
@@ -192,6 +192,7 @@ struct musb_platform_ops {
 
        int     (*set_mode)(struct musb *musb, u8 mode);
        void    (*try_idle)(struct musb *musb, unsigned long timeout);
+       void    (*reset)(struct musb *musb);
 
        int     (*vbus_status)(struct musb *musb);
        void    (*set_vbus)(struct musb *musb, int on);
@@ -552,6 +553,12 @@ static inline void musb_platform_try_idle(struct musb *musb,
                musb->ops->try_idle(musb, timeout);
 }
 
+static inline void musb_platform_reset(struct musb *musb)
+{
+       if (musb->ops->reset)
+               musb->ops->reset(musb);
+}
+
 static inline int musb_platform_get_vbus_status(struct musb *musb)
 {
        if (!musb->ops->vbus_status)