Re: [PATCH 1/3] usb: musb: core: call init and shutdown for the usb phy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Jan 4, 2016 at 12:22 PM, Felipe Balbi <balbi@xxxxxx> wrote:
>
> Hi,
>
> Bin Liu <binmlist@xxxxxxxxx> writes:
>> Hi,
>>
>> On Fri, Dec 18, 2015 at 5:02 AM, Uwe Kleine-König
>> <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
>>> The phy's init routine must be called before it can be used. Do so in
>>> musb_init_controller and the matching shutdown in musb_remove.
>>>
>>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
>>> ---
>>> Note I'm not entirely sure this is the right place, but this made usb
>>> working on my omap3 machine here (at least somewhat, still fighting with
>>> the last details).
>>> ---
>>>  drivers/usb/musb/musb_core.c | 10 ++++++++++
>>>  1 file changed, 10 insertions(+)
>>>
>>> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
>>> index 2c624a10748d..ebb8a5455d2f 100644
>>> --- a/drivers/usb/musb/musb_core.c
>>> +++ b/drivers/usb/musb/musb_core.c
>>> @@ -2108,6 +2108,10 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
>>>
>>>         pm_runtime_get_sync(musb->controller);
>>>
>>> +       status = usb_phy_init(musb->xceiv);
>>> +       if (status < 0)
>>> +               goto err_usb_phy_init;
>>> +
>>
>> Please check the comment around Line 2000, which states
>> musb_platform_init() should call for phy init. So the glue driver
>> should handle phy init/shutdown, not the core. This patch will cause
>> the phy init to be called twice for those devices which already handle
>> phy control in the glue driver.
>
> I guess we need to change the glue at this point. Only dsps glue calls
> usb_phy_init(), which means all other glues are wrong. Instead of fixing
> them all, we can let musb-core handle it for the glues.

Yeah, make sense.

Regards,
-Bin.

>
> --
> balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux