From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98B91C433F5 for ; Tue, 1 Feb 2022 19:54:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X8G7uKcMD3cIp+apY54NppggMDZyALnolKeo6gmUoJE=; b=m8JLXoFunP6r6j R2yME9r/KJeY6R7dwWouQJhJ7L8wVLoiYo0r34UJ/Df7MUp7+Ua+jw86j2NFY9TwD6owIg+/64R2p pFy65YJne3BusfROMBCO2K3Msw+qS5riq+WOPfc4mw7mHt4MGb9Rp1JypfssElcgJmtMR9E6PLVXX dfP+uv6/7wPCA4iyD4aRlayeOnGDYurh5HzWIF394aFo71HvyoZfjiNWi245NPrMw+QkbWmF6lIQg /Wyj+mRUzdUV65HCpQRpvI/0Nsd5EckWqX2MX+WapSw0LWTB6CqgRSMCbd5fuEVu/nIVxOmZyf5xR GJ7krAdTm7eaz5DMbyQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEzCr-00DZwm-Ce; Tue, 01 Feb 2022 19:52:49 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEzCl-00DZvg-Sd for linux-arm-kernel@lists.infradead.org; Tue, 01 Feb 2022 19:52:45 +0000 Received: by mail-pj1-x102c.google.com with SMTP id o64so18151729pjo.2 for ; Tue, 01 Feb 2022 11:52:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=K0G1SY2wwrY+W9SNB4oFMtfetHq3vq9RQ2FLNyl/UiI=; b=AmoyYeqbKB/J8fBT7GwIIJ7MSBxGiJfI2bIvKcMrbC+8uTYNUByMbB8cYdjalZvuts bP6OB7nUJPZui4YHm54PBmVv7wrUBYuw0pn5eCsGBooT/y1iZuq2Nq4kJMFX23Af5xLs ZgW8DJqQhPejR+1y+MZ/pJnNZW7sov/QVgx+fYolLnuvq9xgAFwQM2Nd8NySe2e85265 RrX41sx6lcvoEaYfIsJKTukQVAQFLtmEL4p29xx9uAzi+tp8SbEkvsaQTQJXLCKnMx60 uXYbxXaVHaMeSiJkSrY4eiD3j6k1Ug94P86epF/+FQkxVKs6B1Pm6E1IgxDdlcapSKVo 4uMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=K0G1SY2wwrY+W9SNB4oFMtfetHq3vq9RQ2FLNyl/UiI=; b=GUVSvmn1S164cdoUDE9RU6KPN+nWyv7leV0cKxlfn0XzOJfLS63HgZZgXGhHGncaaz /N2yw1aKaS8E3cusZgg2w3YUoIqKenciH2vVfWmnjj+qugod7vVmpNBRaoDFUg0EN3tF NNxWDzA6Lin/ksJctR3kRbw+4oJcJtSUMu+fL0Du+8jtIswEuP1zLD4swuCRBIKyvT33 thv3ktfncfkTeJ5Ms/qlFx/EHZjsyCRF5NPVu2DuZC5PhuBrY38iFcHiCUa93CwFRYIu xqoxzq3E3MIPUUI4KOiueBBn3AYR7Qcr0+EpFomlMiwUHM8dh0m9jVeaFy/eQydyElTE WL3A== X-Gm-Message-State: AOAM5301jA+7XR6RXVfUCiRIZMbxc5k3cwojZY0AAfgi7KXLdv7KDFJF IprXsvpxwa2v7iN/Q1/PHToa6Q== X-Google-Smtp-Source: ABdhPJwtPqHYQaAKewNFNpgmL8T0HaZwSGxAAwv38AZO435BSJ6NiP/4SeR7D33i2armAziRPFCdFg== X-Received: by 2002:a17:902:db01:: with SMTP id m1mr27538672plx.126.1643745163074; Tue, 01 Feb 2022 11:52:43 -0800 (PST) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id b6sm23620829pfl.126.2022.02.01.11.52.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 11:52:42 -0800 (PST) From: Kevin Hilman To: Shunzhou Jiang , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: narmstrong@baylibre.com, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, jianxin.pan@amlogic.com, shunzhou.jiang@amlogic.com Subject: Re: [PATCH 2/2] soc: s4: Add support for power domains controller In-Reply-To: <20220126061018.705338-3-shunzhou.jiang@amlogic.com> References: <20220126061018.705338-1-shunzhou.jiang@amlogic.com> <20220126061018.705338-3-shunzhou.jiang@amlogic.com> Date: Tue, 01 Feb 2022 11:52:41 -0800 Message-ID: <7hzgnal5yu.fsf@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220201_115244_047722_E757942D X-CRM114-Status: GOOD ( 18.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Shunzhou, Shunzhou Jiang writes: > Add support s4 Power controller. In s4, power control > registers are in secure domain, and should be accessed by smc. > > Signed-off-by: Shunzhou Jiang Thank you for adding support for S4 power domains. > --- > drivers/soc/amlogic/meson-secure-pwrc.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c > index 59bd195fa9c9..8fee01aabab6 100644 > --- a/drivers/soc/amlogic/meson-secure-pwrc.c > +++ b/drivers/soc/amlogic/meson-secure-pwrc.c > @@ -11,6 +11,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -119,6 +120,17 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = { > SEC_PD(RSA, 0), > }; > > +static struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = { > + SEC_PD(S4_DOS_HEVC, 0), > + SEC_PD(S4_DOS_VDEC, 0), > + SEC_PD(S4_VPU_HDMI, GENPD_FLAG_ALWAYS_ON), > + SEC_PD(S4_USB_COMB, GENPD_FLAG_ALWAYS_ON), > + SEC_PD(S4_GE2D, 0), > + SEC_PD(S4_ETH, GENPD_FLAG_ALWAYS_ON), > + SEC_PD(S4_DEMOD, 0), > + SEC_PD(S4_AUDIO, 0), > +}; We should avoid the GENPD_FLAG_ALWAYS_ON unless strictly necessary. If you look at a1_pwrc_domains[] in this same driver, any use of this flag has a comment for why it's needed, and it's usually because the domain is used by low-level SoC/PM code not controlled by linux. All of these appear to be domains that linux should have driver control, so should not be set to always on. Kevin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel