From patchwork Fri Jun 9 20:19:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 105806 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1172804vqr; Fri, 9 Jun 2023 13:43:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5aQsEwXOjApMVLxOVWUnvErUBA16PfsCuDKpNiPkCSX1rY/heB3k1yiWNe2k1ZfPg/FAwR X-Received: by 2002:a17:902:b192:b0:1b1:9218:6bf9 with SMTP id s18-20020a170902b19200b001b192186bf9mr1894503plr.43.1686343428008; Fri, 09 Jun 2023 13:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686343427; cv=none; d=google.com; s=arc-20160816; b=w0Q0vIEhwHRlAz34ifuEJPR5NX5XXTQ9wGTghGwcdqxIh/Ge4FTt6qBN1xFsn1Uk+q 08RAsAUy/QUjhVjan6/hv6ed3nM7ZF+JEdOzmdFRwKpWA55UeUzxELUK69wUN4Xfjosl LVqqtoMiEhCxj9kRg4J0v1z1PqFaWk0aHPLvIUfqrRNkHtEh3RJ29WaOwnSrPxlucIhX jxPz/2HeyOwV63VrAmIY1Eei3hLGOvElZWMyixqlJeZLrK7CISAb7LcC0hTT89DJgysj +ZmFWnsZwlhYK02qOArsV0J0v/3SKVpPJoNwW5Q8ITw6JDizYBLAx2PG02P05dfwHQaR smnw== 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=6yqoaw1SJxAVA4zfoNJA8WPzYaF2aeMvPE6QC7WXXuk=; b=sI47AOg64uIWtgeTv8MPOeVvR04d2HFnBnWT557JiS/AOVoXknixY+0udEkgwWOule etW3EQp9nPuWXAG04w/LJ1JR4FopEPDD4CsV+/irGVQQRPG95ZbTXqs+BYVDEYTENDak xgCEp1Be23AiZPuybMcjOmc7TWL/MoBkSdTeVSsLmwhrNS08LLny9T/PwOFjDNwS7FTL zYB3/YO0nGziwfgmFErxDZNPr5IqlFuEj0CkhizRMT5RDyROX16qzt6SHM5V0FpA9bUC gL27bnsG7uuQzGVSFjocgDMSdOzyOEyGc9jmVj3wTg77m+idzJFqz90pfLkxETYq00EZ U1zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kue55f1H; 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 i10-20020a17090a2aca00b002568fd9b741si3156866pjg.144.2023.06.09.13.43.34; Fri, 09 Jun 2023 13:43:47 -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=Kue55f1H; 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 S231534AbjFIUUF (ORCPT + 99 others); Fri, 9 Jun 2023 16:20:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231964AbjFIUTp (ORCPT ); Fri, 9 Jun 2023 16:19:45 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFF7635B5 for ; Fri, 9 Jun 2023 13:19:25 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4f122ff663eso2738878e87.2 for ; Fri, 09 Jun 2023 13:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686341964; x=1688933964; 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=6yqoaw1SJxAVA4zfoNJA8WPzYaF2aeMvPE6QC7WXXuk=; b=Kue55f1HrIY//vS2uD1QxfmeWRhNBHHGUe4PGho3Ex007ChMgT3W05Cixg0RP3YZh9 Zkvxqw+9ryMD5SjbqvyiokTpTzF8CdqBLKSs8LE7vvQj1QzGmPlYonWcgvq7h5m83Ryx i7B+oQDlMyZ7mC5Mxo4QgF+tG4eqWKNnYNoyhpQ5cVLsGfN4lZe4SfTjM/ZirlxLPbnK 9ze+Ax048qcb39cVmwH8LmGt0EewH8dwOl56FsyeKUcVazCNoXT5hsc6jR9EljxZhgOs WAfwOyZFhgtV0vmc1Ycv0rbdQUK6apPSQ8qSAWA53EckbQ5LPLxyS97FpFlImVnUVsUO HPJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686341964; x=1688933964; 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=6yqoaw1SJxAVA4zfoNJA8WPzYaF2aeMvPE6QC7WXXuk=; b=AFM+9+d5Y1lP/TC6qPJelBv87iL3jLsohaor9BT1daIes3JASsVvPfwugoajhTTjJX /Qze0fc1oWsJbf/T5qoCCm6iL9qvmA9wRe8WJWEottixdJTmxarmDsNqQ11FTRtcSE9c PVPN7vIBNOeF3PAGehGp4DoiuHYIeCYoSIEl7plCk2wle0zAQ1IgG4RiIhyoic4JUoZo bJvyVlRU+82tfw2tayWao38hOdGVlbWPemuf848mNfg2f3v7T/o8STD+8v2FQ24Rtz9/ kVHMUtDxLH64V1KioX0DoT/IWqOFLw4GuTVPf3Her0UrPnPMLLqgulN4O89od8ZnM4U+ swXw== X-Gm-Message-State: AC+VfDz9ilBv5AExdp3plYPN4X+fGA7mp3WRtI3LxeZP1lU+f+lNySit oljkKOkgekI5CLOOmzWV1+Rl0w== X-Received: by 2002:a19:5e58:0:b0:4f3:aa74:2faf with SMTP id z24-20020a195e58000000b004f3aa742fafmr1527910lfi.6.1686341964241; Fri, 09 Jun 2023 13:19:24 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id b18-20020ac25632000000b004f628eb7884sm641349lff.232.2023.06.09.13.19.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 13:19:23 -0700 (PDT) From: Konrad Dybcio Date: Fri, 09 Jun 2023 22:19:12 +0200 Subject: [PATCH v2 07/22] interconnect: qcom: Fold smd-rpm.h into icc-rpm.h MIME-Version: 1.0 Message-Id: <20230526-topic-smd_icc-v2-7-e5934b07d813@linaro.org> References: <20230526-topic-smd_icc-v2-0-e5934b07d813@linaro.org> In-Reply-To: <20230526-topic-smd_icc-v2-0-e5934b07d813@linaro.org> To: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Georgi Djakov , Leo Yan , Evan Green Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, Konrad Dybcio , Dmitry Baryshkov X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1686341953; l=5451; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=byYAlps9wH1OSJiblDOBqmeTnt9HlHHvwOPwDsuq8eU=; b=TNaoCQCvOGFaZOGxrOiTnZ9Mzo/7T2dJeHgUSmI0k6uRHFoQnWYtbc7RQyorpoJIyZbW61nyg MzTI5qdXtzWC6o5TXzTMl2jR3VZH1nISG1wEB6n2Mgmz1N6ANiS0wqO 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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768259246202777183?= X-GMAIL-MSGID: =?utf-8?q?1768259246202777183?= smd-rpm.h is not very useful as-is and both files are always included anyway.. Combine them. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 1 - drivers/interconnect/qcom/icc-rpm.h | 5 +++++ drivers/interconnect/qcom/msm8916.c | 1 - drivers/interconnect/qcom/msm8939.c | 1 - drivers/interconnect/qcom/msm8974.c | 2 +- drivers/interconnect/qcom/msm8996.c | 1 - drivers/interconnect/qcom/qcm2290.c | 1 - drivers/interconnect/qcom/qcs404.c | 1 - drivers/interconnect/qcom/sdm660.c | 1 - drivers/interconnect/qcom/smd-rpm.c | 2 +- drivers/interconnect/qcom/smd-rpm.h | 15 --------------- 11 files changed, 7 insertions(+), 24 deletions(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index 863e8ba1daa2..b8ecf9538ab9 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -14,7 +14,6 @@ #include #include -#include "smd-rpm.h" #include "icc-common.h" #include "icc-rpm.h" diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h index ba840a436cc0..9b4ea4e39b9f 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -6,6 +6,8 @@ #ifndef __DRIVERS_INTERCONNECT_QCOM_ICC_RPM_H #define __DRIVERS_INTERCONNECT_QCOM_ICC_RPM_H +#include + #include #define RPM_BUS_MASTER_REQ 0x73616d62 @@ -121,4 +123,7 @@ enum qos_mode { int qnoc_probe(struct platform_device *pdev); int qnoc_remove(struct platform_device *pdev); +bool qcom_icc_rpm_smd_available(void); +int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val); + #endif diff --git a/drivers/interconnect/qcom/msm8916.c b/drivers/interconnect/qcom/msm8916.c index 5c4ba2f37c8e..196b05879896 100644 --- a/drivers/interconnect/qcom/msm8916.c +++ b/drivers/interconnect/qcom/msm8916.c @@ -15,7 +15,6 @@ #include -#include "smd-rpm.h" #include "icc-rpm.h" enum { diff --git a/drivers/interconnect/qcom/msm8939.c b/drivers/interconnect/qcom/msm8939.c index caf0aefad668..639566dce45a 100644 --- a/drivers/interconnect/qcom/msm8939.c +++ b/drivers/interconnect/qcom/msm8939.c @@ -16,7 +16,6 @@ #include -#include "smd-rpm.h" #include "icc-rpm.h" enum { diff --git a/drivers/interconnect/qcom/msm8974.c b/drivers/interconnect/qcom/msm8974.c index 1828deaca443..968162213d40 100644 --- a/drivers/interconnect/qcom/msm8974.c +++ b/drivers/interconnect/qcom/msm8974.c @@ -38,7 +38,7 @@ #include #include -#include "smd-rpm.h" +#include "icc-rpm.h" enum { MSM8974_BIMC_MAS_AMPSS_M0 = 1, diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c index 20340fb62fe6..1f7e88a37acd 100644 --- a/drivers/interconnect/qcom/msm8996.c +++ b/drivers/interconnect/qcom/msm8996.c @@ -18,7 +18,6 @@ #include #include "icc-rpm.h" -#include "smd-rpm.h" #include "msm8996.h" static const char * const mm_intf_clocks[] = { diff --git a/drivers/interconnect/qcom/qcm2290.c b/drivers/interconnect/qcom/qcm2290.c index a29cdb4fac03..cb636e67a5a4 100644 --- a/drivers/interconnect/qcom/qcm2290.c +++ b/drivers/interconnect/qcom/qcm2290.c @@ -19,7 +19,6 @@ #include #include "icc-rpm.h" -#include "smd-rpm.h" enum { QCM2290_MASTER_APPSS_PROC = 1, diff --git a/drivers/interconnect/qcom/qcs404.c b/drivers/interconnect/qcom/qcs404.c index fae155344332..938283ddd0e3 100644 --- a/drivers/interconnect/qcom/qcs404.c +++ b/drivers/interconnect/qcom/qcs404.c @@ -13,7 +13,6 @@ #include -#include "smd-rpm.h" #include "icc-rpm.h" enum { diff --git a/drivers/interconnect/qcom/sdm660.c b/drivers/interconnect/qcom/sdm660.c index 7ffaf70d62d3..003fc7d110a7 100644 --- a/drivers/interconnect/qcom/sdm660.c +++ b/drivers/interconnect/qcom/sdm660.c @@ -17,7 +17,6 @@ #include #include "icc-rpm.h" -#include "smd-rpm.h" enum { SDM660_MASTER_IPA = 1, diff --git a/drivers/interconnect/qcom/smd-rpm.c b/drivers/interconnect/qcom/smd-rpm.c index dc8ff8d133a9..b0183262ba66 100644 --- a/drivers/interconnect/qcom/smd-rpm.c +++ b/drivers/interconnect/qcom/smd-rpm.c @@ -13,7 +13,7 @@ #include #include -#include "smd-rpm.h" +#include "icc-rpm.h" #define RPM_KEY_BW 0x00007762 diff --git a/drivers/interconnect/qcom/smd-rpm.h b/drivers/interconnect/qcom/smd-rpm.h deleted file mode 100644 index ca9d0327b8ac..000000000000 --- a/drivers/interconnect/qcom/smd-rpm.h +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (c) 2019, Linaro Ltd. - * Author: Georgi Djakov - */ - -#ifndef __DRIVERS_INTERCONNECT_QCOM_SMD_RPM_H -#define __DRIVERS_INTERCONNECT_QCOM_SMD_RPM_H - -#include - -bool qcom_icc_rpm_smd_available(void); -int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val); - -#endif