firmware: arm_scmi: Add flags field to xfer
Add a 'flags' field to xfer and define a flagbit and related macro to easily identify xfers originated from the raw transmissions. Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Tested-by: Florian Fainelli <f.fainelli@gmail.com> Tested-by: Vincent Guittot <vincent.guittot@linaro.org> Link: https://lore.kernel.org/r/20230118121426.492864-5-cristian.marussi@arm.com Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
This commit is contained in:
parent
07cdfc44f1
commit
37057bf2b5
|
@ -115,6 +115,7 @@ struct scmi_msg_hdr {
|
||||||
* - SCMI_XFER_SENT_OK -> SCMI_XFER_RESP_OK [ -> SCMI_XFER_DRESP_OK ]
|
* - SCMI_XFER_SENT_OK -> SCMI_XFER_RESP_OK [ -> SCMI_XFER_DRESP_OK ]
|
||||||
* - SCMI_XFER_SENT_OK -> SCMI_XFER_DRESP_OK
|
* - SCMI_XFER_SENT_OK -> SCMI_XFER_DRESP_OK
|
||||||
* (Missing synchronous response is assumed OK and ignored)
|
* (Missing synchronous response is assumed OK and ignored)
|
||||||
|
* @flags: Optional flags associated to this xfer.
|
||||||
* @lock: A spinlock to protect state and busy fields.
|
* @lock: A spinlock to protect state and busy fields.
|
||||||
* @priv: A pointer for transport private usage.
|
* @priv: A pointer for transport private usage.
|
||||||
*/
|
*/
|
||||||
|
@ -135,6 +136,9 @@ struct scmi_xfer {
|
||||||
#define SCMI_XFER_RESP_OK 1
|
#define SCMI_XFER_RESP_OK 1
|
||||||
#define SCMI_XFER_DRESP_OK 2
|
#define SCMI_XFER_DRESP_OK 2
|
||||||
int state;
|
int state;
|
||||||
|
#define SCMI_XFER_FLAG_IS_RAW BIT(0)
|
||||||
|
#define SCMI_XFER_IS_RAW(x) ((x)->flags & SCMI_XFER_FLAG_IS_RAW)
|
||||||
|
int flags;
|
||||||
/* A lock to protect state and busy fields */
|
/* A lock to protect state and busy fields */
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
void *priv;
|
void *priv;
|
||||||
|
|
Loading…
Reference in New Issue