From patchwork Mon Jul 31 10:52:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 128628 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1969453vqg; Mon, 31 Jul 2023 05:10:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCH6yLAM0tes4qPWRYGBzVy3/8RRq6LjulkJ7hLtHPtCFNqX+p0awICWEjVLXxOUJXdYVb X-Received: by 2002:aa7:d612:0:b0:522:7eaf:c0c0 with SMTP id c18-20020aa7d612000000b005227eafc0c0mr10323598edr.16.1690805453657; Mon, 31 Jul 2023 05:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690805453; cv=none; d=google.com; s=arc-20160816; b=UdN/DOVX3aP/GBl+cjVzToCQAGEaKeoLssMiQfHNiddOTB3BxpIa3CYYcT5A38Ftgi V/m4Tgt8/KzGgyljT2G/zsOqkADb7h106+qEWhfheGiBV8x/v1N0jJOCpDOIanG9vLzI MFaulOBig/MNyR2VycJ27yOyYi2TTOEgN8G1+pDIY3yaeqqiUTJ6mhH3cHMFshFLPKtH ZsM5vO0lNp9CaGVT1SnO9a9BtNzTvvnwQxdMeC4HeUCL9hHKhkQNiwpH3J0z4FtNf6lX xRyKmJEAmNcNSZVjnHacJNeP76Vy8r4mzXRKX8wXc9p5AyNVyJ7jlcYXVKp50o2bfF6u 5ycw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=fB3U8vshaXGTQDVy4zCZyIQDygwXYLYWLuqWZPmvE6A=; fh=eQYZoDkT5yiXC4FOuYG6Kem76e5j3IG0APJeW7cmDrc=; b=0eomE/XEG5n9AfP+VRIk9HcSpdymgHwKjT0gHX/MVndV3nT+m/pZump9dab8bBwgy0 GfrKxWGWDvMm/Fs6VRS/NjwwqOpha2qJkl98e+oJOJxVDEggJg7rhD4+/rrZB+nWAH3k 5Flbt+gYV3PrdVAoT9OdowgV9Ntq9QPkSUC7w5QVQDLilwpQji0KfAD3U0m+abYuuYOu dxF5koacGuJcYfhpjQOM5JGxtYvKXFHEDY1On5uBV6jpsRTuFJnPXtb+4l0Ah0QaJMoq W1RpRnMGX3XSo307rlISeU35aAlydVt/2eu89ZuIjmLzE4xsgCgfds1fNPsALyLVeH0n kKIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cawrlLWO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d26-20020aa7c1da000000b00522bb898a06si2229067edp.18.2023.07.31.05.10.29; Mon, 31 Jul 2023 05:10:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cawrlLWO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230413AbjGaKym (ORCPT + 99 others); Mon, 31 Jul 2023 06:54:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230274AbjGaKyK (ORCPT ); Mon, 31 Jul 2023 06:54:10 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 829D52694 for ; Mon, 31 Jul 2023 03:52:39 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4fe0e23a4b1so6786683e87.3 for ; Mon, 31 Jul 2023 03:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690800757; x=1691405557; 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=fB3U8vshaXGTQDVy4zCZyIQDygwXYLYWLuqWZPmvE6A=; b=cawrlLWOIpMlWCMp3hV/w0GWzGyNJ+4BzXfUro5Ga9kDxtYP+q8BsOihYGxVHB49Qa qn18Yz/WhnJVrociJaEtwu2gHq5X63NkPh0LTPaCHumF5AH4JJBWhcawTKCplw7KwtX6 tu2EDePQibknZA5FvV1sShHWA4q3WfgdBI9NifyYV90QqPMBrwajxv3BcJOLWNnfvp5U 5lbjryLA1VufmUer+/1P9eiay6hJp8w4eM01iZ3B2Ajw2d4lEQ8Q0Yo1ZiAE2wQGHqJ2 fkxQ5uoF3q4sEJ/gSU5c+JcePCTC9TlKCGjpbXpqg/Lp9/jU2VnbGpD8RnDJSLPwAgf0 LJNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690800757; x=1691405557; 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=fB3U8vshaXGTQDVy4zCZyIQDygwXYLYWLuqWZPmvE6A=; b=HWkt8qHqfm5LrMskvySPvThY+J6LOngRTVI8kA98eG4LZX5jYhjVEICTDykeUL1UOF yxk+lo6WDCd3XdriAjLhZUCwsLiHsDH9ZEB5hg+hOGN39HA3gURJdm4n3Uv0/zKXuqiA MsGZEW6tIPWYSLZoHjD2E5ST2q6YO/1LMeHkQI9UshjLNrqdDFMeYY/3tsO1VZrK4Fb8 RyF1EmgbT9qSMFaZs2+98WvdUU+FLGPaiRCsxWQAjHGfsgKSWK7wH9rtlPBwGiQYFRyu KJjihN5U0dYKlPhZI8g6XoOpU4DT1kY5C/USxn/Q71lPcagMt2Orq1M/LI17kC0rZL+8 OTKA== X-Gm-Message-State: ABy/qLakl33ubS2+Ft2fRtYUJSE5zCrR6Z5IduK0HGvmDYaObFm8si17 sjDAq9MkQPA/ZNDWwCkwgXnP+pUj6QpyJCAszQaaiw== X-Received: by 2002:a05:6512:6c4:b0:4fd:c83b:a093 with SMTP id u4-20020a05651206c400b004fdc83ba093mr6483544lff.1.1690800757039; Mon, 31 Jul 2023 03:52:37 -0700 (PDT) Received: from [192.168.1.101] (abyk53.neoplus.adsl.tpnet.pl. [83.9.30.53]) by smtp.gmail.com with ESMTPSA id p13-20020a05651238cd00b004fdc7ec5cbesm2016936lft.300.2023.07.31.03.52.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 03:52:36 -0700 (PDT) From: Konrad Dybcio Date: Mon, 31 Jul 2023 12:52:21 +0200 Subject: [PATCH v2 05/10] interconnect: qcom: qcm2290: Hook up MAS_APPS_PROC's bus clock MIME-Version: 1.0 Message-Id: <20230726-topic-icc_coeff-v2-5-8c91c6c76076@linaro.org> References: <20230726-topic-icc_coeff-v2-0-8c91c6c76076@linaro.org> In-Reply-To: <20230726-topic-icc_coeff-v2-0-8c91c6c76076@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Michael Turquette , Stephen Boyd Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1690800744; l=2199; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=wbL0knkbb9r2z/rU8oFtpvr0ZnPgIjvL/nER+Pi+b14=; b=F54RLC1nkOXm1+NJ9KBW35GMKssUAl/upy5JEMNXbvCl5C58zJHTCq9IxqTACqRZbGMShABx8 F9eBe1EmhCyD8mGy/I8USvUDuSNKiMRPlF8oFfpATmduKCPgQXVzbES X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772938019283180326 X-GMAIL-MSGID: 1772938019283180326 This single node has its own clock which seems to be responsible for transactions between CPUSS (CPU + some stuff) and the GNOC. Define it and hook it up. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm-clocks.c | 6 ++++++ drivers/interconnect/qcom/icc-rpm.h | 1 + drivers/interconnect/qcom/qcm2290.c | 3 +++ 3 files changed, 10 insertions(+) diff --git a/drivers/interconnect/qcom/icc-rpm-clocks.c b/drivers/interconnect/qcom/icc-rpm-clocks.c index 63c82a91bbc7..ac1677de7dfd 100644 --- a/drivers/interconnect/qcom/icc-rpm-clocks.c +++ b/drivers/interconnect/qcom/icc-rpm-clocks.c @@ -25,6 +25,12 @@ const struct rpm_clk_resource bimc_clk = { }; EXPORT_SYMBOL_GPL(bimc_clk); +const struct rpm_clk_resource mem_1_clk = { + .resource_type = QCOM_SMD_RPM_MEM_CLK, + .clock_id = 1, +}; +EXPORT_SYMBOL_GPL(mem_1_clk); + const struct rpm_clk_resource bus_0_clk = { .resource_type = QCOM_SMD_RPM_BUS_CLK, .clock_id = 0, diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h index 1a26a7b82166..dc8e37c0a263 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -152,6 +152,7 @@ extern const struct rpm_clk_resource bimc_clk; extern const struct rpm_clk_resource bus_0_clk; extern const struct rpm_clk_resource bus_1_clk; extern const struct rpm_clk_resource bus_2_clk; +extern const struct rpm_clk_resource mem_1_clk; extern const struct rpm_clk_resource mmaxi_0_clk; extern const struct rpm_clk_resource mmaxi_1_clk; extern const struct rpm_clk_resource qup_clk; diff --git a/drivers/interconnect/qcom/qcm2290.c b/drivers/interconnect/qcom/qcm2290.c index 3c3b24264a5b..52a6eb32e832 100644 --- a/drivers/interconnect/qcom/qcm2290.c +++ b/drivers/interconnect/qcom/qcm2290.c @@ -112,6 +112,9 @@ static struct qcom_icc_node mas_appss_proc = { .qos.qos_mode = NOC_QOS_MODE_FIXED, .qos.prio_level = 0, .qos.areq_prio = 0, + .bus_clk_desc = &mem_1_clk, + .ab_coeff = 159, + .ib_coeff = 96, .mas_rpm_id = 0, .slv_rpm_id = -1, .num_links = ARRAY_SIZE(mas_appss_proc_links),