From patchwork Mon Jan 9 13:05: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: 13093521 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40F99C5479D for ; Mon, 9 Jan 2023 13:07:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236456AbjAINHe (ORCPT ); Mon, 9 Jan 2023 08:07:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233446AbjAINHR (ORCPT ); Mon, 9 Jan 2023 08:07:17 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD6DC32E86 for ; Mon, 9 Jan 2023 05:05:33 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id f34so12809409lfv.10 for ; Mon, 09 Jan 2023 05:05:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UT5KZHFU2APdX6WKtUWfM1YWxYsapsClz8r4c1DQ7os=; b=u80RPEj9hQlJGcXwm1t2XIvOcnMdfARhIhM8YGRn/ro5bCNJwMRYFkRftGzRk70xFV xHjH+7NMt7OSjY2vM3kXfCiDpV8DidpF2dRpJNNua/yHqSrQEXmGdeaSjQDfHu6B76JA iYBCoCgeFoso5PWfy5CTLpu32kuoCSKN3Js5SCSu/qFTiuf6rABkKaXwB7mZZ5SPEd5q MKFRZJGwEhXnbpcgdbIkCSBnqkMTGzVC95IuLUOWtQW6LLuu2vXPqz5/qJjKZ/xnjOhI ZpoVLV739lrMjrfMKlCjZ49MvZcikTsrhTevWqFFNgNqMajTD4nOElJ3S08B61qArP9Y 3KZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UT5KZHFU2APdX6WKtUWfM1YWxYsapsClz8r4c1DQ7os=; b=LPmGfawxzCai3ay5+lBu33frw577D9cyvSiW+u9Qwnqs4tHfBmrmVMYMwS++8ws07k aQ1P2I0Qb6VVaKgubaIy+kjD2QjDgHFcTBR7XBmHdlQFybShveXmnv0VzgzBWe8U4uwt etY/LPxILWrmWp/vE6IxVfRHhAoqn4j/1vzzpxuSGOSt2EuwAmQbJJlevM5HKxxrlGkW r9YtJ5ceC3zib6BYPDsZurIunChOPiXkAFWV6cshxcf0vhyirWo4GA3mgl3Xb+EguLYB mBy070J5pqziVZg5YCrc7txxiFKhAigYJ0sUy00hyRJHxrIyfbFMyEzOJhwp1JN9h+8b 4ulQ== X-Gm-Message-State: AFqh2kr8RtK3zPRQXU5lEjR7t/i7RLNXgH84RgF26hgjlTj6TWCPpNrh y3cYBGrILQfMct1k3xBusdBYUZA4mkyO2fo0 X-Google-Smtp-Source: AMrXdXvJoElnuck7QfwspDmIPoHohcnd+GMQiWGHC3zRmuSzILKv4e7Q+X+Na6wMs1ZDWVv40BTxrQ== X-Received: by 2002:ac2:43a4:0:b0:4cb:3a60:65cc with SMTP id t4-20020ac243a4000000b004cb3a6065ccmr6877919lfl.5.1673269527885; Mon, 09 Jan 2023 05:05:27 -0800 (PST) Received: from localhost.localdomain (abxi45.neoplus.adsl.tpnet.pl. [83.9.2.45]) by smtp.gmail.com with ESMTPSA id f1-20020a056512360100b004cc5e97d356sm1615031lfs.148.2023.01.09.05.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 05:05:27 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/3] dt-bindings: reserved-memory: rmtfs: Make qcom,vmid an array Date: Mon, 9 Jan 2023 14:05:21 +0100 Message-Id: <20230109130523.298971-1-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Some SoCs mandate that the RMTFS is also assigned to the NAV VM, while others really don't want that. Since it has to be conditional, turn qcom,vmid into an u32 array so that we can handle the NAV case, as well as other similar ones if they pop up in the future. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski --- v3 -> v4: - Constrain the vmid array .../devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml index 2998f1c8f0db..08eb10c25821 100644 --- a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml +++ b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml @@ -27,9 +27,11 @@ properties: identifier of the client to use this region for buffers qcom,vmid: - $ref: /schemas/types.yaml#/definitions/uint32 + $ref: /schemas/types.yaml#/definitions/uint32-array description: > - vmid of the remote processor, to set up memory protection + Array of vmids of the remote processors, to set up memory protection + minItems: 1 + maxItems: 2 required: - qcom,client-id From patchwork Mon Jan 9 13:05:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13093522 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 670AFC54EBE for ; Mon, 9 Jan 2023 13:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236731AbjAINHf (ORCPT ); Mon, 9 Jan 2023 08:07:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233296AbjAINHR (ORCPT ); Mon, 9 Jan 2023 08:07:17 -0500 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 D5240DFD for ; Mon, 9 Jan 2023 05:05:35 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id bq39so12889976lfb.0 for ; Mon, 09 Jan 2023 05:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PjtKBsVWMgW2GNrLzxrlTPfu2SeNxxyqf1piISfDRW4=; b=KCy8NCQr4FTC5yvXL+uWYFlwRFVQgxvS4bSsuh2yOuf1XOlsE/t9EMrCSoWppt5Xdp jw6mcBDXBFRnII7VuMlNooeCIjlGtNqmKP4G6xpj5+Hu+++iC8NiMa3cE8LvluMRpEfL i1ZP7f+yXGDVHZ5WawXpwpmu4WajyHcaHbyevUzXzY+vysnuwpIf6Fdbs0AwnPdAX5GN fDthPNVjVwh8LM9AKd8M0H/X7xiaOrJndOhxf+FhA80lVNcBr5XWfV4MetLXzdYnS9Lz 8ZbF3wAt7NLKXJ1aKfrv38EPCW0dknu25oEi6IELP3rLzk3M2Ed3jO1hd2JcZpnaj6U2 rBdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PjtKBsVWMgW2GNrLzxrlTPfu2SeNxxyqf1piISfDRW4=; b=CVbLvlLQY33B0A/tVSiOllSuKM5U8XHMKstiWwtqA1+zJvuAnUuLCjQKtLUBIA7a1l TVY4IfM0IGN6E1sPAB9Jjk/4nmEmF+s/SGRucmIy6m7y9v2EohaisbPsqQQ14LSWQgVq NGU/Lxek2fUAC3iGDLM1iLOVHBYaBfwhwaOdChQFP1sh+mCs5JsT2DmKuTaIL0bREV6J h4gW1U37zG3agt5hZ0moNKq60ubyFTeTHMQgwOvgTxrTOAsIZyu3mBFP4QQyL28IQFwa hkn1PcAPamCUhKB4ib90vOQg2qrsqhcw7kwEFDsuuMPyOlHewdyq2JkKmZgE5dWS7jDl 2MbA== X-Gm-Message-State: AFqh2koDsELCjInt1KhMwS4M1Rbe/zxsUG2WT04JDIq1gDQqbN62FOaN umfPWyrAAcNmQKVuIS44rScFP6y7dSm1LGpd X-Google-Smtp-Source: AMrXdXuwlQbA69Cc+KH4JH40+vtgHTn9f3ID5J0i5tA5eCZEbjUOcTII4YbpYww87qLbhRMPaxEJkg== X-Received: by 2002:a05:6512:b23:b0:4cb:d3:3b99 with SMTP id w35-20020a0565120b2300b004cb00d33b99mr16785246lfu.36.1673269530153; Mon, 09 Jan 2023 05:05:30 -0800 (PST) Received: from localhost.localdomain (abxi45.neoplus.adsl.tpnet.pl. [83.9.2.45]) by smtp.gmail.com with ESMTPSA id f1-20020a056512360100b004cc5e97d356sm1615031lfs.148.2023.01.09.05.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 05:05:29 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Loic Poulain , AngeloGioacchino Del Regno , Stephan Gerhold Subject: [PATCH v4 2/3] soc: qcom: rmtfs: Optionally map RMTFS to more VMs Date: Mon, 9 Jan 2023 14:05:22 +0100 Message-Id: <20230109130523.298971-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230109130523.298971-1-konrad.dybcio@linaro.org> References: <20230109130523.298971-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Loic Poulain Some SoCs require that RMTFS is also mapped to the NAV VM. Trying to power on the modem without that results in the whole platform crashing and forces a hard reboot within about 2 seconds. Add support for mapping the region to additional VMs, such as NAV to open a path towards enabling modem on such platforms. Signed-off-by: Loic Poulain [Konrad: reword, make conditional and flexible, add a define for NAV VMID] Signed-off-by: Konrad Dybcio --- v3 -> v4: No changes drivers/soc/qcom/rmtfs_mem.c | 29 ++++++++++++++++++++++------- include/linux/qcom_scm.h | 1 + 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/drivers/soc/qcom/rmtfs_mem.c b/drivers/soc/qcom/rmtfs_mem.c index 0feaae357821..9d59ad509a5c 100644 --- a/drivers/soc/qcom/rmtfs_mem.c +++ b/drivers/soc/qcom/rmtfs_mem.c @@ -17,6 +17,7 @@ #include #define QCOM_RMTFS_MEM_DEV_MAX (MINORMASK + 1) +#define NUM_MAX_VMIDS 2 static dev_t qcom_rmtfs_mem_major; @@ -171,12 +172,12 @@ static void qcom_rmtfs_mem_release_device(struct device *dev) static int qcom_rmtfs_mem_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; - struct qcom_scm_vmperm perms[2]; + struct qcom_scm_vmperm perms[NUM_MAX_VMIDS + 1]; struct reserved_mem *rmem; struct qcom_rmtfs_mem *rmtfs_mem; u32 client_id; - u32 vmid; - int ret; + u32 num_vmids, vmid[NUM_MAX_VMIDS]; + int ret, i; rmem = of_reserved_mem_lookup(node); if (!rmem) { @@ -226,7 +227,18 @@ static int qcom_rmtfs_mem_probe(struct platform_device *pdev) goto put_device; } - ret = of_property_read_u32(node, "qcom,vmid", &vmid); + num_vmids = of_property_count_u32_elems(node, "qcom,vmid"); + if (num_vmids < 0) { + dev_err(&pdev->dev, "failed to count qcom,vmid elements: %d\n", ret); + goto remove_cdev; + } else if (num_vmids > NUM_MAX_VMIDS) { + dev_warn(&pdev->dev, + "too many VMIDs (%d) specified! Only mapping first %d entries\n", + num_vmids, NUM_MAX_VMIDS); + num_vmids = NUM_MAX_VMIDS; + } + + ret = of_property_read_u32_array(node, "qcom,vmid", vmid, num_vmids); if (ret < 0 && ret != -EINVAL) { dev_err(&pdev->dev, "failed to parse qcom,vmid\n"); goto remove_cdev; @@ -238,12 +250,15 @@ static int qcom_rmtfs_mem_probe(struct platform_device *pdev) perms[0].vmid = QCOM_SCM_VMID_HLOS; perms[0].perm = QCOM_SCM_PERM_RW; - perms[1].vmid = vmid; - perms[1].perm = QCOM_SCM_PERM_RW; + + for (i = 0; i < num_vmids; i++) { + perms[i + 1].vmid = vmid[i]; + perms[i + 1].perm = QCOM_SCM_PERM_RW; + } rmtfs_mem->perms = BIT(QCOM_SCM_VMID_HLOS); ret = qcom_scm_assign_mem(rmtfs_mem->addr, rmtfs_mem->size, - &rmtfs_mem->perms, perms, 2); + &rmtfs_mem->perms, perms, num_vmids + 1); if (ret < 0) { dev_err(&pdev->dev, "assign memory failed\n"); goto remove_cdev; diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h index f8335644a01a..150b72edb879 100644 --- a/include/linux/qcom_scm.h +++ b/include/linux/qcom_scm.h @@ -55,6 +55,7 @@ enum qcom_scm_ice_cipher { #define QCOM_SCM_VMID_MSS_MSA 0xF #define QCOM_SCM_VMID_WLAN 0x18 #define QCOM_SCM_VMID_WLAN_CE 0x19 +#define QCOM_SCM_VMID_NAV 0x2B #define QCOM_SCM_PERM_READ 0x4 #define QCOM_SCM_PERM_WRITE 0x2 #define QCOM_SCM_PERM_EXEC 0x1 From patchwork Mon Jan 9 13:05:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13093523 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 691AEC5479D for ; Mon, 9 Jan 2023 13:07:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233738AbjAINHy (ORCPT ); Mon, 9 Jan 2023 08:07:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234691AbjAINHV (ORCPT ); Mon, 9 Jan 2023 08:07:21 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82FD727196 for ; Mon, 9 Jan 2023 05:05:43 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id bf43so12850066lfb.6 for ; Mon, 09 Jan 2023 05:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A85Hj2sYQJ0M2pCGuSbOsE3dYE86SavNJYR8ZErS730=; b=ykkKkU7ZATz8Dct73RoT7HCB4AZunV9Pg3q8e2FnBmyEj5I3qXuiRGvaqvnBL1bos5 D2nPAh3OAZ4tHFODsR+FHNCVVlbhSEKMKgs1PKdT9+qobzwm3RcO4v2zRqoLqI+4xWSj reJ82uZyjY8KjafkOfNjzu5IC4NPGWtnAAJ6z1dH6AY53zrMUqoU0tc0KRd/x51tfCsB DnTWJ8I1tx7kVoQ3upjZOZtZ8b7Unyj/fgyDpDdhxbOzHDIw/7MQGbvwo1LVl+0PC+hC fA/GLTYabbLpEt1/bfgxhpXGbYKfGLShmqEdhzsFhIr1IoS0vH7dU5NjviBYDBi/xpCF /LJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A85Hj2sYQJ0M2pCGuSbOsE3dYE86SavNJYR8ZErS730=; b=RAwOEn+/aWfqdf7QKXgpzQY/IR+ih8z3wr1kgXGa2cdhOT7fpH+cDjAb7ZO6EibYHy Ti6VR4jfVXPy4bsxcPkKwKn8bF6mcXxgLPqfEBkTgTl8UEcabr9CwoKHM8i8TlW5gcrX ITGiL23amV+3OYQA2NWgjllP4lBvvtiQZfvOWyOyLplGC4MPNvIeiTKmzyvBeAsffAPw iDkWbQkvpo/p0sSPNeyum699w0V0dEGfq7O/1CPgXyryH45sDEATjwfpp+OCTIhEoNls Op+ielNqqaHKHjmS/wPkNbGpwK9baXokvdAaV7HSQbx/8Rs7hPziNbNItNZHkZeMxaHp 5IsA== X-Gm-Message-State: AFqh2kp+he3US2GEUTOBXf21z+CmkQzQdlQW+c5/+Ak+CCqK+o0YjuNw 7zR2Onje8+Vz1xdlKq0zQKe5mGFelhZzsILr X-Google-Smtp-Source: AMrXdXuT74yTrDXoHXj6XcSvg22YF7D7zxmFRWG1XvQXVIeAf3sXADXGnHQI5BQJk8irzP6EaEi9ig== X-Received: by 2002:a05:6512:1385:b0:4ca:dd8a:8c1f with SMTP id p5-20020a056512138500b004cadd8a8c1fmr20012773lfa.22.1673269532661; Mon, 09 Jan 2023 05:05:32 -0800 (PST) Received: from localhost.localdomain (abxi45.neoplus.adsl.tpnet.pl. [83.9.2.45]) by smtp.gmail.com with ESMTPSA id f1-20020a056512360100b004cc5e97d356sm1615031lfs.148.2023.01.09.05.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 05:05:32 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno , Loic Poulain , Stephan Gerhold Subject: [PATCH v4 3/3] dt-bindings: firmware: qcom: scm: Separate VMIDs from header to bindings Date: Mon, 9 Jan 2023 14:05:23 +0100 Message-Id: <20230109130523.298971-3-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230109130523.298971-1-konrad.dybcio@linaro.org> References: <20230109130523.298971-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The SCM VMIDs represent predefined mappings that come from the irreplaceable and non-omittable firmware that comes with every Qualcomm SoC (unless you steal engineering samples from the factory) and help clarify otherwise totally magic numbers which we are required to pass to the secure world for some parts of the SoC to work at all (with modem being the prime example). On top of that, with changes to the rmtfs binding, secure VMIDs will become useful to have in device trees for readability. Separate them out and add to include/dt-bindings. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski --- v3 -> v4: - Improve the commit message - Dual-license include/dt-bindings/firmware/qcom,scm.h | 16 ++++++++++++++++ include/linux/qcom_scm.h | 7 ++----- 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 include/dt-bindings/firmware/qcom,scm.h diff --git a/include/dt-bindings/firmware/qcom,scm.h b/include/dt-bindings/firmware/qcom,scm.h new file mode 100644 index 000000000000..1a4e68fa0744 --- /dev/null +++ b/include/dt-bindings/firmware/qcom,scm.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ +/* + * Copyright (c) 2010-2015, 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (C) 2015 Linaro Ltd. + */ + +#ifndef _DT_BINDINGS_FIRMWARE_QCOM_SCM_H +#define _DT_BINDINGS_FIRMWARE_QCOM_SCM_H + +#define QCOM_SCM_VMID_HLOS 0x3 +#define QCOM_SCM_VMID_MSS_MSA 0xF +#define QCOM_SCM_VMID_WLAN 0x18 +#define QCOM_SCM_VMID_WLAN_CE 0x19 +#define QCOM_SCM_VMID_NAV 0x2B + +#endif diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h index 150b72edb879..1e449a5d7f5c 100644 --- a/include/linux/qcom_scm.h +++ b/include/linux/qcom_scm.h @@ -9,6 +9,8 @@ #include #include +#include + #define QCOM_SCM_VERSION(major, minor) (((major) << 16) | ((minor) & 0xFF)) #define QCOM_SCM_CPU_PWR_DOWN_L2_ON 0x0 #define QCOM_SCM_CPU_PWR_DOWN_L2_OFF 0x1 @@ -51,11 +53,6 @@ enum qcom_scm_ice_cipher { QCOM_SCM_ICE_CIPHER_AES_256_CBC = 4, }; -#define QCOM_SCM_VMID_HLOS 0x3 -#define QCOM_SCM_VMID_MSS_MSA 0xF -#define QCOM_SCM_VMID_WLAN 0x18 -#define QCOM_SCM_VMID_WLAN_CE 0x19 -#define QCOM_SCM_VMID_NAV 0x2B #define QCOM_SCM_PERM_READ 0x4 #define QCOM_SCM_PERM_WRITE 0x2 #define QCOM_SCM_PERM_EXEC 0x1