Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2157750imu; Wed, 28 Nov 2018 23:51:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/XsuRmoNEUFcdS0AgFqvGonWHaM3zqTT0jZ9TjoB6xJZ2cwIcQNMtguhuvnkEPrjZizJ+ax X-Received: by 2002:a63:134f:: with SMTP id 15mr363185pgt.19.1543477880114; Wed, 28 Nov 2018 23:51:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543477880; cv=none; d=google.com; s=arc-20160816; b=q+GpSHcKtjIxUE5giiPIMzN/TA2kuSSe8Hg17te+xbrZ6ix6mncHk1Z4DC7pgamvtE EsK2rNFUHoX8TRS8zn+sMRrlekGwYtG8DnTN0ATGeSqOglwXKvnyB4r5fhufyphktFOg W+B2i2KtC4d3MyEb+I7C9rTjskxmhDJjmDyR1TjR9Yr9NusexPV/YmAsLFdNV2TIpOlG 96dVThJaWKZB93vb3IpFWs3Ax6TLdpLI1/+VokRQBKcGFC3TTQCRddeklRoCn6NS1oNA /AqWWrYm8ezDruirrdMA/iBtEAJa4jJEZopWYR6fU8dbt+02OGEaskrav2G7ZlG11JvV kK8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cGTuw6SC+qgowATtO98R6LX6ASv+SO7GsR/WJmJuE8w=; b=mzow6K8BofGBJoXIF3CrRhOIUA+aCwkU0mB/7iHcqqPN6AqnkIsAG7LA1bmwbaEKxL NIPCkTIoqp6x3JEcpsG3IixETRwqCuGL7Ge3LTO0UlmvINH1/AnPqqQaMgUm619KyP2P ihxxMVvNSG56NlW1FTxRM+ACgPAKMgHPiFVRVuFh2Ri4HgK6wlhGjB1VHdtgrbHBL2y4 E6b80CL6zZHvDI88raH7cyoz3bKZDVWz0VxaG9pXDfCUQ1H7tuQU55r8zpKQoOs32r7+ vxP3YNLJ2GfD8B506tfZ/aXR8UzLxoa21AafYhvKYa6SWhAlCDmUyyY0Cwc7UX8PplkO Js/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=C26h3dAT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w6si1298086plp.429.2018.11.28.23.51.05; Wed, 28 Nov 2018 23:51:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=C26h3dAT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727490AbeK2Syo (ORCPT + 99 others); Thu, 29 Nov 2018 13:54:44 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:33930 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbeK2Syn (ORCPT ); Thu, 29 Nov 2018 13:54:43 -0500 Received: by mail-qt1-f195.google.com with SMTP id r14so1008656qtp.1 for ; Wed, 28 Nov 2018 23:50:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cGTuw6SC+qgowATtO98R6LX6ASv+SO7GsR/WJmJuE8w=; b=C26h3dATz1mWQhGhD+/dHtdoSPDvqLEgmK9qmZYdtRUpI1AvnhRB++lTqh57zCDr1i d2PZ80XT7+iPyfVDVz32+ugRjpvCGz0ClN1F0z54rV0yKL1mzw0dtfWs+L7QYrf0zWQC R7bN3uMeQBEZQdWFA7X8BWLoA3Z7sS1Cdf0n0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cGTuw6SC+qgowATtO98R6LX6ASv+SO7GsR/WJmJuE8w=; b=oY7OSK1wbi2kKrsMz9YCKVl1WjrG7NzbBCh5hnOG6HAWWFyriIszUiKQV1VcXVXIQD 616iVaXDe7a0l/DzKCTzvv/MIwvYTTzPjsmZLffw6Lo7EqqYL0aDjsKLeRhvWCAodGlQ /PyRH2OO9tsLI76XNsIg5v1FXcQToAH+rLZcsasxULofZByRmhI0TOIWOJHV3x1wuVlj y7dPtzigeRueT8hap5ZRLtSbZt3Txpu/9Vh4meEbrnAZ97mu0cOs45iZWmlhRCxfPqvt uuop/6evSD0QfOWSYToIHAlokzQRQ+bPM7p7X1AKS4vpM4nPhodgJ2fbOqbJRRCl0AmJ sing== X-Gm-Message-State: AA+aEWb28x85owZ3i13P2/OShgdoydWVF9llUeQzr+Kq0dzfns1iUJCD rcJyTprY5gKTxgy7fL0TRuUSqafsY+DUAEyP91J76w== X-Received: by 2002:a0c:b11a:: with SMTP id q26mr438548qvc.2.1543477815561; Wed, 28 Nov 2018 23:50:15 -0800 (PST) MIME-Version: 1.0 References: <20181128095358.42498-1-hsinyi@chromium.org> <20181129031627.45006-1-hsinyi@chromium.org> <1543472774.32173.114.camel@mhfsdcap03> In-Reply-To: <1543472774.32173.114.camel@mhfsdcap03> From: Hsin-Yi Wang Date: Thu, 29 Nov 2018 15:50:04 +0800 Message-ID: Subject: Re: [PATCH v4] usb/mtu3: power down device ip at setup To: chunfeng.yun@mediatek.com Cc: linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks! On Thu, Nov 29, 2018 at 2:26 PM Chunfeng Yun wrote: > > hi Hsin-Yi, > > On Thu, 2018-11-29 at 11:16 +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. > > > > Signed-off-by: Hsin-Yi, Wang > > --- > > ChangeLog: > > V3->V4: > > *update comment > > --- > > drivers/usb/mtu3/mtu3_plat.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c > > index 46551f6d16fd..e086630e41a9 100644 > > --- a/drivers/usb/mtu3/mtu3_plat.c > > +++ b/drivers/usb/mtu3/mtu3_plat.c > > @@ -200,6 +200,14 @@ 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 may be powered on in firmware/BROM stage before entering > > + * kernel stage; > > + * power down device ip, otherwise ip-sleep will fail when working 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 */ > > Acked-by: Chunfeng Yun > > Thanks a lot > > >