Hi, On Thu, Apr 04, 2013 at 09:50:11PM +0200, Daniel Mack wrote: > diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c > index d564580..d298be7 100644 > --- a/drivers/usb/musb/musb_host.c > +++ b/drivers/usb/musb/musb_host.c > @@ -2649,6 +2649,27 @@ void musb_host_free(struct musb *musb) > usb_put_hcd(musb->hcd); > } > > +int musb_host_setup(struct musb *musb, int power_budget) > +{ > + int ret; > + struct usb_hcd *hcd = musb->hcd; > + > + MUSB_HST_MODE(musb); > + musb->xceiv->otg->default_a = 1; > + musb->xceiv->state = OTG_STATE_A_IDLE; > + > + otg_set_host(musb->xceiv->otg, &hcd->self); you don't want to do these by default. You might screw things up for OTG builds where you *must* start in b_idle state. > + hcd->self.otg_port = 1; > + musb->xceiv->otg->host = &hcd->self; > + hcd->power_budget = 2 * (power_budget ? : 250); not sure you should default to 500mA budget. you might burn some boards which aren't passing proper power_budget here. -- balbi
Attachment:
signature.asc
Description: Digital signature