Lines Matching full:shmem

35 void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem,  in shmem_tx_prepare()  argument
55 spin_until_cond((ioread32(&shmem->channel_status) & in shmem_tx_prepare()
58 if (!(ioread32(&shmem->channel_status) & in shmem_tx_prepare()
67 iowrite32(0x0, &shmem->channel_status); in shmem_tx_prepare()
69 &shmem->flags); in shmem_tx_prepare()
70 iowrite32(sizeof(shmem->msg_header) + xfer->tx.len, &shmem->length); in shmem_tx_prepare()
71 iowrite32(pack_scmi_header(&xfer->hdr), &shmem->msg_header); in shmem_tx_prepare()
73 memcpy_toio(shmem->msg_payload, xfer->tx.buf, xfer->tx.len); in shmem_tx_prepare()
76 u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem) in shmem_read_header() argument
78 return ioread32(&shmem->msg_header); in shmem_read_header()
81 void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem, in shmem_fetch_response() argument
84 size_t len = ioread32(&shmem->length); in shmem_fetch_response()
86 xfer->hdr.status = ioread32(shmem->msg_payload); in shmem_fetch_response()
87 /* Skip the length of header and status in shmem area i.e 8 bytes */ in shmem_fetch_response()
91 memcpy_fromio(xfer->rx.buf, shmem->msg_payload + 4, xfer->rx.len); in shmem_fetch_response()
94 void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem, in shmem_fetch_notification() argument
97 size_t len = ioread32(&shmem->length); in shmem_fetch_notification()
99 /* Skip only the length of header in shmem area i.e 4 bytes */ in shmem_fetch_notification()
103 memcpy_fromio(xfer->rx.buf, shmem->msg_payload, xfer->rx.len); in shmem_fetch_notification()
106 void shmem_clear_channel(struct scmi_shared_mem __iomem *shmem) in shmem_clear_channel() argument
108 iowrite32(SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE, &shmem->channel_status); in shmem_clear_channel()
111 bool shmem_poll_done(struct scmi_shared_mem __iomem *shmem, in shmem_poll_done() argument
116 xfer_id = MSG_XTRACT_TOKEN(ioread32(&shmem->msg_header)); in shmem_poll_done()
121 return ioread32(&shmem->channel_status) & in shmem_poll_done()
126 bool shmem_channel_free(struct scmi_shared_mem __iomem *shmem) in shmem_channel_free() argument
128 return (ioread32(&shmem->channel_status) & in shmem_channel_free()