RE: [PATCH v3 5/6] firmware: arm_scmi: imx: Support getting syslog of MISC protocol
From: Peng Fan <peng.fan@nxp.com>
Date: 2025-08-31 07:43:04
Also in:
arm-scmi, imx, lkml
Hi Sudeep,
Subject: Re: [PATCH v3 5/6] firmware: arm_scmi: imx: Support getting syslog of MISC protocol On Wed, Aug 27, 2025 at 12:59:17PM +0800, Peng Fan wrote: [...]quoted
static int scmi_imx_misc_protocol_init(const struct scmi_protocol_handle *ph) diff --git a/include/linux/scmi_imx_protocol.h b/include/linux/scmi_imx_protocol.h index27bd372cbfb142b6acb0b1cf4b82f061529d0d45..6e18920aac56de67d 388e985e330quoted
5745d3798c3e 100644--- a/include/linux/scmi_imx_protocol.h +++ b/include/linux/scmi_imx_protocol.h@@ -52,6 +52,23 @@ struct scmi_imx_misc_ctrl_notify_report { unsigned int flags; }; +struct scmi_imx_misc_sys_sleep_rec { + u32 sleepentryusec; + u32 sleepexitusec; + u32 sleepcnt; + u32 wakesource; + u32 mixpwrstat; + u32 mempwrstat; + u32 pllpwrstat; + u32 syssleepmode; + u32 syssleepflags; +};And since the document/spec doesn't cover details on above, better to add comment for this to explain each of it.
ok. I will add comment for each entry. How do you ensure the
backward compatibility if you are assigning a structure to a log buffer that is not so structured the spec/document. Will be end up with one structure for each version if f/w screws up the structure ?
What I could do is to ask firmware developer not to change the structure to keep backward compatibility and add comment in imx-sm firmware to note this structure should be kept backward compatible.
Can it be a raw dump of man 4KB instead ? Sorry just realised it now.
4KB is quite a large area to dump, and current imx-sm only supports to dump 40 bytes for syslog. The syslog size may expand in future, but I think it may not reach to 4KB that large. For raw dump, not sure you mean not parsing the data and just export the raw data through sysfs interface or else. But I would avoid user to directly get raw data. For "diagnose message", raw data should be ok if future imx-sm firmware supports diagnose from linux. I am thinking to do a v4 in early next week if no big issues. Then this patchset should have chance to catch your PR in rc5 or rc6. Hope this is ok for you. Thanks, Peng.
-- Regards, Sudeep