[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1543398069.32173.112.camel@mhfsdcap03>
Date: Wed, 28 Nov 2018 17:41:09 +0800
From: Chunfeng Yun <chunfeng.yun@...iatek.com>
To: "Hsin-Yi, Wang" <hsinyi@...omium.org>
CC: <linux-arm-kernel@...ts.infradead.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-usb@...r.kernel.org>, <linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [V2] usb/mtu3: power down device ip at setup
Hi Hsin-Yi,
On Wed, 2018-11-28 at 17:29 +0800, Hsin-Yi, Wang wrote:
> Originally, when dr_mode is USB_DR_MODE_HOST, it didn't power down device ip,
> so host ip sleep will fail at ssusb_host_disable.
>
> Power down device ip at ssusb_host_setup.
need modify it, not in ssusb_host_setup now
>
>
> Signed-off-by: Hsin-Yi, Wang <hsinyi@...omium.org>
> ---
> drivers/usb/mtu3/mtu3_plat.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
> index 46551f6d16fd..cdef66141e20 100644
> --- a/drivers/usb/mtu3/mtu3_plat.c
> +++ b/drivers/usb/mtu3/mtu3_plat.c
> @@ -200,6 +200,12 @@ static void ssusb_ip_sw_reset(struct ssusb_mtk *ssusb)
> mtu3_setbits(ssusb->ippc_base, U3D_SSUSB_IP_PW_CTRL0, SSUSB_IP_SW_RST);
> udelay(1);
> mtu3_clrbits(ssusb->ippc_base, U3D_SSUSB_IP_PW_CTRL0, SSUSB_IP_SW_RST);
> +
> + /*
> + * device ip is default power-on in fact
change as: device ip maybe poweron in LK/BROM stage before enter kernel
stage;
> + * power down device ip, otherwise ip-sleep will fail
power down device ip, otherwise ip-sleep will fail when works as host
only mode
> + */
> + mtu3_setbits(ssusb->ippc_base, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN);
> }
>
> /* ignore the error if the clock does not exist */
Thanks a lot
Powered by blists - more mailing lists