Thread (25 messages) 25 messages, 6 authors, 2017-06-12

Re: [RFC PATCH 2/8] firmware: arm_scmi: add basic driver infrastructure for SCMI

From: Sudeep Holla <hidden>
Date: 2017-06-08 09:28:22
Also in: lkml

Hi Roy,

On 07/06/17 20:18, Roy Franz wrote:
On Wed, Jun 7, 2017 at 9:10 AM, Sudeep Holla [off-list ref] wrote:
quoted
The SCMI is intended to allow OSPM to manage various functions that are
provided by the hardware platform it is running on, including power and
performance functions. SCMI provides two levels of abstraction, protocols
and transports. Protocols define individual groups of system control and
management messages. A protocol specification describes the messages
that it supports. Transports describe the method by which protocol
messages are communicated between agents and the platform.

This patch adds basic infrastructure to manage the message allocation,
initialisation, packing/unpacking and shared memory management.

Signed-off-by: Sudeep Holla <redacted>
---
 drivers/firmware/Kconfig           |  21 ++
 drivers/firmware/Makefile          |   1 +
 drivers/firmware/arm_scmi/Makefile |   2 +
 drivers/firmware/arm_scmi/common.h |  74 ++++
 drivers/firmware/arm_scmi/driver.c | 737 +++++++++++++++++++++++++++++++++++++
 include/linux/scmi_protocol.h      |  48 +++
 6 files changed, 883 insertions(+)
 create mode 100644 drivers/firmware/arm_scmi/Makefile
 create mode 100644 drivers/firmware/arm_scmi/common.h
 create mode 100644 drivers/firmware/arm_scmi/driver.c
 create mode 100644 include/linux/scmi_protocol.h
[...]
quoted
+
+#define client_to_scmi_info(c) container_of(c, struct scmi_info, cl)
+#define handle_to_scmi_info(h) container_of(h, struct scmi_info, handle)
+
+/*
+ * The SCP firmware only executes in little-endian mode, so any buffers
+ * shared through SCMI should have their contents converted to little-endian
+ */
nit:
This really has more to do with the SCMI protocol defining everything
as little endian, rather the endian-ness of the SCP, right?  There could be SCP
implementations that are not Cortex M3s or little endian.
Thanks for taking time to review this RFC, much appreciated. All valid
points(on this and other patches) and fixed locally now. Also thanks for
saving time in debugging these issues. I should be able to do some
testing next week.

-- 
Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help