firmware: arm_scmi: Rename .clear_notification() transport_ops

SCMI transport operation .clear_notification() is indeed a generic method
to clear the channel in a transport dependent way, as such it could be a
useful helper also in other contexts.

Rename such method as .clear_channel(), renaming accordingly also its
already existent call-sites.

No functional change.

Link: https://lore.kernel.org/r/20200420152315.21008-2-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
This commit is contained in:
Cristian Marussi 2020-04-20 16:23:12 +01:00 committed by Sudeep Holla
parent 4d09852b6f
commit 87dff4e63c
4 changed files with 9 additions and 9 deletions

View file

@ -179,7 +179,7 @@ struct scmi_chan_info {
* @mark_txdone: Callback to mark tx as done * @mark_txdone: Callback to mark tx as done
* @fetch_response: Callback to fetch response * @fetch_response: Callback to fetch response
* @fetch_notification: Callback to fetch notification * @fetch_notification: Callback to fetch notification
* @clear_notification: Callback to clear a pending notification * @clear_channel: Callback to clear a channel
* @poll_done: Callback to poll transfer status * @poll_done: Callback to poll transfer status
*/ */
struct scmi_transport_ops { struct scmi_transport_ops {
@ -194,7 +194,7 @@ struct scmi_transport_ops {
struct scmi_xfer *xfer); struct scmi_xfer *xfer);
void (*fetch_notification)(struct scmi_chan_info *cinfo, void (*fetch_notification)(struct scmi_chan_info *cinfo,
size_t max_len, struct scmi_xfer *xfer); size_t max_len, struct scmi_xfer *xfer);
void (*clear_notification)(struct scmi_chan_info *cinfo); void (*clear_channel)(struct scmi_chan_info *cinfo);
bool (*poll_done)(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer); bool (*poll_done)(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer);
}; };
@ -232,6 +232,6 @@ void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem,
struct scmi_xfer *xfer); struct scmi_xfer *xfer);
void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem, void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem,
size_t max_len, struct scmi_xfer *xfer); size_t max_len, struct scmi_xfer *xfer);
void shmem_clear_notification(struct scmi_shared_mem __iomem *shmem); void shmem_clear_channel(struct scmi_shared_mem __iomem *shmem);
bool shmem_poll_done(struct scmi_shared_mem __iomem *shmem, bool shmem_poll_done(struct scmi_shared_mem __iomem *shmem,
struct scmi_xfer *xfer); struct scmi_xfer *xfer);

View file

@ -213,7 +213,7 @@ static void scmi_handle_notification(struct scmi_chan_info *cinfo, u32 msg_hdr)
if (IS_ERR(xfer)) { if (IS_ERR(xfer)) {
dev_err(dev, "failed to get free message slot (%ld)\n", dev_err(dev, "failed to get free message slot (%ld)\n",
PTR_ERR(xfer)); PTR_ERR(xfer));
info->desc->ops->clear_notification(cinfo); info->desc->ops->clear_channel(cinfo);
return; return;
} }
@ -228,7 +228,7 @@ static void scmi_handle_notification(struct scmi_chan_info *cinfo, u32 msg_hdr)
__scmi_xfer_put(minfo, xfer); __scmi_xfer_put(minfo, xfer);
info->desc->ops->clear_notification(cinfo); info->desc->ops->clear_channel(cinfo);
} }
static void scmi_handle_response(struct scmi_chan_info *cinfo, static void scmi_handle_response(struct scmi_chan_info *cinfo,

View file

@ -166,11 +166,11 @@ static void mailbox_fetch_notification(struct scmi_chan_info *cinfo,
shmem_fetch_notification(smbox->shmem, max_len, xfer); shmem_fetch_notification(smbox->shmem, max_len, xfer);
} }
static void mailbox_clear_notification(struct scmi_chan_info *cinfo) static void mailbox_clear_channel(struct scmi_chan_info *cinfo)
{ {
struct scmi_mailbox *smbox = cinfo->transport_info; struct scmi_mailbox *smbox = cinfo->transport_info;
shmem_clear_notification(smbox->shmem); shmem_clear_channel(smbox->shmem);
} }
static bool static bool
@ -189,7 +189,7 @@ static struct scmi_transport_ops scmi_mailbox_ops = {
.mark_txdone = mailbox_mark_txdone, .mark_txdone = mailbox_mark_txdone,
.fetch_response = mailbox_fetch_response, .fetch_response = mailbox_fetch_response,
.fetch_notification = mailbox_fetch_notification, .fetch_notification = mailbox_fetch_notification,
.clear_notification = mailbox_clear_notification, .clear_channel = mailbox_clear_channel,
.poll_done = mailbox_poll_done, .poll_done = mailbox_poll_done,
}; };

View file

@ -77,7 +77,7 @@ void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem,
memcpy_fromio(xfer->rx.buf, shmem->msg_payload, xfer->rx.len); memcpy_fromio(xfer->rx.buf, shmem->msg_payload, xfer->rx.len);
} }
void shmem_clear_notification(struct scmi_shared_mem __iomem *shmem) void shmem_clear_channel(struct scmi_shared_mem __iomem *shmem)
{ {
iowrite32(SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE, &shmem->channel_status); iowrite32(SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE, &shmem->channel_status);
} }