From patchwork Tue Aug 13 18:07:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13762386 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C3A9C52D7C for ; Tue, 13 Aug 2024 18:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=IE96O0CqxA5yw4NtUgumXdp6GGHPUzOyQXqe/t29Hic=; b=f1ZYeFB9onqMslWS/5RLb1UfAE xQFKEHRNFwghurzKnX3q9CfMWJYvngpZv51wHymE6JfIUP5NxMcQcINp+AdYe3WlFdX/mf5N+0E+O XK8zoV404Uthh8wRxdQudKSfu3CqkiUPIavPJfga1FxxibMV+Suc8+QkN6WLipZpId9iXU5IkopUm ca8KkLPpjv79EKedQCdNvXls6j1p/IVcGw7CY8+jos0/hhSl9yb7sn2/Htui4KYnUq5dIGh1eOKa8 RGktsvQbiL95SQlf5KNMfRh0tC97dHfo1BcXQWlLdhlgZhWVY8zVJlGrsjySQ1fgTZHMd7FhaCXwe dRj6J7Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdvxE-00000004aec-3SnC; Tue, 13 Aug 2024 18:09:08 +0000 Received: from relay.smtp-ext.broadcom.com ([192.19.144.208]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdvw1-00000004aSC-3OwV for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2024 18:07:55 +0000 Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 366A5C0000EA; Tue, 13 Aug 2024 11:07:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 366A5C0000EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1723572469; bh=JvTEShpEcA/48jrCX1sv5imVU10NR7KciDBLqDfV0e0=; h=From:To:Cc:Subject:Date:From; b=l/gk0ociroF9tWEQ8wC2FgTwJfC0ZWHs3OAY6sc+t/cTfQ+kbdNMndDDKxz27+Eu0 5E0AtT/hLy4yGLd7R5Vuq1NN1jYf3U6+qJjRU+spGxI+Zj9j0qd33v5iLPuisn/by8 rj0gDMfx8CP026JJZnsq+KOP2/RHZJ16ZbEVzBAU= Received: from stbirv-lnx-1.igp.broadcom.net (stbirv-lnx-1.igp.broadcom.net [10.67.48.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 60F6218041CAC4; Tue, 13 Aug 2024 11:07:46 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sudeep Holla , Cristian Marussi , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), arm-scmi@vger.kernel.org (open list:SYSTEM CONTROL & POWER/MANAGEMENT INTERFACE), linux-arm-kernel@lists.infradead.org (moderated list:SYSTEM CONTROL & POWER/MANAGEMENT INTERFACE), justin.chen@broadcom.com, opendmb@gmail.com, kapil.hali@broadcom.com, bcm-kernel-feedback-list@broadcom.com Subject: [PATCH v2 0/2] Support for I/O width within ARM SCMI SHMEM Date: Tue, 13 Aug 2024 11:07:45 -0700 Message-Id: <20240813180747.1439034-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240813_110753_993714_C74DED11 X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We just got our hands on hardware that only supports 32-bit access width to the SRAM being used. This patch series adds support for the 'reg-io-width' property and allows us to specify the exact access width that the SRAM supports. Changes in v2: - fixed typo in the binding and added reviewed-by tag from Krzysztof - determine the correct I/O operation at the time we parse the 'reg-io-width' property rather than for each tx_prepare/fetch_response/fetch_notification call - dropped support for 1 and 2 bytes 'reg-io-width' as they do not quite make sense, if we can support such smaller access size, then we can support the larger 4 byte access width, too, and there are many places within the SCMI code where ioread32/iowrite32 are used Florian Fainelli (2): dt-bindings: sram: Document reg-io-width property firmware: arm_scmi: Support 'reg-io-width' property for shared memory .../devicetree/bindings/sram/sram.yaml | 6 ++ drivers/firmware/arm_scmi/common.h | 32 +++++++- .../arm_scmi/scmi_transport_mailbox.c | 13 ++- .../firmware/arm_scmi/scmi_transport_optee.c | 10 ++- .../firmware/arm_scmi/scmi_transport_smc.c | 11 ++- drivers/firmware/arm_scmi/shmem.c | 81 +++++++++++++++++-- 6 files changed, 132 insertions(+), 21 deletions(-)