Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1588860ybv; Thu, 20 Feb 2020 23:50:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyhi6Lote9+mq44CF8p3HBzNa+g3WoS37CzL3crm1UkvScedLrdeki29qczrU4Kd2VAdxCz X-Received: by 2002:aca:50cd:: with SMTP id e196mr918078oib.178.1582271436887; Thu, 20 Feb 2020 23:50:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582271436; cv=none; d=google.com; s=arc-20160816; b=CEEUxF7iPiuOuclEWW1sw1zhYWyYw4AOYwpQCL2mWA4smSF0ZrQn9mI3s+rzam8Nns 5t/ybU1sfB3hINX/6+YHs5+DfMJ4QMDt4NkWcpAs4L3fwz40yyERURnHQQK/BtxkTqSX rS9XYILiKen/fE9wGCGCovpIJCIyT0XgKgn4Ocmxsluv7GeohxqjFZ/V6MxWZ/ZLDOBg CT+vQytYszkVqavnuNIvo8qfSFNRcgf4uAY7it1yFZX1Yn5OaZbRg0OOY6Y0sJFr+ZiM 3i5DKq6PHxJbtsAa+eL9hfrDoJFniR80U/NQKm32GuFeDroezvpcJaui81KoMgJdhF9e mm0w== 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=BM2HTTKvrz4YLqQ8OCd/AMbIF6b+hRK4gsSzLkYRDxw=; b=CTdewbQk1EA2E6mFZa24SsSGSwM7qNroDckuKexaEILrNEphlNWQ57zMcaUIvSXBw/ ijpsbxjUOpt/lTlclFajtBlUAXiwoBLrVwNVa0oSGyYYeaC10Kg8uug7i0BbMI+uzADj FdX7xBmLdrRcr6aLsLnxnGwDGvdFekpDO4e1EduQ+tQk5yfYsFygcoGpzAG5M4hY5qTA MrwX3VntJpD2Cbbyp2MbE/SuoizEPe/WIcp0p9PuOLbQ1Nlof3Y4+R2jsIWLrayH99JZ xwlPtakIMf5lq9jqERubAR5wICutbeJVvsTTU3gCpbM3tb5ULffADHRbv5GSqffvCM5z oZIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=awJuXkvM; 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 q17si1067392otk.321.2020.02.20.23.50.24; Thu, 20 Feb 2020 23:50:36 -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=awJuXkvM; 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 S1729257AbgBUHtQ (ORCPT + 99 others); Fri, 21 Feb 2020 02:49:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:45602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728295AbgBUHtM (ORCPT ); Fri, 21 Feb 2020 02:49:12 -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 DDCA8222C4; Fri, 21 Feb 2020 07:49:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582271352; bh=vAcka8fHr6mFiJZkIqQNpXN3P/qJC9ZOA4MvldSnGKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=awJuXkvMRMSasY/df93VCZ6HaGq//N17FopRnVbMp8PaEHTP37EzNrQZlG/sJoSwG /v0FhKHLkI7PXow5QKiI2ujVd+i+fHI/DxWbOAm9cMW+6t/qeyEcHyfdZlkyRbgxwZ T84mKdyyLORUtklvGxnc6qeJVdSJDq4BpSm/9Jmw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Keerthy , Roger Quadros , Tero Kristo , Tony Lindgren , Sasha Levin Subject: [PATCH 5.5 133/399] bus: ti-sysc: Implement quirk handling for CLKDM_NOAUTO Date: Fri, 21 Feb 2020 08:37:38 +0100 Message-Id: <20200221072415.398762898@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072402.315346745@linuxfoundation.org> References: <20200221072402.315346745@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 94f6345712b37e4bb23cb265ce4c65b9d177e75a ] For dra7 dcan and dwc3 instances we need to block clockdomain autoidle. Let's do this with CLKDM_NOAUTO quirk flag and enable it for dcan and dwc3. Cc: Keerthy Cc: Roger Quadros Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- drivers/bus/ti-sysc.c | 10 ++++++++-- include/linux/platform_data/ti-sysc.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index ccb44fe790a71..3d79b074f9581 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -479,7 +479,7 @@ static void sysc_clkdm_deny_idle(struct sysc *ddata) { struct ti_sysc_platform_data *pdata; - if (ddata->legacy_mode) + if (ddata->legacy_mode || (ddata->cfg.quirks & SYSC_QUIRK_CLKDM_NOAUTO)) return; pdata = dev_get_platdata(ddata->dev); @@ -491,7 +491,7 @@ static void sysc_clkdm_allow_idle(struct sysc *ddata) { struct ti_sysc_platform_data *pdata; - if (ddata->legacy_mode) + if (ddata->legacy_mode || (ddata->cfg.quirks & SYSC_QUIRK_CLKDM_NOAUTO)) return; pdata = dev_get_platdata(ddata->dev); @@ -1251,6 +1251,12 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { /* Quirks that need to be set based on detected module */ SYSC_QUIRK("aess", 0, 0, 0x10, -1, 0x40000000, 0xffffffff, SYSC_MODULE_QUIRK_AESS), + SYSC_QUIRK("dcan", 0x48480000, 0x20, -1, -1, 0xa3170504, 0xffffffff, + SYSC_QUIRK_CLKDM_NOAUTO), + SYSC_QUIRK("dwc3", 0x48880000, 0, 0x10, -1, 0x500a0200, 0xffffffff, + SYSC_QUIRK_CLKDM_NOAUTO), + SYSC_QUIRK("dwc3", 0x488c0000, 0, 0x10, -1, 0x500a0200, 0xffffffff, + SYSC_QUIRK_CLKDM_NOAUTO), SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff, SYSC_MODULE_QUIRK_HDQ1W), SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff, diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h index 8cfe570fdece6..2cbde6542849d 100644 --- a/include/linux/platform_data/ti-sysc.h +++ b/include/linux/platform_data/ti-sysc.h @@ -49,6 +49,7 @@ struct sysc_regbits { s8 emufree_shift; }; +#define SYSC_QUIRK_CLKDM_NOAUTO BIT(21) #define SYSC_QUIRK_FORCE_MSTANDBY BIT(20) #define SYSC_MODULE_QUIRK_AESS BIT(19) #define SYSC_MODULE_QUIRK_SGX BIT(18) -- 2.20.1