Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp929677imu; Wed, 28 Nov 2018 01:42:31 -0800 (PST) X-Google-Smtp-Source: AJdET5ep+hnCNIS+gq+sQ0KpY/xR9o4716pZSLbRZFgBfsaXdIjb0oWhFsP3v1PAwcDwCbLSnumL X-Received: by 2002:a62:b2c3:: with SMTP id z64mr36378129pfl.120.1543398151768; Wed, 28 Nov 2018 01:42:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543398151; cv=none; d=google.com; s=arc-20160816; b=yNXZwLzzotop8zFnR8kq/7yO600XZP6DmUDYt9CATU3vl9WJbbw3WAFiYu7EXFqBlW uKC4hhGnjA81v18yf4UXsgjOE8mbCjlBeHUNpyI+wD0vROZgRIGTVVdEF6yHt96AicQb CEDAHnCIO3LYyLhImdcWOV9vDegr5UKrRY7JXMDqiuVhie1yCjRMIQ4Qs/Is14XsXsB8 kCZlPOR0xXRLCSUtFhPRo4JflIj1kIXtwMrweNKgqZvBjtECyOBZUEXtx0fU+zR7FvED TaosCkXjvFCb+TdhnrsKm4N7k1xWoDdXNx7H906UzKBdHnZJi9YAiBcvibMqcxztxels Fr3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=gWC5P9csbhl2I29KLjHoFkvSpcebDEGKTZXMB1XOEdo=; b=YoKmqpRf1XY71HbdVeEIVxY5dwSUTXq5EzJWOpHquSnN3p4wVtUapMPIMEv/wRyuuT iHBnZgHXteSPsx/TRbYZAKrPBRmALhToc5+LbpvchVs6cjhImAnZUNrfx3UlT9UN23p+ mdrT7Rp5YPl5aoSkG7XuukOcPaStN1Dma2nlgCiKMQp06FYkB4X47Qouf1b5Hu0KT9Xp MaAmQdyJN/+F+K2rT/FK4DZbIpg7ZYkp7RGlb6riRBsorBl+YIOJdNfV1ROSuX2l/NXu goxR0djaDpazrH/s0TXiKFKUgEKe1AluvrrF/SOf1mXB9ImWm08a4hDvDnbVs1BpWaFp totg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si6719358pgt.464.2018.11.28.01.42.16; Wed, 28 Nov 2018 01:42:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728190AbeK1Ume (ORCPT + 99 others); Wed, 28 Nov 2018 15:42:34 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:2257 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727541AbeK1Ume (ORCPT ); Wed, 28 Nov 2018 15:42:34 -0500 X-UUID: 581355e028a84017a5365610883681fa-20181128 X-UUID: 581355e028a84017a5365610883681fa-20181128 Received: from mtkcas34.mediatek.inc [(172.27.4.250)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 2052448691; Wed, 28 Nov 2018 17:41:12 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS33DR.mediatek.inc (172.27.6.106) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 28 Nov 2018 17:41:10 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 28 Nov 2018 17:41:09 +0800 Message-ID: <1543398069.32173.112.camel@mhfsdcap03> Subject: Re: [V2] usb/mtu3: power down device ip at setup From: Chunfeng Yun To: "Hsin-Yi, Wang" CC: , Greg Kroah-Hartman , , , Date: Wed, 28 Nov 2018 17:41:09 +0800 In-Reply-To: <20181128092953.41541-1-hsinyi@chromium.org> References: <20181128060412.630-1-hsinyi@chromium.org> <20181128092953.41541-1-hsinyi@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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