From patchwork Mon Jan 9 09:39:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13093208 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 2EDD6C678D6 for ; Mon, 9 Jan 2023 09:40:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236413AbjAIJkR (ORCPT ); Mon, 9 Jan 2023 04:40:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236536AbjAIJjx (ORCPT ); Mon, 9 Jan 2023 04:39:53 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8EAA64C2 for ; Mon, 9 Jan 2023 01:39:52 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id bu8so12058074lfb.4 for ; Mon, 09 Jan 2023 01:39:52 -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=UNTaDPZQqhVq4tCzrzCuljd/XD3ZPbp8/ypK1cVwGwY=; b=CPUR6B+jNtotVqY2UYOeu8rcJ2IpwscSOTa/JAs47etYOQYg+CCe6xB2qjOnPBMyYD 1+KYXNrTeRcCt3awfE/yVcyO+zaUXaFk4XrheU8l5UytoH0jlAfXUWRibpI2iFAlcqOC 1etvmoXcuK4+ePu7PUmpqeJHq29+3GCtRw/vsecL98qaOSFR1+o4PB9AgTL3fetDonEO hAn7gQ397i6kEHHKJ3wjZI6we3lA+1IWIbWRtZeMW+C+E6QTO/S6rtrvZHfN09ySdx2M YT8UU1WUb9TO+dRAruSHVePuK3bFRVtHq2VFtXk3a3vHyJ9nWT1cOAhJjZB5H+kubtfc kv8g== 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=UNTaDPZQqhVq4tCzrzCuljd/XD3ZPbp8/ypK1cVwGwY=; b=G+wucPO+m6LAKr45rqHR3bMJ1rBYfrq0w6etcicf2da86u1uRuSkb73DAS+bnBbtF0 xDUbX8CpuDXYIFQdLhIMMKxv0GuDEJNe+3YKZVBQbxgasvOvghDpexMlqyNmkhKRpkfM kNztB3rkIkXesbr+UgefIPGUTTOOC0eQS1KjkdBnR3tE8NV2i4M2mM70PnTkbYmmErNn cQmuwi1GB4dazCNip7se1q/Tz72ZBPMs/Sm1COtIPSWnuaQmf++YwWTZxPUeHp2ii0/0 c3tJvshN/s9vvZKbJMutkjRBKjjdniPE21K1I+ClH7W79+DPcqqyrXrLYflOXd5FV4vV PvCA== X-Gm-Message-State: AFqh2koGhQZOksG+yjeTVNL2nlEwx/SOhBFlUANQo1jzLQfBGl6NP+jw xYc2kdRGZGXWcBNcOAvLgIVENzhwWWSiF7ni X-Google-Smtp-Source: AMrXdXu/wrlCYPLir5cDEo8fvUFWfAWn8v2j8TSteO483W9sHij3qpDDMhUkB30pgA+iubC/4K1zpg== X-Received: by 2002:a05:6512:3ba1:b0:4cb:f3d:c47f with SMTP id g33-20020a0565123ba100b004cb0f3dc47fmr15579492lfv.51.1673257190939; Mon, 09 Jan 2023 01:39:50 -0800 (PST) Received: from localhost.localdomain (abxi45.neoplus.adsl.tpnet.pl. [83.9.2.45]) by smtp.gmail.com with ESMTPSA id b8-20020a056512060800b004cb1de3f487sm1526257lfe.104.2023.01.09.01.39.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 01:39:50 -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 v3 1/3] dt-bindings: reserved-memory: rmtfs: Make qcom,vmid an array Date: Mon, 9 Jan 2023 10:39:45 +0100 Message-Id: <20230109093947.83394-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 --- v2 -> v3: Rewrite to accomodate for changes, don't pick up tags .../devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml | 4 ++-- 1 file changed, 2 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..cfc2fda30eba 100644 --- a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml +++ b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml @@ -27,9 +27,9 @@ 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 required: - qcom,client-id From patchwork Mon Jan 9 09:39:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13093209 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 3B63EC54EBE for ; Mon, 9 Jan 2023 09:40:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233106AbjAIJkQ (ORCPT ); Mon, 9 Jan 2023 04:40:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236694AbjAIJj6 (ORCPT ); Mon, 9 Jan 2023 04:39:58 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5142B64E2 for ; Mon, 9 Jan 2023 01:39:55 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id bp15so12026224lfb.13 for ; Mon, 09 Jan 2023 01:39:55 -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=DlSrO19imkFWHjtVxLiPaME8EodVCSuJJSxNid8kMXw=; b=v0H9MSMl7JeXAJjrf7tfZwVk87wKMAwFZDXnJvk10G6QGBYbbwJWGS410gW0oLJlJ3 rJdp1p1pXGyxSs+VGNZL4V5wYra49D9x6cRt1dFiwFL8fPZp3Ib8MatgDTouJnCTjnQS JyEppg01sGP2rykpmncriog3a8G3EX6kJ7KsX7XLsnPNv7rCS0BU5ATZA8zcpbFHVAKs R5UKU8Sh/zydFn1Jb+q49TSgdnhb/WFsAHIi6JwlZz27tm0QZF3p8F6xdkX1vTJQH4xQ 7IFoOkATexkbYLk6Qc8IwWG0TK87nKl98Y/Kt5nI/xXyrFjj2+ktTRl7wS+x4rE+3Tzx UEew== 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=DlSrO19imkFWHjtVxLiPaME8EodVCSuJJSxNid8kMXw=; b=sV+9O/Xt5omlZN6iktPXg5bR1BngTKPEExGa5l8wpflI7J/rPwVeG4LEC0/d005VKw 08ntYZLqp1LNxqAAFLYnz61o7O2Ts/6lRmmj9Sm6pMcQbxPYvQm6X2Tsz3VOgrgsOeea WTvov1GfTLkqC0WEeBufeVLpd3SK31VJfsxbWEJGTrCgab84pLYBfGcOm4NC3vutpxH+ EMBmdIHI0/D6ZUgxruMaqKF8fyjCNY5lbfkC4YhyRnAc2H0dzjsxm6Fhq+as1qPYwTV5 z87oIM29A4VT9rQZjSXDRWkjBsAR0X7WwBEl5hFf6Ql4KI/v+/GFjvlgJGtDvGdanKbb Xs2g== X-Gm-Message-State: AFqh2koBpmaD/lcivNrkz9PNEPSWpnxoQShvbWJN7tCgdUHheO7jdmwZ 25hmKoAlMLgUC4FCiD98ooHc3hd6uBIMdlbU X-Google-Smtp-Source: AMrXdXu2EONeoS2PIcFkA507dUo2SiqiY15c4LlXOfOEvggtM71+5brDckb/khEefXYQl/2U1c+1pQ== X-Received: by 2002:a19:650a:0:b0:4aa:978:32fb with SMTP id z10-20020a19650a000000b004aa097832fbmr21904725lfb.31.1673257193054; Mon, 09 Jan 2023 01:39:53 -0800 (PST) Received: from localhost.localdomain (abxi45.neoplus.adsl.tpnet.pl. [83.9.2.45]) by smtp.gmail.com with ESMTPSA id b8-20020a056512060800b004cb1de3f487sm1526257lfe.104.2023.01.09.01.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 01:39:52 -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 , Dmitry Baryshkov , Stephan Gerhold Subject: [PATCH v3 2/3] soc: qcom: rmtfs: Optionally map RMTFS to more VMs Date: Mon, 9 Jan 2023 10:39:46 +0100 Message-Id: <20230109093947.83394-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230109093947.83394-1-konrad.dybcio@linaro.org> References: <20230109093947.83394-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 --- v2 -> v3: Rewrite, make it accept more than just NAV through qcom,vmid 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 09:39:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13093207 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 ADEC9C63797 for ; Mon, 9 Jan 2023 09:40:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234302AbjAIJkQ (ORCPT ); Mon, 9 Jan 2023 04:40:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236722AbjAIJkB (ORCPT ); Mon, 9 Jan 2023 04:40:01 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 443A1647F for ; Mon, 9 Jan 2023 01:40:00 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id bf43so12061399lfb.6 for ; Mon, 09 Jan 2023 01:40:00 -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=ufujsNyRyRXVthgeDnKR1JnzQQ3nZCe2ShZJg4elUjI=; b=oc+o3+22TMYTFJn99cdWpQZBxPYIHylp+CzpQPD6nHR/qpLHSk6f3SH7q99DZaP9W1 ZfH9xpxBb0qvHbKqKxcJakPgHxZAqdGv9susMsPFvTqyX2L2kYVJrs+Oeu2hdKEl/q8G hWmwPlbad/sqL3Y5pJDMMJcbRbgQFfPkBY9TGbg8zHVRlHYg+NkbNYep6azeTbZTe6Y9 /uPLqwliR9zYiL9FuXfJEEgtUYqzQtwMZV0BPNpQ4P5jdanFUZ0eNvDJDvwrNuapthzi T7b7frWcnQxfMoWUyANktgub8ZM9nEzLEM0RUafyXCTdw3csXPpZXuFvkT5XZDpyD2r9 F2qw== 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=ufujsNyRyRXVthgeDnKR1JnzQQ3nZCe2ShZJg4elUjI=; b=x+i7E7k7bA9Jt00/1T5PohcyyRs75RU7JLfRh0Bs3yUedMqUw5eRpF1t9GIkNC23c9 tpjB1e1Saz6SBytRrDvJNn3hy9OsW0xAP8c4TR+akhUXe0n5jBhzO/mI1pXREDeiT2ED PLMrqhZC9K69u/4r15rSgu40kqe569YEhKoIdBVNaY7QC5xaRiH0Ap+k7ZJ3h/QbkmOZ hwOLoh9bCC+2Cur+2bQPY0ynE2wd6Y6h3IJSePULJo5RYj4tI5jsqioEWLS4phJV8RrE fFqAolH9ciD4kmRFzMuwdXnwaTXL6n5AMsOq3b9Nn14rqToKx0gUb2LAihnEP2xGxFTE jC9g== X-Gm-Message-State: AFqh2ko7jsu9qLsYWSBMGZaxTdd689AonlgjBQz92s4SbRq7/NRbdgHx +vJJXIpHIQXuib6mhvX7dLJ1x+Y+21f3NaSh X-Google-Smtp-Source: AMrXdXvEkW4fNqTy03QLPug/lDifYKEkZXvh5lb4F/lZA+xRZsvZC8OslySCt/DxLHljV5TcHMn/0Q== X-Received: by 2002:a05:6512:ea2:b0:4b5:5bcc:cbcd with SMTP id bi34-20020a0565120ea200b004b55bcccbcdmr18713152lfb.0.1673257198397; Mon, 09 Jan 2023 01:39:58 -0800 (PST) Received: from localhost.localdomain (abxi45.neoplus.adsl.tpnet.pl. [83.9.2.45]) by smtp.gmail.com with ESMTPSA id b8-20020a056512060800b004cb1de3f487sm1526257lfe.104.2023.01.09.01.39.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 01:39:58 -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 , Stephan Gerhold , Loic Poulain Subject: [PATCH v3 3/3] dt-bindings: firmware: qcom: scm: Separate VMIDs from header to bindings Date: Mon, 9 Jan 2023 10:39:47 +0100 Message-Id: <20230109093947.83394-3-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230109093947.83394-1-konrad.dybcio@linaro.org> References: <20230109093947.83394-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org With changes to the rmtfs binding, secure VMIDs will become useful to have in device trees. Separate them out and add to include/dt-bindings. Signed-off-by: Konrad Dybcio --- v2 -> v3: New patch 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..d66818cd57a8 --- /dev/null +++ b/include/dt-bindings/firmware/qcom/scm.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * 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..b0d285b08c9f 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