Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2098789ybl; Thu, 30 Jan 2020 11:19:55 -0800 (PST) X-Google-Smtp-Source: APXvYqyl9vqRz0eEGr/oEy/zIO1YmgqnjdPCXGjlLxhgREaExtpzYe9FIdSCoxg3DJ87Fr5Xcrvs X-Received: by 2002:a9d:4801:: with SMTP id c1mr4897493otf.258.1580411995686; Thu, 30 Jan 2020 11:19:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580411995; cv=none; d=google.com; s=arc-20160816; b=rNhsxZAeIKhkgOBiG30M5n5qisWjoYcr8YlawrGUdI6FneoT8DOZ9iCDatGSwU3+sf 1gNdVfUIsvtx+zXm0E23jLm9S2wbYVJs/rqvTXEJ/eAwtz8lmOQmYe79x92sCoO38bhP qMFoY3Rj5sW+m736ruU7GoKUMsJI/HV8ExY8XzFghEaOrBff6JOtcNWAHkBwJu2/oGlG eGCy1HcbSeJRJ93DKZ1XODnYh8enff5LIziNiKQN9tfWaSVFK70a6IDiIPtWY5+xvwjP VzTG9/oT1O5f0YlhJGY1+Ww9eJ3zCgKAafaXtFKrw3tQKLRYdq/C3ioC4+VnsWwhVhPl sM6g== 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=I4u/kUuWUH8klgLUlEh8EdYwGcXyZPievGIFsEgx1+0=; b=E0IDKxDpMz3OBCVWLteIkI0yy4UoU+bX9ga/fBKkr4N6yYsaIiPi/0RVvHXoTU1eUY C/ugeCcT8hnz83rasTaqMqSHyykmjMgn9W6nPNBQI2cjY6qDgas2WglORIghK4PEYN0I 95eYC7H+1hb4L/q4Hj6YznPBJBN1nhjbxAZ9HCUtW06ROrJjiqIU/ZGp7sywHBlsUu+d zlLuckuqP4Wc+anPRSBsDbPn9/kWNpEGA7lUdmovwokXcTHHroLz8Hq5/25PU6LlEDiQ uPCJVWPLXk5Tw8Unx3DgFMwno5GWMQOl3P1nLik/QHrOeg3e23tZhAJGqODYeCBUur19 5kyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bqh1UWau; 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 a4si3362288otq.98.2020.01.30.11.19.43; Thu, 30 Jan 2020 11:19:55 -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=Bqh1UWau; 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 S1731228AbgA3Sqh (ORCPT + 99 others); Thu, 30 Jan 2020 13:46:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:56646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731219AbgA3Sqe (ORCPT ); Thu, 30 Jan 2020 13:46:34 -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 DC41B205F4; Thu, 30 Jan 2020 18:46:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580409993; bh=N79B2Sl0u8IhEa4tfI7TKLJISHSBJ0Ww85eqLqI6MH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bqh1UWauUcB3wadjGljWUaOuv3BXekaok9iXJzvcp5aWInG+xszJutDrBCuu50bBi uGSlATbjzyag7m82+RgZp2qTu5wEPTqKfANM4bKPhjoSEfiteyUewP9X7UmLD15jwv CLXyVkG4wcTMuCJlQWsGmNyHeGtt6ZHXTCFkPsgY= 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 099/110] bus: ti-sysc: Fix missing force mstandby quirk handling Date: Thu, 30 Jan 2020 19:39:15 +0100 Message-Id: <20200130183625.500290109@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 93c60483b5feefced92b869d5f97769495bc6313 ] Commit 03856e928b0e ("bus: ti-sysc: Handle mstandby quirk and use it for musb") added quirk handling for mstandby quirk but did not consider that we also need a quirk variant for SYSC_QUIRK_FORCE_MSTANDBY. We need to use forced idle mode for both SYSC_QUIRK_SWSUP_MSTANDBY and SYSC_QUIRK_FORCE_MSTANDBY, but SYSC_QUIRK_SWSUP_MSTANDBY also need to additionally also configure no-idle mode when enabled. Fixes: 03856e928b0e ("bus: ti-sysc: Handle mstandby quirk and use it for musb") Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- drivers/bus/ti-sysc.c | 3 ++- include/linux/platform_data/ti-sysc.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index ea16a2d4fb532..d9846265a5cd9 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -987,7 +987,8 @@ static int sysc_disable_module(struct device *dev) return ret; } - if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY) + if (ddata->cfg.quirks & (SYSC_QUIRK_SWSUP_MSTANDBY) || + ddata->cfg.quirks & (SYSC_QUIRK_FORCE_MSTANDBY)) best_mode = SYSC_IDLE_FORCE; reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift); diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h index 0b93804751444..8cfe570fdece6 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_FORCE_MSTANDBY BIT(20) #define SYSC_MODULE_QUIRK_AESS BIT(19) #define SYSC_MODULE_QUIRK_SGX BIT(18) #define SYSC_MODULE_QUIRK_HDQ1W BIT(17) -- 2.20.1