From patchwork Mon Aug 28 19:24:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 717947 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 4DECDC71153 for ; Mon, 28 Aug 2023 19:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233102AbjH1T15 (ORCPT ); Mon, 28 Aug 2023 15:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233215AbjH1T13 (ORCPT ); Mon, 28 Aug 2023 15:27:29 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38DAACF8 for ; Mon, 28 Aug 2023 12:27:06 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-31aeee69de0so3031608f8f.2 for ; Mon, 28 Aug 2023 12:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693250824; x=1693855624; 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=ZNNFEJol507fnnll/GiCNMd/EJ+bjC8uSrL8Nl+Ny9g=; b=j7RA/+VrPOlZBQ5ZrjTCRD88rvjaQzRCprr3Fjo2CBkgJh8MqVG4MImUUWi2SxaHxj vKqPWnPvy1l29LUin6CtTOosVFYO1ChAQcdMnhJMFlUU9sIjzsy6KGcuxrnkMkQGrENq aBsoy+/EDStX/CnqvBQ+lZyrkExXfg46rvK1y8eqeXbs1v2c1bHeaJKgG1tgirOJeAdc aynPcSXjqdoi1+x+/Ir489fr5QoC5W776XPcdBTDMlRxrPZG2HbvtzD5D9Pl+g1LrOz7 1NyD0axOq9zYjRBiPjgAuMAsv2JtfqVxZ5xCRzGAryJj7qlAxIVARgyPCmrgWdvUVoAP U76w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693250824; x=1693855624; 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=ZNNFEJol507fnnll/GiCNMd/EJ+bjC8uSrL8Nl+Ny9g=; b=U6DecJJWTMnG0HiQumclKMJ8KH91bz+lMpMDbbxzSGqL1nuuM5mcYkvBV8jNHULIjU mh3LJYYrzDZvrekwvyIPeUktCX45aXPwasvrcWMy0crb8Vb0XUsmhyRhep56GTo+1KsB eSiIm2F6gvFKsvQ841YDsQNGQVz+KYnhDneUyH1nv7B+NEa4ZcVBNiuNb2Yf9mVip3p6 DmdNLYjiTsQppF1g5lXlNX9csN0lM95AFJ8foDqX6cByyWxm2xhQkUg8cCoJFEG9Y5hF n/wG3VlYHlz172l/hBLM0uHbsoah1AXaPv9ZF0YpzDkPIWNjivsWrV+4u+TWeugexBZ5 LWwA== X-Gm-Message-State: AOJu0Yxq76pm4731WMX17KUD5CabMcRTCF60ku0PxE5EIrdgCpIUdf9S yYTzTDsFLDQLii2d+uLfqBoQNg== X-Google-Smtp-Source: AGHT+IFuspge895OlO/pS7GkSpr8Z2Vw74TPV8e/HYmtxE5aA4G5rRHHYITyGt3xIizf7aHsvM3LoQ== X-Received: by 2002:adf:f011:0:b0:317:6965:ef4d with SMTP id j17-20020adff011000000b003176965ef4dmr20205597wro.56.1693250824733; Mon, 28 Aug 2023 12:27:04 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:8bd:7f16:d368:115f]) by smtp.gmail.com with ESMTPSA id i20-20020a5d5234000000b003141f96ed36sm11435319wra.0.2023.08.28.12.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 12:27:04 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Arnd Bergmann , Alex Elder , Srini Kandagatla Cc: kernel@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 02/11] firmware: qcom-scm: order includes alphabetically Date: Mon, 28 Aug 2023 21:24:58 +0200 Message-Id: <20230828192507.117334-3-bartosz.golaszewski@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> References: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org For easier maintenance order the included headers in qcom_scm.c alphabetically. Signed-off-by: Bartosz Golaszewski --- drivers/firmware/qcom_scm.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index fde33acd46b7..980fcfa20b9f 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -2,24 +2,25 @@ /* Copyright (c) 2010,2015,2019 The Linux Foundation. All rights reserved. * Copyright (C) 2015 Linaro Ltd. */ -#include -#include -#include + +#include +#include #include #include -#include #include +#include +#include +#include #include +#include #include -#include -#include #include #include #include #include -#include +#include #include -#include +#include #include "qcom_scm.h" From patchwork Mon Aug 28 19:25:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 717946 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 EC2B5C83F1A for ; Mon, 28 Aug 2023 19:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233184AbjH1T16 (ORCPT ); Mon, 28 Aug 2023 15:27:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233357AbjH1T1b (ORCPT ); Mon, 28 Aug 2023 15:27:31 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2D28CFC for ; Mon, 28 Aug 2023 12:27:09 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31977ace1c8so3027966f8f.1 for ; Mon, 28 Aug 2023 12:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693250828; x=1693855628; 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=3ZrHrixjJTfHp+8KzhmU3pank8Phapb7i2mtd1W6FyY=; b=puIo2IYmdzRkxcG9l3U/HA/Sg/bMR7ddZh06USIZ8WWAxcqxmQ3oXvKlCP1rIvo/1f EJ+FfF2G9TuE01YI3u4K0goBfEGO4WTdfb+2f21LZakHyuWjX/6VqShPJ8dv5TbKaW6h +eon8GiAyTPeBWj61BPnSyg3okN1d+yOceB2dcNbiTDfwyzU5svZPhMqP2g6DGMkykhY Dr8qevmDAmw7xuM3bXc0Rrg40p7Kk8oU8BmjAaapE/Qe3HvwBgAlz7bLVEzNK7KzpQyF q3220k3N5ul3HDieX1NCJ2xahnND6ArBMyPGv7F1w0OcHiBRbW9EuewTofxa4kgryipL tztw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693250828; x=1693855628; 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=3ZrHrixjJTfHp+8KzhmU3pank8Phapb7i2mtd1W6FyY=; b=bz3gGt+um4qvUPK2MHLcX5ZxP6uWR/MBjSh6Rm9/WILz/MlnLLqDKPlyGWKHd5Yhs8 L6WGP1KiitBWOb36czIgS6U3qr5lIsSli8cov/zJsVDKgictWgGITVJUVO6wqkSo3jfk nzW0D7cNn41C5gprlzdfRrGuOEBVk9vZ3dKlwHFRZFM9L2xherY58ZM2W869+6X31iUb ++Hw+QhSPTIjknbet0ApZPPpaSFENBvrwTzU+5H0lTPeCi6z0kUOt3jgGvVfYfGy+jXq Dfn2FIo/dTJRliaLbRoXu8Xu56oUrRXVCRo8wgClaPS3HsJ3P81PRMydx1vfQW1BndN4 V6Aw== X-Gm-Message-State: AOJu0YywVLTmUOXiOHm0d/YbT3WrOZcuN/gOWjyIxOwIs64GHD6y+33E 8mV151SIHbanpKvtFVEDe67ZkQ== X-Google-Smtp-Source: AGHT+IEEGru84SUHFfCkbyGAXl1BVPJ1qKlE94RFGVLiLHe9WynVK7WBIN5FA+kPUAZAITnY+rRsNQ== X-Received: by 2002:adf:ec11:0:b0:313:f4e2:901d with SMTP id x17-20020adfec11000000b00313f4e2901dmr20276102wrn.22.1693250828356; Mon, 28 Aug 2023 12:27:08 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:8bd:7f16:d368:115f]) by smtp.gmail.com with ESMTPSA id i20-20020a5d5234000000b003141f96ed36sm11435319wra.0.2023.08.28.12.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 12:27:07 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Arnd Bergmann , Alex Elder , Srini Kandagatla Cc: kernel@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 05/11] dt-bindings: document the Qualcomm TEE Shared Memory Bridge Date: Mon, 28 Aug 2023 21:25:01 +0200 Message-Id: <20230828192507.117334-6-bartosz.golaszewski@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> References: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add Device Tree bindings for Qualcomm TEE Shared Memory Brige - a mechanism that allows sharing memory buffers between trustzone and the kernel. Signed-off-by: Bartosz Golaszewski --- .../bindings/firmware/qcom,shm-bridge.yaml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/firmware/qcom,shm-bridge.yaml diff --git a/Documentation/devicetree/bindings/firmware/qcom,shm-bridge.yaml b/Documentation/devicetree/bindings/firmware/qcom,shm-bridge.yaml new file mode 100644 index 000000000000..f660962b7b86 --- /dev/null +++ b/Documentation/devicetree/bindings/firmware/qcom,shm-bridge.yaml @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/firmware/qcom,shm-bridge.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: QCOM Shared Memory Bridge + +description: | + Qualcomm TEE Shared Memory Bridge allows sharing limited areas of kernel's + virtual memory with the trustzone in order to avoid mapping the entire RAM. + +maintainers: + - Bjorn Andersson + - Konrad Dybcio + - Bartosz Golaszewski + +properties: + compatible: + items: + - enum: + - qcom,shm-bridge-sa8775p + - qcom,shm-bridge-sm8150 + - qcom,shm-bridge-sm8450 + - const: qcom,shm-bridge + +required: + - compatible + +additionalProperties: false + +examples: + - | + firmware { + compatible = "qcom,shm-bridge-sa8775p", "qcom,shm-bridge"; + }; From patchwork Mon Aug 28 19:25:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 717945 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 5EE9EC83F1C for ; Mon, 28 Aug 2023 19:28:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233355AbjH1T2A (ORCPT ); Mon, 28 Aug 2023 15:28:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233360AbjH1T1c (ORCPT ); Mon, 28 Aug 2023 15:27:32 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BF3C18D for ; Mon, 28 Aug 2023 12:27:12 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-31adc5c899fso3201610f8f.2 for ; Mon, 28 Aug 2023 12:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693250831; x=1693855631; 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=5cFxADGOERyNFN7lTVtP33aE4fUtIdh4yla5Ms0ctiE=; b=EoXzrnanHjxRlCVdFNR3jEL/xRmfXMhI4RzAOrNmLf3G2biAWlM7vvmO7zLkPHT4iK 5Le0KJNfMSWSAwMlhFthLroTME9MfrlZuNQF5utevteIrmy0/Av5ZCo33of6uVD6MzZw A1KumZvLrH7LkMecujD0FPIYUstS5WpuDS37Ojb2nzciYE9Xh5rv0wqiVRJgNyR/eYOw epjjDQD+dBqlNcb4kQb7Sa60JXJvr7soJSrAuFyOkgWHC0Dit3u6CO0PaVO6+PsJ0nTy zKUet+A0wII8xV9lzUXPhMgXlFMm113iHCOpFEQhZhKXxSt/ZxNZqwZ+GN5YszttspJ7 Ks9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693250831; x=1693855631; 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=5cFxADGOERyNFN7lTVtP33aE4fUtIdh4yla5Ms0ctiE=; b=WaTJ02v5O6JQS2IumdsyFdN2+8iCU2zd0foqEt2TZcxp6304cNSVEW/5Tdi01S/GHO YU9+CeeyRmeiQY9UAdsdkBPT5U5M5RD6fzreMxhhdjWWYD49aECAopLXxMSHqjj2m31S Yc/lsTnrkpco9L1f/WPaZpIXjF/VTHEPPiz91AE77/jZUaDNNGQYkZYhr0lL0vszbaP3 zgV7tEf5Vz2wdj8Hze2Z9Il9JK3d3TaBqUSnQOi7TWqyAnSwlDmuQ7ECHM+I9ZAlv4SM LvlIhdA0qQ67ImS4PUDHv7fCQuewneHIf/5g+HziLJsmyumhFRwxc+VutQNm3ki95cCS RbYg== X-Gm-Message-State: AOJu0Yx7PuXje1Tf8eIE99jfP2vZ9ny28Iq7XSVNHqRFHFP6zu/eTkNH r7LOuHAXgPoeUHh4LIbiyvV6tQ== X-Google-Smtp-Source: AGHT+IFTdl/tQdMkT1arHw9DxZMr0l64zUqWz+qHpOkaOVV+i2xMx+CKkBv3fHfRzh8d+Cw4kcZ+EQ== X-Received: by 2002:a5d:4d02:0:b0:317:5a9b:fcec with SMTP id z2-20020a5d4d02000000b003175a9bfcecmr19670541wrt.14.1693250830785; Mon, 28 Aug 2023 12:27:10 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:8bd:7f16:d368:115f]) by smtp.gmail.com with ESMTPSA id i20-20020a5d5234000000b003141f96ed36sm11435319wra.0.2023.08.28.12.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 12:27:10 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Arnd Bergmann , Alex Elder , Srini Kandagatla Cc: kernel@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 07/11] firmware: qcom-scm: use SHM bridge if available Date: Mon, 28 Aug 2023 21:25:03 +0200 Message-Id: <20230828192507.117334-8-bartosz.golaszewski@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> References: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Allocate the memory for SCM call arguments from the Shared Memory Bridge if it's available. Signed-off-by: Bartosz Golaszewski --- drivers/firmware/qcom_scm-smc.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/qcom_scm-smc.c b/drivers/firmware/qcom_scm-smc.c index 16cf88acfa8e..6045be600c2a 100644 --- a/drivers/firmware/qcom_scm-smc.c +++ b/drivers/firmware/qcom_scm-smc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "qcom_scm.h" @@ -161,6 +162,7 @@ int __scm_smc_call(struct device *dev, const struct qcom_scm_desc *desc, ARM_SMCCC_SMC_32 : ARM_SMCCC_SMC_64; struct arm_smccc_res smc_res; struct arm_smccc_args smc = {0}; + bool using_shm_bridge = qcom_scm_shm_bridge_available(); smc.args[0] = ARM_SMCCC_CALL_VAL( smccc_call_type, @@ -173,8 +175,12 @@ int __scm_smc_call(struct device *dev, const struct qcom_scm_desc *desc, if (unlikely(arglen > SCM_SMC_N_REG_ARGS)) { alloc_len = SCM_SMC_N_EXT_ARGS * sizeof(u64); - args_virt = kzalloc(PAGE_ALIGN(alloc_len), flag); - + if (using_shm_bridge) + args_virt = qcom_shm_bridge_alloc(NULL, + PAGE_ALIGN(alloc_len), + flag); + else + args_virt = kzalloc(PAGE_ALIGN(alloc_len), flag); if (!args_virt) return -ENOMEM; @@ -196,7 +202,10 @@ int __scm_smc_call(struct device *dev, const struct qcom_scm_desc *desc, DMA_TO_DEVICE); if (dma_mapping_error(dev, args_phys)) { - kfree(args_virt); + if (using_shm_bridge) + qcom_shm_bridge_free(args_virt); + else + kfree(args_virt); return -ENOMEM; } @@ -208,7 +217,10 @@ int __scm_smc_call(struct device *dev, const struct qcom_scm_desc *desc, if (args_virt) { dma_unmap_single(dev, args_phys, alloc_len, DMA_TO_DEVICE); - kfree(args_virt); + if (using_shm_bridge) + qcom_shm_bridge_free(args_virt); + else + kfree(args_virt); } if (ret) From patchwork Mon Aug 28 19:25:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 717943 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 61BE5C83F28 for ; Mon, 28 Aug 2023 19:28:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233387AbjH1T2D (ORCPT ); Mon, 28 Aug 2023 15:28:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233369AbjH1T1d (ORCPT ); Mon, 28 Aug 2023 15:27:33 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F0E0195 for ; Mon, 28 Aug 2023 12:27:13 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3fea0640d7aso34115105e9.0 for ; Mon, 28 Aug 2023 12:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693250832; x=1693855632; 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=G5UUEotKM3KPlt75iPa8nyLWoLcrw4bhDYA2GP/3CkM=; b=Lp3+/vZEdk1adx7vtq1BnepUYuSHIxLzsE7TOETlCJv+KHKzzWc/PEKZK3dimcfIsN bN7K01zSTB+hfS2i3EsL9JQsvaIpTI1e8v3N5W26Y+FtkAoTUSG/xxLNB/pSzmmZp0oH xc8EZK9Pijy4WDWTNPvoqY7pPJhXZZ3PH/Q3RZn/YCVrLwEd1HX8x6POdo0Ibs5ZhFJH XxBawl9w5Ha2by7sr+qGcoDYI+rUFRdixvecdQ2+XPlM7V9GWEnJgIOcY6kkqsvEUkml Xgbz4lnheXMjGyxSS+M5BHDwcRRC3r/RZkZHESd6/3EACCw2B2K4jE1HCU/5G+jvyiNp 87SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693250832; x=1693855632; 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=G5UUEotKM3KPlt75iPa8nyLWoLcrw4bhDYA2GP/3CkM=; b=IGmUTylvjv8znHmRwA/6UeiBbFwU5JDggTu2kFP96QvfJdRDdQPQyR7R5ZscAiRR7Y titOwKIAz2S7UFsjz8RihUNwCqm2P8A9vPPcxY9p+EKIjQVvWuyH8CaFGBMMXmas73IV BjLi08njVoYvjgzhOjHKmDzLptUG4XWe4j8/GNSYBQO2d9qtKLDPGVV6RwKgBPyav5o/ gCVQfVmuqvqAq9idYFSYCZoro1CulN8Mg97mypI89u6c/+rltcixOZM6i6PBw5jP1Iaw KoYxBcj6zh664iOWPtQzcGFNKkR1SOuirQieg9M6S4xv4PbYsHoG0ebI5jgVSawaNWkW Z9VA== X-Gm-Message-State: AOJu0YxcnYXmkDCsFHoGl4c8Vr/Hz5LShUFc4iiEs1IcCxixo96at4mI SPK6CkXP/+P3YjhNk/MTrje66w== X-Google-Smtp-Source: AGHT+IGjgJy2rlEGsYdV6I6xyuANjKsdskic1BzqqdpwjuKQOjfX2n/VBEmdO4XGEgxS+FxXRwG0pA== X-Received: by 2002:adf:ce82:0:b0:317:43de:4c0a with SMTP id r2-20020adfce82000000b0031743de4c0amr18604895wrn.20.1693250831938; Mon, 28 Aug 2023 12:27:11 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:8bd:7f16:d368:115f]) by smtp.gmail.com with ESMTPSA id i20-20020a5d5234000000b003141f96ed36sm11435319wra.0.2023.08.28.12.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 12:27:11 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Arnd Bergmann , Alex Elder , Srini Kandagatla Cc: kernel@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 08/11] arm64: defconfig: enable Qualcomm SHM bridge module Date: Mon, 28 Aug 2023 21:25:04 +0200 Message-Id: <20230828192507.117334-9-bartosz.golaszewski@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> References: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Most Qualcomm architectures support SHM bridge. Enable it as a built-in module in arm64 defconfig. Signed-off-by: Bartosz Golaszewski --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index a25d783dfb95..7f982d9966e3 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -248,6 +248,7 @@ CONFIG_ARM_SCPI_PROTOCOL=y CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_INTEL_STRATIX10_SERVICE=y CONFIG_INTEL_STRATIX10_RSU=m +CONFIG_QCOM_SHM_BRIDGE=y CONFIG_EFI_CAPSULE_LOADER=y CONFIG_IMX_SCU=y CONFIG_IMX_SCU_PD=y From patchwork Mon Aug 28 19:25:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 717942 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 D8DEFC71153 for ; Mon, 28 Aug 2023 19:28:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233344AbjH1T2B (ORCPT ); Mon, 28 Aug 2023 15:28:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233408AbjH1T1e (ORCPT ); Mon, 28 Aug 2023 15:27:34 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFD841A6 for ; Mon, 28 Aug 2023 12:27:14 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-401b393df02so34951215e9.1 for ; Mon, 28 Aug 2023 12:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693250833; x=1693855633; 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=BAFaAAYoXtYBwsZEB5803CfYwT2H5kOVyLG4imLw9Ng=; b=sbvAYBnYvMtQ5zHvNb+ucyUQxsfswVBcZM/ar2F0dRfS4ewDAUJjw03AVtS1PWnf/G cqu+nYSS1d4AXk2m0hv8+daSi8iZwzboeUAqMjANlPobyJ4Ql3UmF0YL32U3XIiFpyA8 1DIW9fQFJ5Ip/1DW8HInCGLwdtV4tkc7IRqHHz6jtRn3J21+kMY4qQm/ggf61IbB6uPl oVX11YhXXQLkqHs7C5sR4eZEYLCZMXwEv/mW4idSCkyic1oUUc/H8kIO/YY4dw+mKkah Cs9YlbV6RRiwIYMsXxTH5lNlOFWngcE9JgNT68DaeWEY1CNd2XFQW+FNQxmWbmelwyTK E/IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693250833; x=1693855633; 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=BAFaAAYoXtYBwsZEB5803CfYwT2H5kOVyLG4imLw9Ng=; b=fx9noMHbDK/5r5r5C7AGRTT9lN9HNZQ099eyqyDOuOh+hw+8TvkHxBwX39hoyvlgGO tNM58CUlasrhs8UCFBfCCFnbQZ5jwNFrkLrIOnjeA8t8AlfOiCgEasIThr8SnpLBea5m hVWtZRrjM5p/HImNLYblhOZ4RTtcGiR6fO099qSz6Kpl05kj6nmocUS5oP1Q2jySbLES +R74u0WVHzgPmIfYcS/UDYjYnwrsY1OTRoCaxozBSzklm8xLunhcoQc/1tKAmHDUv5Ip oI7UzydsEzcgO83wZi4bMRAvn9fy1VblkEJXKarcE2EliUV/ms2pIG95ZHgLE9YaLRVb Wpiw== X-Gm-Message-State: AOJu0Yy0mqMz3pHKZD3pnFFFwm4hQLSDrHoxAo7HUJOIrtGDw+BKtRdA /GgIrgLqGx47sQSqpJhwy/+8IA== X-Google-Smtp-Source: AGHT+IERZ8Tk7ITAPI5IRbPu9geaRPRqJ6/1sXAiQvTPNpFfS2XTgFIfNp/PGkXNe/7dmFA1ZZGAcg== X-Received: by 2002:a1c:7908:0:b0:3fe:22a9:907 with SMTP id l8-20020a1c7908000000b003fe22a90907mr19589642wme.20.1693250833266; Mon, 28 Aug 2023 12:27:13 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:8bd:7f16:d368:115f]) by smtp.gmail.com with ESMTPSA id i20-20020a5d5234000000b003141f96ed36sm11435319wra.0.2023.08.28.12.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 12:27:12 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Arnd Bergmann , Alex Elder , Srini Kandagatla Cc: kernel@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 09/11] arm64: dts: qcom: sm8450: enable SHM bridge Date: Mon, 28 Aug 2023 21:25:05 +0200 Message-Id: <20230828192507.117334-10-bartosz.golaszewski@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> References: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable SHM bridge on sm8450 platforms. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 5cd7296c7660..eacb2658e3ec 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -289,6 +289,10 @@ scm: scm { interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>; #reset-cells = <1>; }; + + shm-bridge { + compatible = "qcom,shm-bridge-sm8450", "qcom,shm-bridge"; + }; }; clk_virt: interconnect-0 { From patchwork Mon Aug 28 19:25:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 717944 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 BF149C83F20 for ; Mon, 28 Aug 2023 19:28:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233379AbjH1T2B (ORCPT ); Mon, 28 Aug 2023 15:28:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233423AbjH1T1e (ORCPT ); Mon, 28 Aug 2023 15:27:34 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FB771AA for ; Mon, 28 Aug 2023 12:27:16 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-31dca134c83so1169425f8f.3 for ; Mon, 28 Aug 2023 12:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693250834; x=1693855634; 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=LCx6rX9XwkuTbZO5oGRhSEBk5e7OaZJRubi6F2ucuO0=; b=kbalgKaBhIdUuKiRYkEoB9PjGYYgWzArZwbNwkwnDpDl2p8QWr0ZHt7WAyE7J9OEVS qOKK+GJCEwqq7V8OTL4qtinpwf74jAJjquHEn6PNN4/WJQxRpQDVmu+fRkkZG9JqCpkZ whLI1B+OhxOabfnsiYrTZPyZaVOdcl2qknkH0MfRSHE7+KHqdC8U9WmWLdNm7HDU02Ov 0bvmWDhy9DMP6lq7X2xzwiPm4Vr9MBkhtIsj3Uu2Qb4ko8nk3PTXPSW/falJDJRPq/Cl 3ud4CiLp3RUSsy9QVbIkVoFL5gMf6QdBrna+VPjN+RpVQnivOz/0mAw4PnlbRy04IAVV 5YmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693250834; x=1693855634; 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=LCx6rX9XwkuTbZO5oGRhSEBk5e7OaZJRubi6F2ucuO0=; b=K8cIyeUrYX2sLuVN2LrbWOWKBc7ys6JlZJqkiDwPmdqLtPBcn65ErZKEUP8ZyiLuiY zitP31NdiBq1f/csjcLOXtwzY821X2PRBLwLTlr8Iy7CZGRaTS0TiCVcNI5mZwaObbvR RxHL1XFpLBhme3LNqWLsJbAZNadAdXiA7NWVj1hYi77X38uA5dHTqEVIfOgv7H+DAn5F Bf9Hi0aKV8cBGlfIWgVIX396wkjgx6z4OGB7jJKeWA0W426ETueF6hGYKsFRxHF2ZDHk mEaKqLENUbCT9xitJtIKZeI39rXy/4M/DrzWO8PTTzt/q3bXW283ZOXCaJyZZGH67/wn kFUw== X-Gm-Message-State: AOJu0YxMWMqLXdbG1ey+gEB6uG29N4+goyvM4h+yK3z6qchGMC6F4yDj cPIzyoFnXJpjB4TVEW26CtT+hg== X-Google-Smtp-Source: AGHT+IGonPCG2HR4mwHMevXIU/ybI7JuPnQYVr3ZJNLHR2Fi7PQuFZCK98LCZMFUwA5tvpeKIA0xJA== X-Received: by 2002:adf:ef91:0:b0:318:f7a:e3c8 with SMTP id d17-20020adfef91000000b003180f7ae3c8mr20535179wro.57.1693250834586; Mon, 28 Aug 2023 12:27:14 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:8bd:7f16:d368:115f]) by smtp.gmail.com with ESMTPSA id i20-20020a5d5234000000b003141f96ed36sm11435319wra.0.2023.08.28.12.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 12:27:14 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Arnd Bergmann , Alex Elder , Srini Kandagatla Cc: kernel@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 10/11] arm64: dts: qcom: sa8775p: enable SHM bridge Date: Mon, 28 Aug 2023 21:25:06 +0200 Message-Id: <20230828192507.117334-11-bartosz.golaszewski@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> References: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable SHM bridge on sa8775p platforms. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi index b130136acffe..d8614d15750e 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi @@ -209,6 +209,10 @@ firmware { scm { compatible = "qcom,scm-sa8775p", "qcom,scm"; }; + + shm-bridge { + compatible = "qcom,shm-bridge-sa8775p", "qcom,shm-bridge"; + }; }; aggre1_noc: interconnect-aggre1-noc {