From patchwork Wed Aug 9 19:20:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13348370 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 EB8B5C001DE for ; Wed, 9 Aug 2023 19:21:11 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=njETzbF7lwpChVvDV9KIC2CRYwVgbmtp1fv9QEfzi5o=; b=f7xbqQJM+DhT+S 4aKNYZ5+NIj/zms49gZ/6ft+1REeY3waduLg7wFE2laW307W3QKmEePUVpFHJuj1u9Z0tXbaI0xgl hlmBOFDvo9vh5l3qxElPSHV3m+CjW71VwYaGEtIvldI08wNyFrg28HOtAAtBh9Hizx9a3l9YXJ5d3 AOpQmEEzOvqSi/bjgK1BGG3qnAFwf0QpvWeBQ3Wd1aB+upw613/LGoOUUf+162saQatJCHcRVjZWf d0bXh/m+PcKkCOBIwjtq9gnVNocxF8n1SwBB8fG7HtTUMhvX4LABcSO3T9jpPIBoeU1vVTfffJ/6x s7F7JkpyHSU596yMjPVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTojX-005inn-35; Wed, 09 Aug 2023 19:20:39 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTojR-005ikb-3D for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2023 19:20:35 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2b9e6cc93d8so3077201fa.0 for ; Wed, 09 Aug 2023 12:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691608830; x=1692213630; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=mFQ707YTlR2asiZeDkwXq23zTGpUUmFrLAoTxhmG6mY=; b=OPxuvbEuXJUXjzQ89YLv2sBdDf2wZx0cITcGYsNii8MZxxcnyBJ5c8rcGtK4hVNqNi bvgzBFviOD+kPmESZ/f8KkYo1Tv4TXZ49/bRINZspYc17BdlSD05VYIkNxNSlmSS371+ jwLhwnJvThpOeD4qf8YunREVa8PM03sXZsgIrD8mGorZpFd6UIYeMzkb5q05orFGHF5r BovPTMhwNsuDP3MLkpcd8kIa1I80udRfhv2g01ZSk0MrTImMoFeaWGt+GN7BmDdbyQTl NsqVezWpl0l/iFlkMcS9J26abIdSn7zpTVTagZSULfvqCxhQkoj5QIzkr/Qur0IJFYVf Pmaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691608830; x=1692213630; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mFQ707YTlR2asiZeDkwXq23zTGpUUmFrLAoTxhmG6mY=; b=U7CCuHOmjLdgmSAbYsq56gz/8zlX4tD1ToznysdBxro29HN88G/bsu2cltqCBlot1z b2Qx41zKhYhE5wVwIDrVZK2uFRC+nmUs7eO0Y8/ltSyIdZCspkx5cel38ffcDUvPIa6n JTvObO3fd3iRn6SxO/Bev1ND3/XC0j4NTHzu80FWT2DP8tLnOnxDw2/mKPr4vdiiUHcx wMHV+Fixdc7N5XPmcUgHozD32tXCSvP/3O/SBYbLKpKgFTsuDqPAxRZi63Z7IbpU2U5e LbV+gQ00NMKEEsQqIVfagz93FUcCcq2tioTHfW8O5i7L9uAmc3WyJpSlywSUBXY9/yvp TjuQ== X-Gm-Message-State: AOJu0Yy+8YTFh78T6d6P5Qyp9MZVex+PBcDHL8KCLMmB74SFYONUAqV4 Gy059bpTptMwIFTu62hZvFHW5w== X-Google-Smtp-Source: AGHT+IGx1WiOqj0jubUGfA3Ryt+VCR2f1eEL3qHMRLstCIQlqiZlZyf0bk+Shq+qIJ3+Bwaqub5OnA== X-Received: by 2002:a2e:91c8:0:b0:2b9:514d:64c1 with SMTP id u8-20020a2e91c8000000b002b9514d64c1mr112691ljg.8.1691608829483; Wed, 09 Aug 2023 12:20:29 -0700 (PDT) Received: from [192.168.1.101] (abxi185.neoplus.adsl.tpnet.pl. [83.9.2.185]) by smtp.gmail.com with ESMTPSA id o3-20020a2e9b43000000b002b9ed203af1sm2863218ljj.132.2023.08.09.12.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 12:20:29 -0700 (PDT) From: Konrad Dybcio Date: Wed, 09 Aug 2023 21:20:24 +0200 Subject: [PATCH v3 1/6] arm64: dts: qcom: msm8998: Drop bus clock reference from MMSS SMMU MIME-Version: 1.0 Message-Id: <20230531-topic-8998_mmssclk-v3-1-ba1b1fd9ee75@linaro.org> References: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> In-Reply-To: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , AngeloGioacchino Del Regno , Michael Turquette , Stephen Boyd , Jeffrey Hugo , Imran Khan , Rajendra Nayak , Joonwoo Park , Jeffrey Hugo , Will Deacon , Robin Murphy , Joerg Roedel , Jeffrey Hugo Cc: Marijn Suijten , Dmitry Baryshkov , Jami Kettunen , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691608824; l=1046; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=dMjovGWIjyf4UWgt36DKFCmom9ibnuPYDRAv7j4Cf+8=; b=0aJhMLANoopT9Wyll4mX1KVx6JDNVknG/kysgc0OBuv4vVfhC4gUTx23xhiPcZ61jRec2O2fQ 9NkAHlkn2sqD1DWLMOhTzsIB89GXL0lNqi5IveyKMkOX4DQlv8M6WaN X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_122034_032832_DD777E7B X-CRM114-Status: GOOD ( 11.07 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The MMSS SMMU has been abusingly consuming the exposed RPM interconnect clock. Drop it. Fixes: 05ce21b54423 ("arm64: dts: qcom: msm8998: Configure the multimedia subsystem iommu") Reviewed-by: Jeffrey Hugo Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index a41a34dbcc3c..e40f6461f4fd 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -2743,10 +2743,10 @@ mmss_smmu: iommu@cd00000 { clocks = <&mmcc MNOC_AHB_CLK>, <&mmcc BIMC_SMMU_AHB_CLK>, - <&rpmcc RPM_SMD_MMAXI_CLK>, <&mmcc BIMC_SMMU_AXI_CLK>; - clock-names = "iface-mm", "iface-smmu", - "bus-mm", "bus-smmu"; + clock-names = "iface-mm", + "iface-smmu", + "bus-smmu"; #global-interrupts = <0>; interrupts = From patchwork Wed Aug 9 19:20:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13348368 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 A4AF2C04FE2 for ; Wed, 9 Aug 2023 19:21:08 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6mTLQlJ0UQBzmc0ZfKvYfShCTVXJddanIh/SSCeAsOc=; b=X2MC+W2lU69EXS 4rrikX2AcZJ+s84fX2dy+oM7WRTI/LyEkmIjY5P/aKh6+6zcaPv3zvvF6FGgVA32QbCu4zdiPbWbV QrWTxeTrjTXP734PjNi03FhKPHP82p+QBNoyS4kbCDKkKvzlp8YXsOY9LQbfotWZnusLmf0gk3mk+ zAJwQgCyZzwqFmnklYPpiVmyhZ9uf5K+4+9EKT5JeoZzY5yJbke6D5MvLREjmpbvy2C0xNgR3XpWD P4e2mwe+TVOODQAQrL3YDoIxsb/wUB6hMiLbY3P7SuwfCbpWC4j5lJ9pvNFOufQmJ5G+pqexqRp6Y Z+X6LRTaxsbJS6cFnjpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTojY-005ioU-1X; Wed, 09 Aug 2023 19:20:40 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTojT-005imA-1w for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2023 19:20:36 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b9c0391749so3009321fa.0 for ; Wed, 09 Aug 2023 12:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691608834; x=1692213634; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DE94Q6lf2K2gSTbQ4obZ5qNHgQeup5/EEo7g9MBB54w=; b=hVZmOV05FAUjR8G8bAhpPHpxnHhQ6DhH1iewP44ue5XrvSdFh1IvsOVHkaiJ8DJSlG OzOwcDv+13bnppTHDKixF9LK3nkTDiV+dt1xhzEyEn/hXtWbFalKXwbjBGPTqK7Ue3S8 VhYQt8NK97pnxqSmf/IX2GvUWhC0cKQylUtb4hwZV6v8kC75kW3GRNvdZMrY65f6fawZ 7C3wht1lSE7lEXy0viadI5LBdxGnHoIQCCj4TOjAruUiluS/U7PGpHbDEAzTBE2EGxXU cjejMJpG/6Fpud7Gbupf9gt48u1dP6b6fYzfGYNA6pQ7TfjjTFSA/AKGBIr86y1dWgRQ RZTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691608834; x=1692213634; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DE94Q6lf2K2gSTbQ4obZ5qNHgQeup5/EEo7g9MBB54w=; b=CUh+nsOHHB4R6Ty7uUP6Rey+faw+J7HvRrbrfaF2TQa6yVq2+1b1mOptwZ5jcsVJIq SLVjYCm1eq6Co1q5r7feO4PgwE+xS0btDPoelvtaeved2E8XslrLcrnA1JF0YQyIEikM aHVnBjyTkALDWM2DjIKqL7TH7HzdUDpLQ+YOKtIoK9iEXMLROqh6wwC5ec3CWhkOGiBx nw7ekJPmipAfNVBI+NB9W9KMpYLnjPdOhtUWGlvBzHrv3a//tEYLZ3S+F8Ai9EA5OTpV KB2gSBCCSjkco1Ictb2ngNxSoIJ+8kHYp3KGwYEgEg6RG9s4RNQ0ifjpSbrWT7jVDAUp fkiw== X-Gm-Message-State: AOJu0Yw4R6XKFyjzmsl1PGM+uELLhCZPrPBpF/5TBW+JbKP9hKftQ4t4 hNVPXmgev5g6K9lapgt4RI7FTA== X-Google-Smtp-Source: AGHT+IH91D5GnSETRj0u3DPt3bzPi4croUy1p68YiToywW5aS9a6UlkxNDxyQkW6FnSr1PCZ1vpbrw== X-Received: by 2002:a2e:8550:0:b0:2b9:b9c8:99 with SMTP id u16-20020a2e8550000000b002b9b9c80099mr104092ljj.22.1691608834133; Wed, 09 Aug 2023 12:20:34 -0700 (PDT) Received: from [192.168.1.101] (abxi185.neoplus.adsl.tpnet.pl. [83.9.2.185]) by smtp.gmail.com with ESMTPSA id o3-20020a2e9b43000000b002b9ed203af1sm2863218ljj.132.2023.08.09.12.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 12:20:33 -0700 (PDT) From: Konrad Dybcio Date: Wed, 09 Aug 2023 21:20:25 +0200 Subject: [PATCH v3 2/6] arm64: dts: qcom: msm8998: Add missing power domain to MMSS SMMU MIME-Version: 1.0 Message-Id: <20230531-topic-8998_mmssclk-v3-2-ba1b1fd9ee75@linaro.org> References: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> In-Reply-To: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , AngeloGioacchino Del Regno , Michael Turquette , Stephen Boyd , Jeffrey Hugo , Imran Khan , Rajendra Nayak , Joonwoo Park , Jeffrey Hugo , Will Deacon , Robin Murphy , Joerg Roedel , Jeffrey Hugo Cc: Marijn Suijten , Dmitry Baryshkov , Jami Kettunen , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691608824; l=906; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=EM5tWZgcQ/PtQiCuUMktQpuJVbPaCBzE0y/oEdPpoBk=; b=DgG5WM7aCnxlKKTKRxJyT1NXqA7+tx0CEHA0dPTjvPgAtp5Ajxf5aVQKXXHPrMj6JtpuzIu7l Adop0zBmFK0CA+8JhrdwrZpDm3sn/DQGCO1GR9TImxjwOVAXckjOEC3 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_122035_644874_35C6437D X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The MMSS SMMU has its own power domain. Attach it so that we can drop the "keep it always-on" hack. Fixes: 05ce21b54423 ("arm64: dts: qcom: msm8998: Configure the multimedia subsystem iommu") Reviewed-by: Jeffrey Hugo Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index e40f6461f4fd..39db67211fae 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -2770,6 +2770,8 @@ mmss_smmu: iommu@cd00000 { , , ; + + power-domains = <&mmcc BIMC_SMMU_GDSC>; }; remoteproc_adsp: remoteproc@17300000 { From patchwork Wed Aug 9 19:20:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13348371 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 B2848C04FDF for ; Wed, 9 Aug 2023 19:21:13 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NBUfb1wbwOebStiHiKaM1Qp/jg6FW73/Yc1nCslsVB4=; b=vbRRrX4TJencS4 Pg0weo4rY9fg3wAVEFHgviUP4+ORD3dRPDK0X8BkIqIn7ZVEr1O8ZINi400ck2EXtsRGZfHbUgl71 DtSlQEtDYBB48hO7UW9TOTelUtkEv3uJkiL5msbSBzEyNKafThIvsR7Z1CUwWxaPC+Cup6SkUGTsz odc7LfEcvUVCzIMO06eaamOFPFQAK4mArZWe/CKopFnj7GtHHYubXgdcztinwkrpOZsjMU9JRdQyi FjRm6TEwXSEnc7MC01f9cu82MGVndUk5AN0jvWmDbBmXbAxmCUXYwbT3EIj/Lr857+1EJ5Ry5ExVZ 8SeXdPWGqhlpovzRMgAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTojf-005ir8-2Z; Wed, 09 Aug 2023 19:20:47 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTojY-005inU-0N for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2023 19:20:41 +0000 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b962535808so2839291fa.0 for ; Wed, 09 Aug 2023 12:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691608837; x=1692213637; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=TJRcX7l83GzG4nljjiXsSgTVORkCZorOu6CVVdtQF3E=; b=J67BqW4PzqZ3LQWy0xRUu2fPeiS0tkYFmGkV8qggyN4tk0Dk0oUfVjDADdP0QFanwR olOGQjV3qFvbRfIGzyqylFnevJTih4Dpjdu8EtcMJ74XvJl8YZfUoLa90KrTAMGprVLI bS6OLJehb/0Hh/fLPS85pVJuLlki/+tZ/9KG7PxDHOipRiNsBCUka2PHikg1QDidIXQl B+Hkg8Z3Opm1oBnCxg+ky7ePEN23reVd9SCgVz6w8aqbIrWezCMq5BwPT0FaUpyV4uhz wDjt/ZV0LlftrlbmAyB0UyLRPI5n/JPFDhmaY6FOQhEHx1MTU25pjWb2MIrSHWvkQ00Q fNWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691608837; x=1692213637; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TJRcX7l83GzG4nljjiXsSgTVORkCZorOu6CVVdtQF3E=; b=kCxagP1SfrOYAyprOMHedjXvpfEyfBuDEaj1yxsIC3fbdDrM/N6jdWDM9p+YOFy4cM PibQd7cmGyjIrtYQL51Vc00kLvKYSCb39K3MxQ2Y8x4yWnuL/p/jmgYYcEb9MlcL7NC3 asFJpd57cMvrWJNL9HsgaQpHo6jaDmzygthwKX9/VrAJqVwvVeuE4tXWOrxLVIxUMFel 0KM7EBm/nkLOsokmk+KYvHeO1D4FWsV5Oe0S5/70182eK2qGus2a9ASsFmCl/6PbmkY3 xZr06as135JyowxrGE0zCo19LKBKwXMoAbGbSkBurxF+6O81HAuXC/UHzTcUNnYdjuO6 d3YA== X-Gm-Message-State: AOJu0YzuhuyYYobd3GOk2tc3LcVHNa4vxN3stovH6in/7fnNhFw5KY1r oUIN4/0JX2GOkXubNWtc+IEl4A== X-Google-Smtp-Source: AGHT+IH2946wTqoiD++C2k5Ij5yIMLr7yXfpYxAYOyBlkrJ8arEJR+lmMs4NyQvImUkP6zbq99geZQ== X-Received: by 2002:a2e:730f:0:b0:2b9:e7d7:64bd with SMTP id o15-20020a2e730f000000b002b9e7d764bdmr92624ljc.47.1691608837194; Wed, 09 Aug 2023 12:20:37 -0700 (PDT) Received: from [192.168.1.101] (abxi185.neoplus.adsl.tpnet.pl. [83.9.2.185]) by smtp.gmail.com with ESMTPSA id o3-20020a2e9b43000000b002b9ed203af1sm2863218ljj.132.2023.08.09.12.20.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 12:20:36 -0700 (PDT) From: Konrad Dybcio Date: Wed, 09 Aug 2023 21:20:26 +0200 Subject: [PATCH v3 3/6] clk: qcom: gcc-msm8998: Don't check halt bit on some branch clks MIME-Version: 1.0 Message-Id: <20230531-topic-8998_mmssclk-v3-3-ba1b1fd9ee75@linaro.org> References: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> In-Reply-To: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , AngeloGioacchino Del Regno , Michael Turquette , Stephen Boyd , Jeffrey Hugo , Imran Khan , Rajendra Nayak , Joonwoo Park , Jeffrey Hugo , Will Deacon , Robin Murphy , Joerg Roedel , Jeffrey Hugo Cc: Marijn Suijten , Dmitry Baryshkov , Jami Kettunen , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691608824; l=1627; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=4vcJD39xmmwGxR16do/vEynX3nfOkYLGbzSw65dGFMA=; b=V6n6R9yvH/Elr5qcWR9xj0kZ2oYv/FkZVkxEuDifmy96KAhGojMvRCcOz1x/M+gxV1oaooOtj YvOhwXH9HlDBckManxwXKBZRQC8h4oe4BVD+Miqo6zg7UuiZETyqzCN X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_122040_167390_08C09F69 X-CRM114-Status: GOOD ( 12.48 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some branch clocks are governed externally and we're only supposed to send a request concerning their shutdown, not actually ensure it happens. Use the BRANCH_HALT_SKIP define to skip checking the halt bit. Fixes: db2c7c0a04b1 ("clk: qcom: Add missing msm8998 gcc_bimc_gfx_clk") Fixes: b5f5f525c547 ("clk: qcom: Add MSM8998 Global Clock Control (GCC) driver") Reviewed-by: Jeffrey Hugo Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gcc-msm8998.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c index 1ba516a0c0f3..257b27d8eeb6 100644 --- a/drivers/clk/qcom/gcc-msm8998.c +++ b/drivers/clk/qcom/gcc-msm8998.c @@ -2060,7 +2060,7 @@ static struct clk_branch gcc_gp3_clk = { static struct clk_branch gcc_bimc_gfx_clk = { .halt_reg = 0x46040, - .halt_check = BRANCH_HALT, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x46040, .enable_mask = BIT(0), @@ -2073,7 +2073,7 @@ static struct clk_branch gcc_bimc_gfx_clk = { static struct clk_branch gcc_gpu_bimc_gfx_clk = { .halt_reg = 0x71010, - .halt_check = BRANCH_HALT, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x71010, .enable_mask = BIT(0), @@ -2099,7 +2099,7 @@ static struct clk_branch gcc_gpu_bimc_gfx_src_clk = { static struct clk_branch gcc_gpu_cfg_ahb_clk = { .halt_reg = 0x71004, - .halt_check = BRANCH_HALT, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x71004, .enable_mask = BIT(0), From patchwork Wed Aug 9 19:20:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13348374 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 D05C1C001DE for ; Wed, 9 Aug 2023 19:21:40 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GPz6clth/q8PQcw4M6zT+G1o4fPg5u+AzK6RxmOhUEE=; b=s2q483FSpdXwGl e9JPAzDArD3K1bG5tH/AUW1dxM+bSGVo+lGqMcxPBvZczIP/K5d0qux/Oi2MXP8D4nmVd4OKWSgb3 Ssq0vxjotluyspaVUf2/h+y/VfbUpJjqnN563qEkqom1lhCfSNVDSDW02090yG78NaeV0Y8x7TpGt /HWmdJ6CFedquS8v1A4Bpw1zYJLhOVXsxJhAlEO6Q7Zc9HI2Ouh0yl4z+OJiXOIezQfKB87FwXlO1 gmawYj9cY8DbHFEkJ3dI/7oszP/Gvtp3VqNsekDqy1MbTuEnGhFZxYhFrgU01PeJ4tmijBb7LUWhS DuMDiUzmSg5SeNW6zdlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTojg-005irf-1K; Wed, 09 Aug 2023 19:20:48 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTojc-005ipJ-0R for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2023 19:20:45 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b9b904bb04so2825471fa.1 for ; Wed, 09 Aug 2023 12:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691608841; x=1692213641; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gAg8mzz6tXJyaH1tEofpHQ5TEsFiQj+ho2hy+w4Tmaw=; b=VzyIj7kpmL0GI4+H4dQgi+UkUqLL/c7AY4Rxja5tdpF915CELH4iPRezqR4JDiLnJh hYWiJDYoMzzJV5MOSC8CjjSlzrYOHQ10ohlzh1bPxmj1pr+/0siODEQNxkxj8Yh9A15S zI/qS1L0OWycrmB7G1C/yp5U3na9yIXRmmtuRliwEkSdu6YiQewsJJXy6uF7YPyjbuSp yBKQ+5U3WetAiIi2o4FlPGztZERZdbxrFevAtYlQ7nZclkZyC3NgxUPVi2x2kQyOfnnJ /9NEypY0RwWjU0nhuHENuUW3M2BNeFJ+Ce+M5dutJ5CYEMVFUVzkHqcp1d3icMk49mwb AQOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691608841; x=1692213641; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gAg8mzz6tXJyaH1tEofpHQ5TEsFiQj+ho2hy+w4Tmaw=; b=LQZy1Z0NVpHx/KdhtU/12HO3OT6xF+MjgKXLZp3oC/nQ/nj7nHo6j164CLXMRD4Zd7 zxPf/Tlb/mnCOxF8D2e1juPG0CxhWpKFJtHwuNwAGb1pnMvvGshRe8z8ctLGmK6ecZJ4 GrYBSn9aZ8IaupnVvmPogcwT+c+80+rVVzUhh2IHx0I6F+pSlYddhq4rK/6B7uQAo6yq Ju3Bls+SqaP17nNrqrjBCnvU2bKAEQSE0vEDxOmzr9Ujpff7OrFvtxyoZvYnLs69F2Q4 NGj9/tHSSeUzgWdl0p/y7sEMx2XtUx1DzepkYnCT4FJxpd+Bk/8GxnfgN7Xf4phthhM+ EIFQ== X-Gm-Message-State: AOJu0Yxw7a8Trbq+q2va0HmhVD28qQsJkjd2WpiEZsBLgcen6c8whNGk BVMJQWW4zFOjNF4fTvYNxLYtug== X-Google-Smtp-Source: AGHT+IHkKP1lMchPzHbm+j7W1NCjA5ROEnb+i2koQY3n9dklYzTIduqy4k3ASK3zu6ne7YURGmApPg== X-Received: by 2002:a2e:9c50:0:b0:2b9:5695:d10d with SMTP id t16-20020a2e9c50000000b002b95695d10dmr82394ljj.36.1691608841249; Wed, 09 Aug 2023 12:20:41 -0700 (PDT) Received: from [192.168.1.101] (abxi185.neoplus.adsl.tpnet.pl. [83.9.2.185]) by smtp.gmail.com with ESMTPSA id o3-20020a2e9b43000000b002b9ed203af1sm2863218ljj.132.2023.08.09.12.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 12:20:40 -0700 (PDT) From: Konrad Dybcio Date: Wed, 09 Aug 2023 21:20:27 +0200 Subject: [PATCH v3 4/6] clk: qcom: mmcc-msm8998: Don't check halt bit on some branch clks MIME-Version: 1.0 Message-Id: <20230531-topic-8998_mmssclk-v3-4-ba1b1fd9ee75@linaro.org> References: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> In-Reply-To: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , AngeloGioacchino Del Regno , Michael Turquette , Stephen Boyd , Jeffrey Hugo , Imran Khan , Rajendra Nayak , Joonwoo Park , Jeffrey Hugo , Will Deacon , Robin Murphy , Joerg Roedel , Jeffrey Hugo Cc: Marijn Suijten , Dmitry Baryshkov , Jami Kettunen , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691608824; l=1407; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=haDOFYx+cWB8WYF0AFsxGiNUFhwDHpLSQyDe+vgkap0=; b=ivHa7Psm9IKmZjT3K/fiYAso4o3IjbutXh3aiP/PX5cuAobhTzT3jwBqR6ntC92H28DCKPHah 56lr1ds08k8Cbcneb+IbXt/B0FrSWryIzQYDSVIg30b+uHh5Nmoezjz X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_122044_171125_4BD78E5D X-CRM114-Status: GOOD ( 11.51 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some branch clocks are governed externally and we're only supposed to send a request concerning their shutdown, not actually ensure it happens. Use the BRANCH_HALT_SKIP define to skip checking the halt bit. Fixes: d14b15b5931c ("clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver") Reviewed-by: Jeffrey Hugo Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/mmcc-msm8998.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/qcom/mmcc-msm8998.c b/drivers/clk/qcom/mmcc-msm8998.c index c62aa270af1c..d0a5440e2291 100644 --- a/drivers/clk/qcom/mmcc-msm8998.c +++ b/drivers/clk/qcom/mmcc-msm8998.c @@ -2452,6 +2452,7 @@ static struct clk_branch fd_ahb_clk = { static struct clk_branch mnoc_ahb_clk = { .halt_reg = 0x5024, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x5024, .enable_mask = BIT(0), @@ -2467,6 +2468,7 @@ static struct clk_branch mnoc_ahb_clk = { static struct clk_branch bimc_smmu_ahb_clk = { .halt_reg = 0xe004, + .halt_check = BRANCH_HALT_SKIP, .hwcg_reg = 0xe004, .hwcg_bit = 1, .clkr = { @@ -2484,6 +2486,7 @@ static struct clk_branch bimc_smmu_ahb_clk = { static struct clk_branch bimc_smmu_axi_clk = { .halt_reg = 0xe008, + .halt_check = BRANCH_HALT_SKIP, .hwcg_reg = 0xe008, .hwcg_bit = 1, .clkr = { From patchwork Wed Aug 9 19:20:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13348373 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 B599AC0015E for ; Wed, 9 Aug 2023 19:21:22 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PVzKogrqQSckG4QlRaL4MRHLSCTMYHGjwQO1aAWd+XE=; b=X2LLE5d7aHfSpj S8prQqn+7sujQbwoKDA/mkMMWQoFmysJpSBB587U+XeLTSEJ2HNG9QJtsfIEqof4oyPugQmvSXYbh DnPYFhNgDcxehTCND/eVR4q9tLZoeN+B1RJe0+xYHA12c5DdnjYM7Zn2ob2IlCd4qBBzn/Mwl7fJn WnPKEEyTpfDi+GejFTnqWnNaRrMCEuscGfsmnsXJfC4GJRwrmGH6sObtkAUCgiqivYYsLWOmJdckD 85zv56C6wr5Hq5u5/O7UXZTsiNz+rBBtD0bBpYPzHcgCWszhcnypi+/FUkpP2lKUPnSJfNET4PqBi ZS5McOXyOKnaTA5d9mNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTojn-005ivB-0e; Wed, 09 Aug 2023 19:20:55 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTojh-005iqa-17 for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2023 19:20:51 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4fe4762173bso131528e87.3 for ; Wed, 09 Aug 2023 12:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691608845; x=1692213645; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dlY5pXEYcBgHeb5qjzLwZeG+1V5JyWmwzq+8kailYB8=; b=TfhFmGA2dH+TveOOjTBM+LXhYCAopnWok1rpSmme2kr7oBvmt6nTk4Lk3foM868G5b aE9Wmuy0c+DlCtfHBPYmxCwgVWB5e+v7Y0TU+N/+l+Gh7Kst7o4vWvI2m7BGaORPIiTS 0HDzZt+v6tbH0IzQWlaIeCuUzRK/dwMB0izv2EmHKw2eKdleSP97NFbbZX7vBUMJ/bGb 1PZ+GFC1voBzNGut5ABKsRcBAvdj+jJTZqGwUT6+khj8FECcLIeqS61IVGXUPNkz2p2L 5m+Rw4b24Bv1lc/C9wGVDXEOS2G6Jh5EKBw4EAmwAJAaGh7ydl2yhF3IQc45UUkimxm/ rIwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691608845; x=1692213645; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dlY5pXEYcBgHeb5qjzLwZeG+1V5JyWmwzq+8kailYB8=; b=d/OdkO7iRaJVT2r7OboQXGNfwTEzhXpgCiwnGwSucnyHDonywg9vkZVgku5ikbmwHC 4orPbcmZhQqFpQ02jezDhdA8hnWKpOcpZgtGhkivD38D6vL5sdo+TgTwAYHuj6lYL52/ fje3BK7MjMNNzziNlxru9mg/QyV7uwflSFn+KY/KWryWsgzZEfhZNpMCkCZ86rzrYk4/ aI4YOMHeEMHjcLgcgYuVg0/tWkckafJczVMhIYcoKZGG/UqwIbhGsPKYL8p7q10G7UH2 lxrrhVaTHSB053oiuONz7sj5ALls9wmcHkBpyIyhEjLLTb2aq5m0bqdKNxRthb4h6lV9 meOQ== X-Gm-Message-State: AOJu0Yw1MaEzbZIv63QOAv1e7g1k5vTeO3saDtzTYdWHd6+T/8Xv6jmF +AvnP/XNQnneXPw3kzk5KNwMfQ== X-Google-Smtp-Source: AGHT+IGSCNjiKUVekSkXLXbvmSbUjKSDMw5H3M68C5MVVfFAHx8T9iPqUvbhGGWowQfwkt411qIkMA== X-Received: by 2002:a2e:730f:0:b0:2b5:1b80:264b with SMTP id o15-20020a2e730f000000b002b51b80264bmr105482ljc.12.1691608845471; Wed, 09 Aug 2023 12:20:45 -0700 (PDT) Received: from [192.168.1.101] (abxi185.neoplus.adsl.tpnet.pl. [83.9.2.185]) by smtp.gmail.com with ESMTPSA id o3-20020a2e9b43000000b002b9ed203af1sm2863218ljj.132.2023.08.09.12.20.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 12:20:45 -0700 (PDT) From: Konrad Dybcio Date: Wed, 09 Aug 2023 21:20:28 +0200 Subject: [PATCH v3 5/6] clk: qcom: mmcc-msm8998: Fix the SMMU GDSC MIME-Version: 1.0 Message-Id: <20230531-topic-8998_mmssclk-v3-5-ba1b1fd9ee75@linaro.org> References: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> In-Reply-To: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , AngeloGioacchino Del Regno , Michael Turquette , Stephen Boyd , Jeffrey Hugo , Imran Khan , Rajendra Nayak , Joonwoo Park , Jeffrey Hugo , Will Deacon , Robin Murphy , Joerg Roedel , Jeffrey Hugo Cc: Marijn Suijten , Dmitry Baryshkov , Jami Kettunen , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691608824; l=1105; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=87zmBNCrKExC5fA2pDw1hJreUEORhjqL4+NYXqa3bgY=; b=CtWmrvSHsvlErbsQsxLrU3ODuhQtNsTsNtB19xrNUGWfiV2aSZHRHHqxrLMUFEu1uiAStAAWj RMlV9Kb8TVNBKbiitjQkSgCh91rmQV5dVmkhomop/HO4nk1+OC6BFNa X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_122049_420767_87E479B5 X-CRM114-Status: GOOD ( 13.62 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The SMMU GDSC doesn't have to be ALWAYS-ON and shouldn't feature the HW_CTRL flag (it's separate from hw_ctrl_addr). In addition to that, it should feature a cxc entry for bimc_smmu_axi_clk and be marked as votable. Fix all of these issues. Fixes: d14b15b5931c ("clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver") Signed-off-by: Konrad Dybcio Reviewed-by: Jeffrey Hugo --- drivers/clk/qcom/mmcc-msm8998.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/mmcc-msm8998.c b/drivers/clk/qcom/mmcc-msm8998.c index d0a5440e2291..4fdc41e7d2a8 100644 --- a/drivers/clk/qcom/mmcc-msm8998.c +++ b/drivers/clk/qcom/mmcc-msm8998.c @@ -2627,11 +2627,13 @@ static struct gdsc camss_cpp_gdsc = { static struct gdsc bimc_smmu_gdsc = { .gdscr = 0xe020, .gds_hw_ctrl = 0xe024, + .cxcs = (unsigned int []){ 0xe008 }, + .cxc_count = 1, .pd = { .name = "bimc_smmu", }, .pwrsts = PWRSTS_OFF_ON, - .flags = HW_CTRL | ALWAYS_ON, + .flags = VOTABLE, }; static struct clk_regmap *mmcc_msm8998_clocks[] = { From patchwork Wed Aug 9 19:20:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13348372 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 68D96C0015E for ; Wed, 9 Aug 2023 19:21:19 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xg5JOXsoV8LfN9JZmoFaSkPSQ0IcpqOAQmq5l6DmMCs=; b=rvYIoD92tBWTM7 FmvSNdb/wK/Qr96MbcJ8+HXXnognXQtsUrY8ADOzmByk8WYHjpGpPYmW8GK+IhuSQbz3mpB/81kTC J6/N8Fu3tP1qxCgWuruNUis860u1T0Ap5Ha0ekc343iJKnK1BX0XyrnHwU9Xwc5Tbfhc1Uifm7R2n cDAxyp0flA928brV1EVLKGZZU9jP1MLACNFqtPHMqNahM8QqbByeiQARsG7o0nrcEdKYD0DGFGw2o Dg/b5pAwxe4OT3P+ozMp9LLs9eVVFW4z9MNTasjezAzGJgghXtBvX4XnzjzRLbO8d4xl6xRSObok9 ZqwpgCTDQyo0F4EfdQtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTojn-005ivm-2G; Wed, 09 Aug 2023 19:20:55 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTojl-005it2-18 for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2023 19:20:54 +0000 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b9ba3d6157so2395111fa.3 for ; Wed, 09 Aug 2023 12:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691608849; x=1692213649; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=PKzXZ2xoOmtz+1E6ZSxEFtLtyfPfJbw38y+S2GZug7o=; b=ktOkxMQcgVGObAcCt3Knbm410wsa9H2uDdEZ/bh/kb/PTY1yoBH/UsES4eG/yOaN+q 3gzHgW9KgTARcZ05z2S8O6wE54tVnWFb2jvcTNOfCtBvkYbtIoOj1QkrguFI107bp+do XIxkH/f0RznHU8aaw59Qe4YS9C//aPlDruZn9wdBFkfbCjC09zY1y/vJyzxXw81sb67K AUd/rg7n58SkzCAUGrTNF8UDDGDtpx+DBjknpO/qGPt0fnfXauXI3wEATyfgOpbhPNNV Q9ZEZZdWFxXtIQCpYlCm57pEKF6boSnrhk0jAZQkOJXZ93ssJ/vJ8MX3oTGbPoWHECHb agsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691608849; x=1692213649; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PKzXZ2xoOmtz+1E6ZSxEFtLtyfPfJbw38y+S2GZug7o=; b=WO2GrVwp9XqdIOs16/ul9tfqCrivJ9u3vbGQBNkxnVBQ3LCCdL6qnBFjHeJ6ZDfhMb Aqww6TacGUPRZ/WzRn87NLlTKsykT+xOKQj3P9fVMAYvVVL2bXDmspZNf4POkG5rn6Wn yvADXcdskRGL/yQySAaK+NTXXQVH8ntjFlsa6wgCeMEjNzg6FPzGPqDIAE5h2ERNkt9L FK+XtYwEubcnZ0j/hPDyrzSHmdix0kNCEd6NRXIcqwXWwjj4alW0iFVIvHT5eP6rIJLg 38hJ7mblifhbmP9Dj97WKa3U13yU7Ci0KdorGgUMJaYXulmf0pe5OIDrKOsaD4zEq4Ru Ub4g== X-Gm-Message-State: AOJu0YzfIAjFBjZuapNdWsXkfEWQfuB9eef63P1r+A70jKGNpY3vsJz6 /z6c+U4QrUQgGhUv0hZ69gtbRA== X-Google-Smtp-Source: AGHT+IHJ/2+1dRVWftsf3hRe4FCuXfAc11npk5nml584uXlQss/bX0OqSrzGd6MTg33LTDRNR3WAfw== X-Received: by 2002:a2e:9a8c:0:b0:2b6:9da9:2884 with SMTP id p12-20020a2e9a8c000000b002b69da92884mr82130lji.40.1691608849543; Wed, 09 Aug 2023 12:20:49 -0700 (PDT) Received: from [192.168.1.101] (abxi185.neoplus.adsl.tpnet.pl. [83.9.2.185]) by smtp.gmail.com with ESMTPSA id o3-20020a2e9b43000000b002b9ed203af1sm2863218ljj.132.2023.08.09.12.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 12:20:48 -0700 (PDT) From: Konrad Dybcio Date: Wed, 09 Aug 2023 21:20:29 +0200 Subject: [PATCH v3 6/6] dt-bindings: arm-smmu: Fix MSM8998 clocks description MIME-Version: 1.0 Message-Id: <20230531-topic-8998_mmssclk-v3-6-ba1b1fd9ee75@linaro.org> References: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> In-Reply-To: <20230531-topic-8998_mmssclk-v3-0-ba1b1fd9ee75@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , AngeloGioacchino Del Regno , Michael Turquette , Stephen Boyd , Jeffrey Hugo , Imran Khan , Rajendra Nayak , Joonwoo Park , Jeffrey Hugo , Will Deacon , Robin Murphy , Joerg Roedel , Jeffrey Hugo Cc: Marijn Suijten , Dmitry Baryshkov , Jami Kettunen , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, Konrad Dybcio , Krzysztof Kozlowski X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691608824; l=2584; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=AwK2agC2XLAE1uApMOG3gNnll+6I3sbngtzNXhteFLY=; b=9iedVVmx0RYZnXA8MtHQb4WwXu0MUQvJzEqf1sqEeHux/YcxVW+ah4TFsuR9KgpG7fZyLt/gQ 3Eq/kgMEGY1ATnANKZsWUEs/orzBde4cvjS2RzEFnclWUMH/ZMEAhj7 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_122053_388886_DAEA8E10 X-CRM114-Status: GOOD ( 11.25 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org MSM8998 was abusingly referencing one of the internal bus clocks, that were recently dropped from Linux (because the original implementation did not make much sense), circumventing the interconnect framework. Fix it by dropping the bus-mm clock (which requires separating 8998 from similar entries) and keeping the rest as-is. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- .../devicetree/bindings/iommu/arm,smmu.yaml | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml index 3a31a979709b..cf29ab10501c 100644 --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml @@ -270,6 +270,47 @@ allOf: contains: enum: - qcom,msm8998-smmu-v2 + then: + anyOf: + - properties: + clock-names: + items: + - const: bus + clocks: + items: + - description: bus clock required for downstream bus access and for + the smmu ptw + - properties: + clock-names: + items: + - const: iface + - const: mem + - const: mem_iface + clocks: + items: + - description: interface clock required to access smmu's registers + through the TCU's programming interface. + - description: bus clock required for memory access + - description: bus clock required for GPU memory access + - properties: + clock-names: + items: + - const: iface-mm + - const: iface-smmu + - const: bus-smmu + clocks: + items: + - description: interface clock required to access mnoc's registers + through the TCU's programming interface. + - description: interface clock required to access smmu's registers + through the TCU's programming interface. + - description: bus clock required for the smmu ptw + + - if: + properties: + compatible: + contains: + enum: - qcom,sdm630-smmu-v2 - qcom,sm6375-smmu-v2 then: