Re: [PATCH V2] firmware: arm_scmi: Make scmi core independent of transport type
flat view
From: Arnd Bergmann <arnd@arndb.de>
Date: 2020-01-14 09:56:38
Also in:
lkml
On Tue, Jan 14, 2020 at 10:26 AM Viresh Kumar [off-list ref] wrote:
On 13-01-20, 12:36, Arnd Bergmann wrote:quoted
On Mon, Jan 13, 2020 at 7:42 AM Viresh Kumar [off-list ref] wrote: To answer all three, what I meant is that the payload pointer appears to be transport specific andI am not sure if I understood the below statement properly. Is there something missing from it ?quoted
should not be part of the common structure if there is generic way to access it.The scmi protocol requires a block of shared memory which is represented by struct scmi_shared_mem, and payload is this memory block itself. This block of memory is accessed throughout driver.c file using ioread/write commands. If payload is transport specific, so will be those accesses, isn't it ? Are you suggesting to move all this to mailbox.c (the transport specific file) instead ? I am sorry, but I am not able to understand how exactly you want me to reorder code here :(
My point was that you cannot mix __iomem accesses with pointer
accesses. As I understood it, the current version uses a pointer to a
hardware mailbox with structured data, so you have to use ioremap()
to get a token you can pass into ioread(), but (some of) the new
transport types would just be backed by regular RAM, on which this
is not a well-defined operation and you have to use memremap()
and memcpy() instead.
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel