Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp2222290ybm; Sun, 31 May 2020 12:44:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuNPmZZ5evgdlHHkIOs64akpWlXdEZr7JoNSFRvJfRqCswU3ktA7tGQPn57gY5i5kykcRn X-Received: by 2002:a17:907:9d3:: with SMTP id bx19mr3897595ejc.461.1590954254024; Sun, 31 May 2020 12:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590954254; cv=none; d=google.com; s=arc-20160816; b=cpqxoMrxlfQg2DI71+Vahf2LD+CGtCiAWq2zeynbgdMb9ODOEwjVwnLD7HMmA/PkPW VGiJDxVYVmnRHPEl5BwaGOuMLNuojBPM+KrAa7bBAnj7i7SPtjZg3E434X4F+thBryYt hp0ngLeI0/ieNXIyhqzISkaSgThw62HkagZLojEkboye9DTiJkI/CZ0T4w/DhCJnTEHF 2W2TcCQGpm7CfjDMysxD/9YtkdJhn0fGEj4xlHI/3a7lOCkUpC4gYxa5tI8RfAXn8IhB di20/+P+UAWlJFv8MDHb1LR6EiA3Bd8eXXMn3W13UTMq/DWxknjr28FkmKX2ezrzZJmi O9+w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Kh5fxQ3EX4V4Avy4AL4BqL53DX5ezW6rsgXb+KzWHGg=; b=j1RNiwG7VRkHLaB/WdQu6fwhyjQvp6VEhEjnnGi7CAjRfB1aYKQZyeE8KfVdBEG6TP +B+/M998DN4tmPK47vx3JfgkW0gwRLE0OFv+A1OP9ISqZVb20wDjk1jK+o3RD4SYCW++ CyzkYUZpYA2VLrkT2R0TE/JOpTR3NZVA47GSqOWnVe504R2D8yLAtl4CKTMhCFeHj3wd MD91ZFLft29wICNrHDOsg2v5ANJOZU+nwxXZ53KkKi1VcCtgFh4RVVg2QoZguFitVTKb S0nhCSTjSB4a8fZzbu/cJ00RjZHoT4hwHbZeFWRLHQzdQo5N4Nps3TLd1nJ1vAKPG+oe gQjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si9337345eji.141.2020.05.31.12.43.51; Sun, 31 May 2020 12:44:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728431AbgEaTk2 (ORCPT + 99 others); Sun, 31 May 2020 15:40:28 -0400 Received: from muru.com ([72.249.23.125]:56414 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728355AbgEaTkO (ORCPT ); Sun, 31 May 2020 15:40:14 -0400 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 6B22E814F; Sun, 31 May 2020 19:41:04 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Cc: "Andrew F . Davis" , Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Grygorii Strashko , Keerthy , Nishanth Menon , Peter Ujfalusi , Roger Quadros , Suman Anna , Tero Kristo , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Laurent Pinchart , Tomi Valkeinen , dri-devel@lists.freedesktop.org Subject: [PATCH 3/5] bus: ti-sysc: Ignore clockactivity unless specified as a quirk Date: Sun, 31 May 2020 12:39:39 -0700 Message-Id: <20200531193941.13179-4-tony@atomide.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200531193941.13179-1-tony@atomide.com> References: <20200531193941.13179-1-tony@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We must ignore the clockactivity bit for most modules and not set it unless specified for the module with SYSC_QUIRK_USE_CLOCKACT. Otherwise the interface clock can be automatically gated constantly causing unexpected performance issues. Fixes: ae9ae12e9daa ("bus: ti-sysc: Handle clockactivity for enable and disable") Cc: Laurent Pinchart Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren --- drivers/bus/ti-sysc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -989,10 +989,13 @@ static int sysc_enable_module(struct device *dev) regbits = ddata->cap->regbits; reg = sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]); - /* Set CLOCKACTIVITY, we only use it for ick */ + /* + * Set CLOCKACTIVITY, we only use it for ick. And we only configure it + * based on the SYSC_QUIRK_USE_CLOCKACT flag, not based on the hardware + * capabilities. See the old HWMOD_SET_DEFAULT_CLOCKACT flag. + */ if (regbits->clkact_shift >= 0 && - (ddata->cfg.quirks & SYSC_QUIRK_USE_CLOCKACT || - ddata->cfg.sysc_val & BIT(regbits->clkact_shift))) + (ddata->cfg.quirks & SYSC_QUIRK_USE_CLOCKACT)) reg |= SYSC_CLOCACT_ICK << regbits->clkact_shift; /* Set SIDLE mode */ -- 2.26.2