From patchwork Tue Sep 28 04:45:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 12521721 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11C30C433F5 for ; Tue, 28 Sep 2021 04:45:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D76C0610FC for ; Tue, 28 Sep 2021 04:45:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238905AbhI1Eqy (ORCPT ); Tue, 28 Sep 2021 00:46:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbhI1Eqx (ORCPT ); Tue, 28 Sep 2021 00:46:53 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22101C061604 for ; Mon, 27 Sep 2021 21:45:15 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id z11so28547185oih.1 for ; Mon, 27 Sep 2021 21:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=94MqB0gQILsi8/WKWtcPzu8DS559IzH+wAM9SzL16fk=; b=TMblAA0g17RHsOf3aJeueA3RmAn8jmOUyi0d9rz9rRTkk5+DfqLrOijbmPvuWkNQaW zcIsMXhwdfT2JM717r9FxDtowvTXCmm6Oy+UvjCAGrYtjVfDPyftnon68WQqTckm/Ehv cySYFRvsjeCmoHnmduSOtL/m737ojFbfpzIPmmvP9v2OqysI3xPyQLM2sTXg7xNnRhyU veZ7oOcn5GRF3sTBqWQD6LIPRzn0VBLs2iMEWN/SrjZgAcLnzHZm/cQpAtFwhlSVlwH0 yJ2Ji/TvccsP37r8Qaky5tGNn06ngjmFQOYQZKzZyTzCT0YB7EoQKd0g30LM34dmzmFV XVpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=94MqB0gQILsi8/WKWtcPzu8DS559IzH+wAM9SzL16fk=; b=VOiKed+Tyj6CGxuNQKPctvJmy+RiumTSTun0NFcLRsohbM7Zq15Nr4aD+6d1MtS98a a8zmU9dhShkpEGnyNX3+yju93QPLjqmKR7CjETyE2PSAeiDaaZeMoroYoR7xvfYxWQpJ vHrxNoOvQyOXrRqUWiWNqSxedkx0UhKZ3PbU1npHlEae044ITxFamqt/nuNHicRQ4yTM 2K9cJS6a95CGRo3t30MgAAef3dSmP6YK8XykULkinFONh7dfnZSzCV8BqCMBnZnoAPtm irsI8HTYEBPq8R1aKmHx2IptgNuHzjtFLB9LJ83AgMlWCDDYjVVRoEIMqWUN2X4agDMI LoSg== X-Gm-Message-State: AOAM533HBPJ3LlF/7aQBBDto8DNujGoRZxe7uwVPtlPQKtB6qUZlAyy6 rMvGpIwGNgC08a5R1sdXQA56bQ== X-Google-Smtp-Source: ABdhPJxDIRKDnylIaJQj/D+35NbZGygx61MRSo6BWHVerJFiEDgq/HfuU/wqnmiLgX9pCunJzKmmgg== X-Received: by 2002:a05:6808:1141:: with SMTP id u1mr2135512oiu.123.1632804314458; Mon, 27 Sep 2021 21:45:14 -0700 (PDT) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id x29sm2553341oox.18.2021.09.27.21.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 21:45:14 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Rob Herring , Frank Rowand Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: soc: smem: Make indirection optional Date: Mon, 27 Sep 2021 21:45:44 -0700 Message-Id: <20210928044546.4111223-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org In the olden days the Qualcomm shared memory (SMEM) region consisted of multiple chunks of memory, so SMEM was described as a standalone node with references to its various memory regions. But practically all modern Qualcomm platforms has a single reserved memory region used for SMEM. So rather than having to use two nodes to describe the one SMEM region, update the binding to allow the reserved-memory region alone to describe SMEM. The olden format is preserved as valid, as this is widely used already. Signed-off-by: Bjorn Andersson --- .../bindings/soc/qcom/qcom,smem.yaml | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smem.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.yaml index f7e17713b3d8..4149cf2b66be 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smem.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.yaml @@ -10,14 +10,18 @@ maintainers: - Andy Gross - Bjorn Andersson -description: | - This binding describes the Qualcomm Shared Memory Manager, used to share data - between various subsystems and OSes in Qualcomm platforms. +description: + This binding describes the Qualcomm Shared Memory Manager, a region of + reserved-memory used to share data between various subsystems and OSes in + Qualcomm platforms. properties: compatible: const: qcom,smem + reg: + maxItems: 1 + memory-region: maxItems: 1 description: handle to memory reservation for main SMEM memory region. @@ -29,11 +33,19 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: handle to RPM message memory resource + no-map: true + required: - compatible - - memory-region - hwlocks +oneOf: + - required: + - reg + - no-map + - required: + - memory-region + additionalProperties: false examples: @@ -43,6 +55,20 @@ examples: #size-cells = <1>; ranges; + smem@fa00000 { + compatible = "qcom,smem"; + reg = <0xfa00000 0x200000>; + no-map; + + hwlocks = <&tcsr_mutex 3>; + }; + }; + - | + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + smem_region: smem@fa00000 { reg = <0xfa00000 0x200000>; no-map; From patchwork Tue Sep 28 04:45:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 12521723 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58641C433FE for ; Tue, 28 Sep 2021 04:45:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3AE9E61157 for ; Tue, 28 Sep 2021 04:45:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238913AbhI1Eq4 (ORCPT ); Tue, 28 Sep 2021 00:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235159AbhI1Eqy (ORCPT ); Tue, 28 Sep 2021 00:46:54 -0400 Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAB6DC061575 for ; Mon, 27 Sep 2021 21:45:15 -0700 (PDT) Received: by mail-oo1-xc35.google.com with SMTP id e16-20020a4ad250000000b002b5e1f1bc78so251058oos.11 for ; Mon, 27 Sep 2021 21:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vRzGhEMXchIY55D13bcq5jzx75HCS4FbYSUPBwMzgvM=; b=QrJ++pvDZOLabP7PuFL2zHxkYIasTvmcBxrj3qji7l1em1YvOFnDkmWWuB4w1epuK1 n6+V0/DN9brplMD1Lpmr45unx491w5gaJv0j7SxaFmUD2xd8N8F7lm7XcRyb8VCffYAy F+4WkQldcGmQokS05/O97mgBVXgmfqrws2708UvAjtn4ygTJEf2U9oxajxjutCraPU/+ 4kJqF0vuMchIY40xiiJjb6nKo0OPN8fSVTg0eykIEJxymvARljxX67n4zEvtVBwC1MNO HLGghTiiiXSdGw9tA3PPxXDV85hTQ7nFXw0CjThJfwOujkP0umIzFWUM4aS3kfgQjYfn Gc/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vRzGhEMXchIY55D13bcq5jzx75HCS4FbYSUPBwMzgvM=; b=aOitJvv83QOYiWCldpB2yhpGpNvXG47U33UCr/682USqUo6DfbwZiDa7A/yj5gbtUE GDdHY7nqqfH6PMa3j6fPbkG9E8oZbuoZ1F6ekQ6ivuLvGcaoXC9AkyIECVc0nFFwTqY2 XhIQznrZ/Fx0FkdSUmiJBXROM/1Z4m5D4J9QsDPyEnjOZEh0mWBmsEefRJj4rRi/i82o 0MO8f9AxOuSG5qMNbkd+Ig8PmDBbGP2FzV1QzE6+2obQya4wX8d0u+XlJzTD8LJCJEEx JPnm1bziZiU0h30cSPtI/hixTxfP94baLq49fLTmWMckrg7Oy2Z4CsQa6uzGtwVrE4Aq GE6Q== X-Gm-Message-State: AOAM531brEDjMBzyBpu7HT3g/7z2Il4p4EpRKWY3nk8ZIhq8GVzZL0m4 bQYqg5qPilKk1b8Nhes+yChdMw== X-Google-Smtp-Source: ABdhPJyzcTkQcTYam5q6TbZYkwkpVo9JZNqfasrZ/mUOCU0QQ2yRfodKN8s+jmOHyTzoG/xh6FXDHw== X-Received: by 2002:a4a:3ecd:: with SMTP id t196mr3209527oot.69.1632804315151; Mon, 27 Sep 2021 21:45:15 -0700 (PDT) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id x29sm2553341oox.18.2021.09.27.21.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 21:45:14 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Rob Herring , Frank Rowand Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] soc: qcom: smem: Support reserved-memory description Date: Mon, 27 Sep 2021 21:45:45 -0700 Message-Id: <20210928044546.4111223-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210928044546.4111223-1-bjorn.andersson@linaro.org> References: <20210928044546.4111223-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Practically all modern Qualcomm platforms has a single reserved-memory region for SMEM. So rather than having to describe SMEM in the form of a node with a reference to a reserved-memory node, allow the SMEM device to be instantiated directly from the reserved-memory node. The current means of falling back to dereferencing the "memory-region" is kept as a fallback, if it's determined that the SMEM node is a reserved-memory node. The "qcom,smem" compatible is added to the reserved_mem_matches list, to allow the reserved-memory device to be probed. In order to retain the readability of the code, the resolution of resources is split from the actual ioremapping. Signed-off-by: Bjorn Andersson --- drivers/of/platform.c | 1 + drivers/soc/qcom/smem.c | 57 ++++++++++++++++++++++++++++------------- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 32d5ff8df747..07813fb1ef37 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -505,6 +505,7 @@ EXPORT_SYMBOL_GPL(of_platform_default_populate); static const struct of_device_id reserved_mem_matches[] = { { .compatible = "qcom,rmtfs-mem" }, { .compatible = "qcom,cmd-db" }, + { .compatible = "qcom,smem" }, { .compatible = "ramoops" }, { .compatible = "nvmem-rmem" }, {} diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index 4fb5aeeb0843..c7e519bfdc8a 100644 --- a/drivers/soc/qcom/smem.c +++ b/drivers/soc/qcom/smem.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -240,7 +241,7 @@ static const u8 SMEM_INFO_MAGIC[] = { 0x53, 0x49, 0x49, 0x49 }; /* SIII */ * @size: size of the memory region */ struct smem_region { - u32 aux_base; + phys_addr_t aux_base; void __iomem *virt_base; size_t size; }; @@ -499,7 +500,7 @@ static void *qcom_smem_get_global(struct qcom_smem *smem, for (i = 0; i < smem->num_regions; i++) { region = &smem->regions[i]; - if (region->aux_base == aux_base || !aux_base) { + if ((u32)region->aux_base == aux_base || !aux_base) { if (size != NULL) *size = le32_to_cpu(entry->size); return region->virt_base + le32_to_cpu(entry->offset); @@ -664,7 +665,7 @@ phys_addr_t qcom_smem_virt_to_phys(void *p) if (p < region->virt_base + region->size) { u64 offset = p - region->virt_base; - return (phys_addr_t)region->aux_base + offset; + return region->aux_base + offset; } } @@ -863,12 +864,12 @@ qcom_smem_enumerate_partitions(struct qcom_smem *smem, u16 local_host) return 0; } -static int qcom_smem_map_memory(struct qcom_smem *smem, struct device *dev, - const char *name, int i) +static int qcom_smem_resolve_mem(struct qcom_smem *smem, const char *name, + struct smem_region *region) { + struct device *dev = smem->dev; struct device_node *np; struct resource r; - resource_size_t size; int ret; np = of_parse_phandle(dev->of_node, name, 0); @@ -881,13 +882,9 @@ static int qcom_smem_map_memory(struct qcom_smem *smem, struct device *dev, of_node_put(np); if (ret) return ret; - size = resource_size(&r); - smem->regions[i].virt_base = devm_ioremap_wc(dev, r.start, size); - if (!smem->regions[i].virt_base) - return -ENOMEM; - smem->regions[i].aux_base = (u32)r.start; - smem->regions[i].size = size; + region->aux_base = r.start; + region->size = resource_size(&r); return 0; } @@ -895,12 +892,14 @@ static int qcom_smem_map_memory(struct qcom_smem *smem, struct device *dev, static int qcom_smem_probe(struct platform_device *pdev) { struct smem_header *header; + struct reserved_mem *rmem; struct qcom_smem *smem; size_t array_size; int num_regions; int hwlock_id; u32 version; int ret; + int i; num_regions = 1; if (of_find_property(pdev->dev.of_node, "qcom,rpm-msg-ram", NULL)) @@ -914,13 +913,35 @@ static int qcom_smem_probe(struct platform_device *pdev) smem->dev = &pdev->dev; smem->num_regions = num_regions; - ret = qcom_smem_map_memory(smem, &pdev->dev, "memory-region", 0); - if (ret) - return ret; + rmem = of_reserved_mem_lookup(pdev->dev.of_node); + if (rmem) { + smem->regions[0].aux_base = rmem->base; + smem->regions[0].size = rmem->size; + } else { + /* + * Fall back to the memory-region reference, if we're not a + * reserved-memory node. + */ + ret = qcom_smem_resolve_mem(smem, "memory-region", &smem->regions[0]); + if (ret) + return ret; + } - if (num_regions > 1 && (ret = qcom_smem_map_memory(smem, &pdev->dev, - "qcom,rpm-msg-ram", 1))) - return ret; + if (num_regions > 1) { + ret = qcom_smem_resolve_mem(smem, "qcom,rpm-msg-ram", &smem->regions[1]); + if (ret) + return ret; + } + + for (i = 0; i < num_regions; i++) { + smem->regions[i].virt_base = devm_ioremap_wc(&pdev->dev, + smem->regions[i].aux_base, + smem->regions[i].size); + if (!smem->regions[i].virt_base) { + dev_err(&pdev->dev, "failed to remap %pa\n", &smem->regions[i].aux_base); + return -ENOMEM; + } + } header = smem->regions[0].virt_base; if (le32_to_cpu(header->initialized) != 1 || From patchwork Tue Sep 28 04:45:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 12521725 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 351C2C433F5 for ; Tue, 28 Sep 2021 04:45:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2641E61139 for ; Tue, 28 Sep 2021 04:45:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235159AbhI1Eq5 (ORCPT ); Tue, 28 Sep 2021 00:46:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbhI1Eqz (ORCPT ); Tue, 28 Sep 2021 00:46:55 -0400 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 781B9C06176A for ; Mon, 27 Sep 2021 21:45:16 -0700 (PDT) Received: by mail-oi1-x230.google.com with SMTP id n64so9195100oih.2 for ; Mon, 27 Sep 2021 21:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jKrFYQbVmIe+dhzGAjc1VtNM8uE4C6GnX/epkEN2A2w=; b=mtcq60eptWxV634R2t+ONfOuSk3sV5WKjNRaRBnasymHVuxUlS02osiUxKMHS/GKQG LMR+K0TLil8QYlfufI6nhfe00nVHfoM6znSmkatnHN1EX2u8WOEZK+Iecszvh0dXmlIg F8KUXUT2yZdhv4RGsNwTPY+/Lxe80QYeBaLq3h8mIRf3sqfsNxbDt8Ax+gPnVCpYrCpF Xs3JB3u7fvTeUyGhYLdQLp1bkniE9JoPK1WlX/u1w96uf5+FqthQ9T/lSAhTaMKdE7XT AAJZmVa8p3ylIOmg0+M+MwF5j3acNx4CLk30NVaf9mxUZbrv5i8xoVxN+d0x6QBbFHYQ tFaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jKrFYQbVmIe+dhzGAjc1VtNM8uE4C6GnX/epkEN2A2w=; b=VQL/yukjcV1WGSfva9XOxzh4p12oOvGM0yFYsNZTW8dK4Tqy2kPwerx2lwmsHvNXrJ y5PLeuQjFu3XXmrMfKM6GANaHKORmOnA6klck+ibkXC3iNikLYTnhMTHFzHogHVDLdFR ooojf5qcqsXHUjrlhiM6q//nA9S5hNOLvcLhhFsz4HCjucNRk7W1AI/TYiKQeNliKGVj 9aevhlpLcfdIm32rKNmtmyoA/+hth9LVQOxHWcC4y/loV/cjz+j8Sb2U1wqoSBbsNg71 0H3+f+5eQwY71ciAoEbygjMG03JVWRUUXKIwAZdbEVSj4bti/OrmrntPbC8z1zYZ39we vPxw== X-Gm-Message-State: AOAM531NGWEiQNQ0QjewiWmm2ji43DXE5bWCifmSRgpbK/rNawMiIAOy WrdEinmeRaLKu6xi5Im3cucEug== X-Google-Smtp-Source: ABdhPJz/3hdsDNYQscFjm7jGLKZgf/J7BYyEvihJDaD+7+SAAJ6EC/wMmTlVr48xgAMqu4ANAzKlow== X-Received: by 2002:a05:6808:11c8:: with SMTP id p8mr2155127oiv.72.1632804315874; Mon, 27 Sep 2021 21:45:15 -0700 (PDT) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id x29sm2553341oox.18.2021.09.27.21.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 21:45:15 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Rob Herring , Frank Rowand Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] arm64: dts: qcom: sdm845: Drop standalone smem node Date: Mon, 27 Sep 2021 21:45:46 -0700 Message-Id: <20210928044546.4111223-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210928044546.4111223-1-bjorn.andersson@linaro.org> References: <20210928044546.4111223-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Now that the SMEM binding and driver allows the SMEM node to be described in the reserved-memory region directly, move the compatible and hwlock properties to the reserved-memory node and drop the standadlone node. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index beee57087d05..2800eae61910 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -99,9 +99,11 @@ aop_cmd_db_mem: memory@85fe0000 { no-map; }; - smem_mem: memory@86000000 { + memory@86000000 { + compatible = "qcom,smem"; reg = <0x0 0x86000000 0 0x200000>; no-map; + hwlocks = <&tcsr_mutex 3>; }; tz_mem: memory@86200000 { @@ -941,12 +943,6 @@ tcsr_mutex: hwlock { #hwlock-cells = <1>; }; - smem { - compatible = "qcom,smem"; - memory-region = <&smem_mem>; - hwlocks = <&tcsr_mutex 3>; - }; - smp2p-cdsp { compatible = "qcom,smp2p"; qcom,smem = <94>, <432>;