From: Florian Fainelli <florian.fainelli@broadcom.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Cristian Marussi <cristian.marussi@arm.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
arm-scmi@vger.kernel.org, james.quinlan@broadcom.com,
justin.chen@broadcom.com, kapil.hali@broadcom.com,
bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH 2/2] firmware: arm_scmi: Support 'reg-io-width' property for shared memory
Date: Sun, 11 Aug 2024 14:08:38 -0700 [thread overview]
Message-ID: <40d5782e-6b04-40c9-9b44-6960cd61eff1@broadcom.com> (raw)
In-Reply-To: <20240810214621.14417-3-florian.fainelli@broadcom.com>
On 8/10/2024 2:46 PM, Florian Fainelli wrote:
> Some shared memory areas might only support a certain access width,
> (e.g.: 32 bits accesses only). Update the shmem layer to support
> reading from and writing to such shared memory area using the specified
> I/O width in the Device Tree. The various transport layers making use of
> the shmem.c code are updated accordingly to pass the I/O width to the
> routines that need it.
>
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
[snip]
> static void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem,
> - struct scmi_xfer *xfer)
> + struct scmi_xfer *xfer,
> + u32 shmem_io_width)
> {
> size_t len = ioread32(&shmem->length);
>
> @@ -90,20 +144,19 @@ static void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem,
> /* Skip the length of header and status in shmem area i.e 8 bytes */
> xfer->rx.len = min_t(size_t, xfer->rx.len, len > 8 ? len - 8 : 0);
>
> - /* Take a copy to the rx buffer.. */
> - memcpy_fromio(xfer->rx.buf, shmem->msg_payload + 4, xfer->rx.len);
> + __shmem_fetch_resp_notif_data(xfer, shmem, shmem_io_width);
As Justin pointed out to me separately, the source pointer is different
for response and notifications, will fix that, too.
--
Florian
next prev parent reply other threads:[~2024-08-11 21:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-10 21:46 [PATCH 0/2] Support for I/O width within ARM SCMI SHMEM Florian Fainelli
2024-08-10 21:46 ` [PATCH 1/2] dt-bindings: sram: Document reg-io-width property Florian Fainelli
2024-08-11 5:37 ` Christophe JAILLET
2024-08-11 12:39 ` Krzysztof Kozlowski
2024-08-12 16:55 ` Rob Herring
2024-08-10 21:46 ` [PATCH 2/2] firmware: arm_scmi: Support 'reg-io-width' property for shared memory Florian Fainelli
2024-08-11 2:42 ` Florian Fainelli
2024-08-11 12:17 ` kernel test robot
2024-08-11 12:27 ` kernel test robot
2024-08-11 12:27 ` kernel test robot
2024-08-11 12:42 ` Peng Fan
2024-08-11 21:03 ` Florian Fainelli
2024-08-11 21:08 ` Florian Fainelli [this message]
2024-08-12 17:18 ` Cristian Marussi
2024-08-12 17:46 ` Florian Fainelli
2024-08-12 18:01 ` Cristian Marussi
2024-08-12 21:19 ` Florian Fainelli
2024-08-13 5:00 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40d5782e-6b04-40c9-9b44-6960cd61eff1@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=arm-scmi@vger.kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=james.quinlan@broadcom.com \
--cc=justin.chen@broadcom.com \
--cc=kapil.hali@broadcom.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).