From nobody Sat Feb 7 16:23:25 2026 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A3A41B4244 for ; Tue, 21 Jan 2025 06:58:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442690; cv=none; b=gAM1Oix/jX5SvfMgcW+Pdszrl/X01Xpbk1gLULRFspFdECktC1D2dzAHLizhNSYhZpvvZTkDRSVi4I4IgsryO2rBeOnbRFbLI8rC/5VoXHUo+Y+Z8mkWrLRIVKRqAE4vn6jjNaMO4O4R3n1ZEJranRa737HOHgsjrR+y+8uFkLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442690; c=relaxed/simple; bh=djsCwHBeiUOwF/Yd8BMUBqFrBmr86DPuyw8Pm87LhvQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=riRMFxoYA9Pylr/VoqIR+kIWGRgXa33RCE8k5zhrAopypCXCmCSIvA+NXdtdufNhp/S58NuzHg47HGtvGhp45Ub96QkJJ07xSPj9zpFKnXevwULVwmp3kU6ZYv5Z3XnopHkcq4BM8pm5QC6Qww1aH1RLWvPWK9swMZlG4EKHszo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=RdMMRvsD; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RdMMRvsD" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2ef72924e53so8976028a91.3 for ; Mon, 20 Jan 2025 22:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737442688; x=1738047488; darn=vger.kernel.org; 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=QCx1SvldvWoqbxgFpon2TvezEPjA28Rr/LhgNlRp79Q=; b=RdMMRvsDhWjbVMl63l+RssiXW6Bln9hYnhgN5N3D022tzes4EX2NEqLR3ME6bewh/b ewGNnTF4vSOUOztvap6kimj5Pcjnk+cymJp+ukDpBGUsi+tu0Sq8YR/dxOYCd8BGEdD4 DWPEVE1PJpvnRp3tma5mKXRq8HK31XhVBruhfL+msRhDWjnJ/ma28uwES8Xunddv181c b2RfHAp+rqfEhxVcXH6Fu4JG3TP2eSoYScAI+x/FmBsYDEjS0jYkXgkt1za7iZZbFz7O n5M7gix9rOwW8CvuPbzQSmbVLbWiHFv5c667McK0le2LJ+dfRexZzNWqNyHJUjskYW5M 2Hbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737442688; x=1738047488; 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=QCx1SvldvWoqbxgFpon2TvezEPjA28Rr/LhgNlRp79Q=; b=ADDCZzFXRopwUOf7IQ0fYkmywyMzs73gWbbu6em6D9/PjQydZNRsUqKLCA0iNulmsE sn0oIlPSfSufBK6MaTdTTEr5aF5M9cC6W4duEXggN62NQHtTpMUImKpDL0Az94+8klNn HkhPDhk0/4MrgTHihUArrUkC3f4o1gfti7AED2HlK275H52iHWrYcEKebcgBFa0wkTHj hUSiNjQzlQBxhAVOwcB4PP7cjdIdeIRCsRtoSBbtSSzWeTVpSiWodSqMbYLRGg3gjPUD IgF7hzW60Qm+DggPQLsszSotoIo8G65TOUBUUfYnCdgHzcafZPAjTMP/4d69wiTmiBt9 bp/A== X-Forwarded-Encrypted: i=1; AJvYcCVeD0A+76jYBPJjh3IGNqAyjQuXUvdmQIsF0GGyga+MT3rOpbMoZHKBC3e81z7jKH0FoJz8X7VAynrmmZs=@vger.kernel.org X-Gm-Message-State: AOJu0YxKUOgyAg4RkONACjdDiqLIQVT5qEftFtcUZfyv4Hgd1U/KM+NH XPxKN7soJrOnK9AMVa04t3aUQKEpE9HIBU2cziCZDX0Vc/tuFknuMkMyIhTXeTU= X-Gm-Gg: ASbGncswUJK/b531ztEub+GrlbmCkd5pmB9tV1Lq5EzoJrfx6N67B2Wfk1o4E04Jjor c2etvfP35mGAQRK8QbJ6uUqrxRCQAGsfRpDBCjmFx+nOMVB2IOIIgvS44jIDp84gzMga8mf8JAD tXT1RZRCZJjhqnwGE/AIKGJL9M7E0A8e+JwVVHxzi5WJ8ed2ysHTQ5iLntJLeh4Ma6rYgyOh9+p 8biX4XXKZ3WCKVRHWXwDBrkU5P2OqgzZCaWln1+ERjSBxP3Z0s1VWNUuxYq3ULMC/ebgVhfxX48 9EdBbxE= X-Google-Smtp-Source: AGHT+IGTDgpQAVNZjtI+Oozrv4Z3daBIVHvUM9SOBabufsgddCoyXMampLgmx/TFMSSuDp+9U6Vdbw== X-Received: by 2002:a05:6a00:4c18:b0:72d:8d98:c250 with SMTP id d2e1a72fcca58-72daf9a5535mr23615446b3a.4.1737442687760; Mon, 20 Jan 2025 22:58:07 -0800 (PST) Received: from localhost ([122.172.84.139]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72dabaa2388sm8294524b3a.157.2025.01.20.22.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 22:58:07 -0800 (PST) From: Viresh Kumar To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Viresh Kumar Cc: Vincent Guittot , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bill Mills , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: firmware: Add bindings for ARM FFA Date: Tue, 21 Jan 2025 12:26:38 +0530 Message-Id: <505bb9d66e8d4d8e505201eced6751b6fd6b1dcf.1737441631.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This adds DT bindings for ARM's FFA framework. The bindings are used to provide a reserved memory region per FFA device. Signed-off-by: Viresh Kumar --- .../devicetree/bindings/firmware/arm,ffa.yaml | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree/bindings/firmware/arm,ffa.yaml diff --git a/Documentation/devicetree/bindings/firmware/arm,ffa.yaml b/Docu= mentation/devicetree/bindings/firmware/arm,ffa.yaml new file mode 100644 index 000000000000..b88d6cec7e16 --- /dev/null +++ b/Documentation/devicetree/bindings/firmware/arm,ffa.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2021 ARM Ltd. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/firmware/arm,ffa.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Arm Firmware Framework for A-class + +maintainers: + - Viresh Kumar + +description: | + ARM FFA (Arm Firmware Framework for A-class) is a framework designed to + facilitate communication and resource sharing between various software + components in an Arm system, such as operating systems, hypervisors, and + trusted execution environments (TEEs). It's particularly used in systems + leveraging the Armv8-A architecture and later. + + This binding is intended to define the interface the firmware implementi= ng the + FFA provide in the device tree. + + https://developer.arm.com/documentation/den0077/ + +properties: + $nodename: + pattern: '^ffa(-[a-z0-9]+)?$' + + compatible: + const: arm,ffa + + vm-id: + description: Virtual machine identifier. + $ref: /schemas/types.yaml#/definitions/uint32 + + uuid: + description: Universally Unique Identifier. + $ref: /schemas/types.yaml#/definitions/uint32-matrix + minItems: 4 + maxItems: 4 + + memory-region: + maxItems: 1 + description: + Reserved memory allocated for sharing with other software components. + +additionalProperties: false + +required: + - compatible + - vm-id + - uuid + +examples: + - | + reserved-memory { + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges; + + ffa_2_mem: ffamem@81000000 { + compatible =3D "restricted-dma-pool"; + reg =3D <0x81000000 0x00800000>; + }; + }; + + firmware { + ffa { + compatible =3D "arm,ffa"; + vm-id =3D <2>; + uuid =3D <0xc5b82091 0x48bbd4fe 0x244de7b7 0xbe28bb6e>; + memory-region =3D <&ffa_2_mem>; + }; + }; +... --=20 2.31.1.272.g89b43f80a514 From nobody Sat Feb 7 16:23:25 2026 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4F0A1B4259 for ; Tue, 21 Jan 2025 06:58:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442693; cv=none; b=Js/J8y4xBHNSPHJv4kYdu+haQJniSiPnsQra9gvr8iQ72T3wlv8u/MZhtyYm0tVXdlh9yRbyQZXUtdobMRqR1YwZiWNcHbKYeWWN7KvizI6wJ7Br6J2iJ7RUYmPPWiKkzOUT18w+Y2/tmgz6PgBKCFhZdjQ3aPCj2eTBaNCQAhg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442693; c=relaxed/simple; bh=T1pBMaGk5baRmqTS6Iw9P4tMLICkdyWulPPuIw3tc64=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nb0KBMGYA4LAl1ip0nareEq7Ye1iotL6xTQT0RZrKTcP31A7WVXEUJ6tqu179jqhWLQg5/G6nRYnnjcQ5JoEddLu1J3nkhgh4KVcOKxGJuY15QiMFy492+SArzNx6z4ar424UGD8byIunwAOpmKIVjJFtE3izlrtrGqXc1XvP6g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mXMywNHe; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mXMywNHe" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-21bc1512a63so97384505ad.1 for ; Mon, 20 Jan 2025 22:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737442691; x=1738047491; darn=vger.kernel.org; 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=CYN8MRS1RnP1foydPVEerv8n1UG6uH1Hz3MnU6KlRGQ=; b=mXMywNHeth410sVFBJ6SlUfca0k7/yt5v6hwi2Rqw9xMdf+/WC9LpLTzCOEUfUlNRj Hrerxoa2GnglCF7tnbO/keP5QPLiBARPh/A6l0yLRZSI8IbvHQRLzYYfNjP6t81wHYpn aD+bICSdasEHGUV9LF0oA/hxVXQr+rcOBCcwDIQJ23VXwZByXJAzbbkdPHdw1s+/9z9x 91Bm3T7yS893xb2ISlbcSUegv0SE2oEHSXAS4HetTeob37o3TfBdKQ7PRzZbF30kZqyr CN3gNeZoGsNIAAPCNgbaKpUzinYhO0MB2BlsCrDxKEpMA/2n9t3kTQO3r8OVE4TvRM8z 6gYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737442691; x=1738047491; 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=CYN8MRS1RnP1foydPVEerv8n1UG6uH1Hz3MnU6KlRGQ=; b=Ej9AXmAvAFsunGZWOyG8jtQiUk4kS68yI2qV0f3KVxPuTaMKGk0RH9mTaurVOQ2VHT rpen5YOEQ3mUV+8hil7e1NDOTvPn2Y2QgTHSaeHIAwzNZfIzdxQGfuWb6Kf0AlxgP9gq Pt6H4luodVVgxe/CjyenYlcbstgOMUsGyu6gZ/bT9NDgvFQoOhY1EK0xuZZz9QA1MlEd r06Xcp+acB14ZOp5FVXOvUc7frtZljW/FAIE3QkrC4f+E1PXTq3Hw7VJs2jWuGlcD77C 6UOIxcYNfjrt+1dvZUqxFmL/jicllG7tsGCJazDElemLLkOfVu5hEKln3em2Dsh7qVJj dwSA== X-Forwarded-Encrypted: i=1; AJvYcCVz3LctiJ9D0DX/CbBPdHJNlVFxrzNjmwys/4BEA7uVaPjdpkUitvW52hkSU4Q2naVebm19G0LOHwpsdSA=@vger.kernel.org X-Gm-Message-State: AOJu0YyWEDwHBDGRrfu00aW7Xi0F/eB1hz9CBx3nhjZM9dZleIfSCgtb Auv6ebqMjsKj9msmT2f6wQom1UXJPpybdq4A0GVrmfx8Y5csAw65b/Gwn6XG43g= X-Gm-Gg: ASbGnctIjFXLF7ZlA87N40kpwJHpGK3dxPGZU1u6ZSurDpnvSR3ndhazgPAMI9BZ0wQ C5r7DfMd9adzG6ib2rz1MOF46y2ZyfRH6JuLqVtf7N570uxphXb5rsCxMDZFQvRx+rlfNTAsO6v 7DoWyGlEiwng8bcgT+QdS9OxtfcN5z+fLWm3vJBaBngkfQJQO8tFpkLUo/PuKWyAYJNGbO6+V4f 0I0lIyJ256MnhUJT6yXiKB/449Asf+oUBFNvFSFcfhFTZiYxpvO26g0eiX9HqXrjOOmaero X-Google-Smtp-Source: AGHT+IHEiht+oEKSqPdT2N2V7SuEcCXLPs4D/nYxCT06afvzXSDLl1haDMqTZYOsB5wUU2Y3V6I7PA== X-Received: by 2002:a17:903:32cf:b0:216:5af7:5a8e with SMTP id d9443c01a7336-21c355ec9c0mr238651055ad.26.1737442690920; Mon, 20 Jan 2025 22:58:10 -0800 (PST) Received: from localhost ([122.172.84.139]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21c2ce9efd6sm70652705ad.23.2025.01.20.22.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 22:58:10 -0800 (PST) From: Viresh Kumar To: Sudeep Holla Cc: Viresh Kumar , Vincent Guittot , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bill Mills , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] firmware: arm_ffa: Setup of_node for ffa devices Date: Tue, 21 Jan 2025 12:26:39 +0530 Message-Id: <0e863a4baea59865aff0d1b5657f548bc0aa8d2a.1737441631.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Match and bind the of_node for the FFA device. Signed-off-by: Viresh Kumar --- drivers/firmware/arm_ffa/bus.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c index dea3eb741d95..ca526e438e71 100644 --- a/drivers/firmware/arm_ffa/bus.c +++ b/drivers/firmware/arm_ffa/bus.c @@ -7,6 +7,8 @@ =20 #include #include +#include +#include #include #include #include @@ -187,6 +189,32 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev) return valid; } =20 +static void ffa_device_of_setup(struct ffa_device *ffa_dev) +{ + struct device_node *np; + uuid_t uuid; + u32 val; + + /* vm-id and UUID must match */ + for_each_compatible_node(np, NULL, "arm,ffa") { + if (of_property_read_u32(np, "vm-id", &val)) + continue; + + if (ffa_dev->vm_id !=3D val) + continue; + + if (of_property_read_u32_array(np, "uuid", (u32 *)&uuid, + sizeof(uuid) / sizeof(u32))) + continue; + + if (!uuid_equal(&ffa_dev->uuid, &uuid)) + continue; + + device_set_node(&ffa_dev->dev, of_fwnode_handle(np)); + break; + } +} + struct ffa_device * ffa_device_register(const struct ffa_partition_info *part_info, const struct ffa_ops *ops) @@ -222,6 +250,8 @@ ffa_device_register(const struct ffa_partition_info *pa= rt_info, import_uuid(&uuid, (u8 *)part_info->uuid); uuid_copy(&ffa_dev->uuid, &uuid); =20 + ffa_device_of_setup(ffa_dev); + ret =3D device_register(&ffa_dev->dev); if (ret) { dev_err(dev, "unable to register device %s err=3D%d\n", --=20 2.31.1.272.g89b43f80a514 From nobody Sat Feb 7 16:23:25 2026 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E38931F890E for ; Tue, 21 Jan 2025 06:58:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442696; cv=none; b=mtihCvHlOtzUtw+ys6gbkDIRJsjgZHbFakIiodGnF5u/apE9pAjyvP0ujh+W+CPWNkX8FqMi5iZnBa/5MOYXdJtPsrkK6NtPfQhK65OkbxjJlAHGyatr4ARgISEEJn74WJvYeTiNz3PsecIKxCHBv/TfKzZU9Qarx+c3gbwSWM0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737442696; c=relaxed/simple; bh=6froIzmNPTGtAXDHcq8gXMFvvF62GO4OhVb5S/u6WW8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qv1U7BCD7akjGDSQPRzJk9t/95vhoDEzgTfwsEEoTbfFrvYur4oJn6FqjtBIESssphg+Q7VFcNrOpE331NxfdhD5uHee1E+0zgiDVncI5GmTfqVFopnjjO1y+Evpca2iUVDnBFDU4yJCe3ddCZwacNrk3wveNaiCOkVGDKH3vAk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Wf03Lokf; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Wf03Lokf" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-21631789fcdso75584525ad.1 for ; Mon, 20 Jan 2025 22:58:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737442694; x=1738047494; darn=vger.kernel.org; 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=gpYNm3qlAya2ACRDiV2R40K+VHw6jIU1PcEeONO07Hc=; b=Wf03Lokf2LIwtEb5xOLjhYdWk2vZ4u4BIku69+pDPZAKhQZ7Yi10/bYgTScBJmqqmc GzSppnzBoNlguXweIw/02gzpLo54NBsmWv6M2e96UTbdFPJiOFMSET/UICLdMp3Oosth LtyWle/akvNquoxxQ9zwD/F2D9OmXPWkO6yCvSVCCR3YPOlOkiXD6OtnmA/PvMTD16ax 67RpeuFKBsNe+28z68sJZZmifnjTEvYlRWUfgyj96MBhvcA15ExMmTuzzJfj8B+ZMO71 0ArLC1YW171wUjs9DyU3ejeK3y50eMRn4xHJjp3U22zRDiZeghNRP9eThjs5o/aCBDD2 dHwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737442694; x=1738047494; 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=gpYNm3qlAya2ACRDiV2R40K+VHw6jIU1PcEeONO07Hc=; b=YxPMFDSQH08cLirIGwZUrbogwCAJq2rlmtnshEUkyLQLDZl4N5RpGGIt75ZHH9hdHy ZCMJog/BgJSanjjeC/eD1x/KQJnZDJ+G2/OW032lPG7u6f4ERMZt2dqnmFfhUE7xMOLg W05Qm4rAezZ4U3AxIqJ41uJ072fN4YHb2eElCPVjpMKkixq1Vk54P9QhdQsfYB4tbFmJ TnpOrX6+5f04IvdZVrs7bGl6cWWmQDSb7yiMZZTGZRC05uRKGxsVHdgJlKSqpwzMPZor 1cibvmu1aBlXYw9XLEaXmXjns6WaEZEisrscu0RuF4h2WZCFxsT0VjUil6O3gfgYnH7T LOXQ== X-Forwarded-Encrypted: i=1; AJvYcCVlNHygiggqvVofd1bBHOpt4Ez/vKiQFha8W6bTY/dch1WFl4eZ/KqLaigQIpnJUyrW9zOYr9bHekW/1jg=@vger.kernel.org X-Gm-Message-State: AOJu0YwHgVp+B8NSQM25l6iPlAyp3kxK+ek0utHrmxLdGvu4tke47ve/ SbRB6Qlzb4hgOcZSVHq1Zdu61Tw8YVUpDl+2WQfsMwaHhjNcvKMt6w0esgRs7UA= X-Gm-Gg: ASbGncvM3n4SWJgrmFHJ/mcKiEf/eogNWBgZpLrl/xryol6l+7pPhQcsVHwGLXgfxNA WGVJuphliMS3cE62Ib5e1z+BHYqtZMlV7HMIQpP9tAnV5Xo2XTdcEEfWF/w5+lZSS0iNcKZki56 QWQNJV98IShe9RLwIIfds3WIxcjmOL1qSt63zsCn6Dph8QzYEJKf7Cg0651ApSWFXXZHbX2QOUt jYLht22VstsF81aZWShzfqbvQy1gmAMa6k6h8LwXSIjXpl6IWexRWUEpKnmWGgAEo3gmoTV X-Google-Smtp-Source: AGHT+IHYl8ITOnKHBR9wtZWdnRc2vDPL7PmQsCpT1dlueNYfJot6EA1SnMHcxy4v1Dsvc7fZY1N5kw== X-Received: by 2002:a05:6a20:c707:b0:1d8:c74d:1ca0 with SMTP id adf61e73a8af0-1eb02521584mr31018777637.11.1737442694157; Mon, 20 Jan 2025 22:58:14 -0800 (PST) Received: from localhost ([122.172.84.139]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-a9bdf0b50c6sm6841360a12.68.2025.01.20.22.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 22:58:13 -0800 (PST) From: Viresh Kumar To: Sudeep Holla Cc: Viresh Kumar , Vincent Guittot , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bill Mills , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] firmware: arm_ffa: Provide .dma_configure() Date: Tue, 21 Jan 2025 12:26:40 +0530 Message-Id: <766e29dbb32987f714158eef827e706fd1157500.1737441631.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Provide .dma_configure() callback to make reserved-memory work for FFA devices. Signed-off-by: Viresh Kumar --- drivers/firmware/arm_ffa/bus.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c index ca526e438e71..e7fd25ba71a4 100644 --- a/drivers/firmware/arm_ffa/bus.c +++ b/drivers/firmware/arm_ffa/bus.c @@ -110,12 +110,21 @@ static struct attribute *ffa_device_attributes_attrs[= ] =3D { }; ATTRIBUTE_GROUPS(ffa_device_attributes); =20 +static int ffa_Device_dma_configure(struct device *dev) +{ + if (dev->of_node) + return of_dma_configure(dev, dev->of_node, true); + + return 0; +} + const struct bus_type ffa_bus_type =3D { .name =3D "arm_ffa", .match =3D ffa_device_match, .probe =3D ffa_device_probe, .remove =3D ffa_device_remove, .uevent =3D ffa_device_uevent, + .dma_configure =3D ffa_Device_dma_configure, .dev_groups =3D ffa_device_attributes_groups, }; EXPORT_SYMBOL_GPL(ffa_bus_type); --=20 2.31.1.272.g89b43f80a514