Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1885660imu; Wed, 28 Nov 2018 17:21:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/XByknGkMN1L9erPLCU/6A6i9SD6b/YoW2Yq8ZRXyKKtQt6iSbP2WU9YCL8YF9dHnb2RfOM X-Received: by 2002:a17:902:7d82:: with SMTP id a2mr4642111plm.163.1543454519506; Wed, 28 Nov 2018 17:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543454519; cv=none; d=google.com; s=arc-20160816; b=XAGRA6hrCALe5FglrYnP8kgWotVLi+9W/8nS9GoHd9LZvFgWTOA1+TxBSeG3huwDQc UqqwgtPHYE/V9pyYKMSec88MNHM9iT6RR1AdHh3K2MNSi4zCa31LV5IgeHeSku52LjtU 17LPLiQPgPknNekx5TcpVhxQNk3JuvB75MjWg7fyqnLFvaHzFo8dGzorFlLllKxdYTwj F775VR6gMhwEJeL9J4xSkoXhUWAXLtP5yzTDhlNPDGV28cKNJ1aQ52YuHIxIHQw7CygH hf/Y2Qr8Tk5+Cf/wAkVlNN9uxDCyeHLLdFKbkAJwF6zLLR+CJMKrLw9Xr3l6CcwoE9tB vbQg== 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=0xeZCQx8Bek24GNSlNmyGJrjGq152qs+3Ax4KuvAKhk=; b=mU346usv8B7CosSjVRviwyq3bDGSwly/9GJwBEZibOuxwSgjBNorwzEI0kwiMbiv2B R8eUEWEohBb9xoBbAMACvHrH5G+cdpg/1KCEmjz80XRgohar0oCcJpE7GbieyyCP7uab V4KkqeId0I8MMjH4N60shT6O7AFqu89aC47M5lfsBo9D0xPOlftdi1Am0Ao0RavzdGm0 K2m0dpII3+FiyHTzFFaLaHDdRe+9uJfp2FXymi0m7AK0UgpazvK5TxlvYQhzEINXEFe7 uAbOnr1mX/+lBBplZqacKyLbqJdUwmZSNVG2Zrin00cIHeWXX6YBdWfqsGI+c87fl73K eflQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Ci8VZ6vE; 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 n34si294145pld.381.2018.11.28.17.21.44; Wed, 28 Nov 2018 17:21:59 -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=Ci8VZ6vE; 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 S1727160AbeK2MYm (ORCPT + 99 others); Thu, 29 Nov 2018 07:24:42 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45130 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726954AbeK2MYm (ORCPT ); Thu, 29 Nov 2018 07:24:42 -0500 Received: by mail-pf1-f194.google.com with SMTP id g62so136179pfd.12 for ; Wed, 28 Nov 2018 17:21:08 -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=0xeZCQx8Bek24GNSlNmyGJrjGq152qs+3Ax4KuvAKhk=; b=Ci8VZ6vEoWKGziFNYyGMj5Z80tkIQEcJURY9V48gh8VY4r7DKqTaaX8es6gy841viv BDjOeOWvKD78wilGiiArv3dF59uvFXH4wWGoEpQJ2yo7HdvSwQ18TicrNGvG0Jhm5sv4 WEfSfBVl0WpIAVIoHjNRU6xe8TeE98/w6QPWc= 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=0xeZCQx8Bek24GNSlNmyGJrjGq152qs+3Ax4KuvAKhk=; b=Ya3WcTJig12Ls8ezJyk7/duObLYDJy+o3WzmaLxndl8f6W2OsS7zA76SdpPN+xA+6b dxvQA/7wfP6t/LYfVSw+PPQZlC+wjRr1oj7x0O7EzgI4egVhufjgd2OYW4WDu3jldW2z IgTeJzICRLiiwvy9JfD8rXihyfczSpSs+GXkp+5+yrS0htuh0Gh6D8JOwtDfW96aTQcW GnOVWupD8qFWR1edOPKfao8WiGMh52D0xGedTHDxWX25YdSw/o/Shc0pBwLUnCZnGwJP jo4NJOQjRadkrXcn+E6BNcbGpdGaDfVrv8gs07xm/w/c6ejmXto10N75rOzhF0KWvGrP sMhg== X-Gm-Message-State: AA+aEWbTBODqJFrODOGnkgpnBGzn7VdTLPSpw+324yBZTL5VoqDdT2T5 n4mLLzvy/gicozAmsJYD/DZ3uYxiO2rIy/p1uT04ng== X-Received: by 2002:a63:6645:: with SMTP id a66mr34529994pgc.390.1543454467697; Wed, 28 Nov 2018 17:21:07 -0800 (PST) MIME-Version: 1.0 References: <20181128092953.41541-1-hsinyi@chromium.org> <20181128095358.42498-1-hsinyi@chromium.org> In-Reply-To: <20181128095358.42498-1-hsinyi@chromium.org> From: Nicolas Boichat Date: Thu, 29 Nov 2018 09:20:56 +0800 Message-ID: Subject: Re: [V3] usb/mtu3: power down device ip at setup To: Hsin-Yi Wang Cc: linux-arm Mailing List , chunfeng.yun@mediatek.com, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-mediatek@lists.infradead.org, lkml 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 FYI, the subject line should be [PATCH v3] (not just [V3]) On Wed, Nov 28, 2018 at 5:54 PM 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 > --- Next time, add a changelog here (e.g. changes from v1: - ...). > drivers/usb/mtu3/mtu3_plat.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c > index 46551f6d16fd..792c420fd4ad 100644 > --- a/drivers/usb/mtu3/mtu3_plat.c > +++ b/drivers/usb/mtu3/mtu3_plat.c > @@ -200,6 +200,13 @@ 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 maybe poweron in LK/BROM stage before enter kernel stage; I'd replace LK with a more generic "firmware" term. e.g. "device ip may be powered on in firmware/BROM stage before entering kernel stage;" > + * power down device ip, otherwise ip-sleep will fail when works as host s/works/working/ > + * 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 */ > -- > 2.18.1 > Thanks.