On Wed, May 29, 2013 at 06:37:02PM +0530, Ravi Babu wrote: > Added musb_restart() API, used for restart of the musb controller by > the glue layer, when there is babble condition occured on the bus. > > During babble condition, the musb controller will remove the session > and no longer in host-mode. As part of recovery this API can be used > to restart the musb controller. > > Signed-off-by: Ravi Babu <ravibabu@xxxxxx> > --- > drivers/usb/musb/musb_core.c | 24 ++++++++++++++++++++++++ > drivers/usb/musb/musb_core.h | 1 + > 2 files changed, 25 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c > index 37a261a..ab6fa39 100644 > --- a/drivers/usb/musb/musb_core.c > +++ b/drivers/usb/musb/musb_core.c > @@ -1373,6 +1373,30 @@ static int ep_config_from_hw(struct musb *musb) > return 0; > } > > +/* > + * musb_restart - restarts musb controller > + * @param musb the controller > + */ > +int musb_restart(struct musb *musb) > +{ > + int status = 0; > + > + /* during babble condition the musb controller removes the > + * session bit and the fifo table initialized value get changed > + */ > + if (musb->dyn_fifo) > + status = ep_config_from_table(musb); > + else > + status = ep_config_from_hw(musb); > + > + /* starts session */ > + if (!status) > + musb_start(musb); > + > + return status; > +} > +EXPORT_SYMBOL_GPL(musb_restart); this sort of function should never be exposed outside of MUSB core itself. This points to a big problem somewhere else. let me continue reading the other two patches... -- balbi
Attachment:
signature.asc
Description: Digital signature