Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2098019ybl; Thu, 30 Jan 2020 11:19:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwwCjQBynqpcAxqpjWFGEYEi1Gl5kbImhuKhMk90K14EyC06DgDNaZmmxd41u14FfRb4yWf X-Received: by 2002:aca:d887:: with SMTP id p129mr3845662oig.51.1580411946855; Thu, 30 Jan 2020 11:19:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580411946; cv=none; d=google.com; s=arc-20160816; b=OENAqHH0G4DNdxf4B3ANlwTqP6TD+1ZMfD/+MEJcnMCRd5KO8gQJb/jm4dni4Kd7SI lOG4UmfIJ8ctFVCSUNrygxKUErPVOBBINoqCbh2vHbGoWVk3tDbLQIzCSmGEpgW3hJAs lXvIAsniXtia7WSJQQMeE0lOpsr5peGLPiDSePEbsv7ri8h/TfANkx6X9ZzTer4EUmdK 8kD8nOl2BxwIzzb0qMlATLFuU3ehjHKwOsodQ33rfHkCRaujFpdBqBvx4lQ+tibYjRKw RHxf1Zn5nBaW9btiyt7/xH9v8n+a1HkD6kwvcVcfcerePQZhs5TLokFtiPKGb8diFW8z VTjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+5rlCqXMRm+6NQL3zGHCToiPb4w+DFF95Ro8iwU3auo=; b=SO/W9bDGtPTN5s68MwdAlyUDDP1p9jlKtOvdWD93C5YSVNjIoIK/twZwISpdDUSQnb i3zGEtuxDwizKxLstFWlTpvjgAuog1DyxK0rwhdqT8bwvVF9u+am41xIO4BUMuxqQAc0 /gRPJZI1Q0fN0YwqWVApP/YAFXUSt83tZLcYW6rd3vxhXPgsQAx7HZ0EQYJtPQ+qkB0w RD5GIM2VPtebj/OBp2WDp12SP3QN6navmgm0YESRbdoCRJjb9cTbdn2Bv3SJ8YChTn4y ukWvnW8ubCLTaVhqAihxS9PSmlckQzMpqQiHDVTl35Iqm6YXpMhQXaa++oHIh7iGamS7 u8Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qYpMWZ5S; 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 r8si3546622ota.288.2020.01.30.11.18.55; Thu, 30 Jan 2020 11:19:06 -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=@kernel.org header.s=default header.b=qYpMWZ5S; 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 S1731010AbgA3SpW (ORCPT + 99 others); Thu, 30 Jan 2020 13:45:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:54876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731000AbgA3SpT (ORCPT ); Thu, 30 Jan 2020 13:45:19 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 61C892082E; Thu, 30 Jan 2020 18:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580409917; bh=tgiIWyaWgYWNqXLGQPohVSA04eXZ04wHRLN/JX73TAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qYpMWZ5SLDhwZilVj6iluF4pXPqtNoXnwwB4v/M/age03v35UzaP6mjXfksbu0yaK CEnl+zNVjdtg26yc/pa0XvhAYdCCxV5awb7Qt2J6hOvmY+WqfTvpel8/7fH+ftQgd9 smSW9Dpz7TVopdBsK7M/V8Yao3EHV9sPeal3Wysw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tony Lindgren , Sasha Levin Subject: [PATCH 5.4 083/110] bus: ti-sysc: Handle mstandby quirk and use it for musb Date: Thu, 30 Jan 2020 19:38:59 +0100 Message-Id: <20200130183623.991569511@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200130183613.810054545@linuxfoundation.org> References: <20200130183613.810054545@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit 03856e928b0e1a1c274eece1dfe4330a362c37f3 ] We need swsup quirks for sidle and mstandby for musb to work properly. Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- drivers/bus/ti-sysc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index abbf281ee337b..44d4f4864ac2a 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -923,6 +923,9 @@ set_midle: return -EINVAL; } + if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY) + best_mode = SYSC_IDLE_NO; + reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift); reg |= best_mode << regbits->midle_shift; sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg); @@ -984,6 +987,9 @@ static int sysc_disable_module(struct device *dev) return ret; } + if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY) + best_mode = SYSC_IDLE_FORCE; + reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift); reg |= best_mode << regbits->midle_shift; sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg); @@ -1257,6 +1263,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { SYSC_QUIRK("gpu", 0x50000000, 0x14, -1, -1, 0x00010201, 0xffffffff, 0), SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -1, 0x40000000 , 0xffffffff, SYSC_MODULE_QUIRK_SGX), + SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050, + 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY), SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0, SYSC_MODULE_QUIRK_WDT), /* Watchdog on am3 and am4 */ @@ -1315,8 +1323,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000008, 0xffffffff, 0), SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff, 0), SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -1, 0x50700101, 0xffffffff, 0), - SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050, - 0xffffffff, 0), SYSC_QUIRK("vfpe", 0, 0, 0x104, -1, 0x4d001200, 0xffffffff, 0), #endif }; -- 2.20.1