bus: mhi: host: Rename "struct mhi_tre" to "struct mhi_ring_element"

Structure "struct mhi_tre" is representing a generic MHI ring element and
not specifically a Transfer Ring Element (TRE). Fix the naming.

Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20220301160308.107452-9-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Manivannan Sadhasivam 2022-03-01 21:33:06 +05:30 committed by Greg Kroah-Hartman
parent 792ba32184
commit 84f5f31f11
3 changed files with 14 additions and 14 deletions

View File

@ -339,7 +339,7 @@ int mhi_init_dev_ctxt(struct mhi_controller *mhi_cntrl)
er_ctxt->msivec = cpu_to_le32(mhi_event->irq); er_ctxt->msivec = cpu_to_le32(mhi_event->irq);
mhi_event->db_cfg.db_mode = true; mhi_event->db_cfg.db_mode = true;
ring->el_size = sizeof(struct mhi_tre); ring->el_size = sizeof(struct mhi_ring_element);
ring->len = ring->el_size * ring->elements; ring->len = ring->el_size * ring->elements;
ret = mhi_alloc_aligned_ring(mhi_cntrl, ring, ring->len); ret = mhi_alloc_aligned_ring(mhi_cntrl, ring, ring->len);
if (ret) if (ret)
@ -371,7 +371,7 @@ int mhi_init_dev_ctxt(struct mhi_controller *mhi_cntrl)
for (i = 0; i < NR_OF_CMD_RINGS; i++, mhi_cmd++, cmd_ctxt++) { for (i = 0; i < NR_OF_CMD_RINGS; i++, mhi_cmd++, cmd_ctxt++) {
struct mhi_ring *ring = &mhi_cmd->ring; struct mhi_ring *ring = &mhi_cmd->ring;
ring->el_size = sizeof(struct mhi_tre); ring->el_size = sizeof(struct mhi_ring_element);
ring->elements = CMD_EL_PER_RING; ring->elements = CMD_EL_PER_RING;
ring->len = ring->el_size * ring->elements; ring->len = ring->el_size * ring->elements;
ret = mhi_alloc_aligned_ring(mhi_cntrl, ring, ring->len); ret = mhi_alloc_aligned_ring(mhi_cntrl, ring, ring->len);
@ -598,7 +598,7 @@ int mhi_init_chan_ctxt(struct mhi_controller *mhi_cntrl,
buf_ring = &mhi_chan->buf_ring; buf_ring = &mhi_chan->buf_ring;
tre_ring = &mhi_chan->tre_ring; tre_ring = &mhi_chan->tre_ring;
tre_ring->el_size = sizeof(struct mhi_tre); tre_ring->el_size = sizeof(struct mhi_ring_element);
tre_ring->len = tre_ring->el_size * tre_ring->elements; tre_ring->len = tre_ring->el_size * tre_ring->elements;
chan_ctxt = &mhi_cntrl->mhi_ctxt->chan_ctxt[mhi_chan->chan]; chan_ctxt = &mhi_cntrl->mhi_ctxt->chan_ctxt[mhi_chan->chan];
ret = mhi_alloc_aligned_ring(mhi_cntrl, tre_ring, tre_ring->len); ret = mhi_alloc_aligned_ring(mhi_cntrl, tre_ring, tre_ring->len);

View File

@ -168,7 +168,7 @@ struct mhi_ctxt {
dma_addr_t cmd_ctxt_addr; dma_addr_t cmd_ctxt_addr;
}; };
struct mhi_tre { struct mhi_ring_element {
__le64 ptr; __le64 ptr;
__le32 dword[2]; __le32 dword[2];
}; };

View File

@ -554,7 +554,7 @@ static void mhi_recycle_ev_ring_element(struct mhi_controller *mhi_cntrl,
} }
static int parse_xfer_event(struct mhi_controller *mhi_cntrl, static int parse_xfer_event(struct mhi_controller *mhi_cntrl,
struct mhi_tre *event, struct mhi_ring_element *event,
struct mhi_chan *mhi_chan) struct mhi_chan *mhi_chan)
{ {
struct mhi_ring *buf_ring, *tre_ring; struct mhi_ring *buf_ring, *tre_ring;
@ -590,7 +590,7 @@ static int parse_xfer_event(struct mhi_controller *mhi_cntrl,
case MHI_EV_CC_EOT: case MHI_EV_CC_EOT:
{ {
dma_addr_t ptr = MHI_TRE_GET_EV_PTR(event); dma_addr_t ptr = MHI_TRE_GET_EV_PTR(event);
struct mhi_tre *local_rp, *ev_tre; struct mhi_ring_element *local_rp, *ev_tre;
void *dev_rp; void *dev_rp;
struct mhi_buf_info *buf_info; struct mhi_buf_info *buf_info;
u16 xfer_len; u16 xfer_len;
@ -689,7 +689,7 @@ end_process_tx_event:
} }
static int parse_rsc_event(struct mhi_controller *mhi_cntrl, static int parse_rsc_event(struct mhi_controller *mhi_cntrl,
struct mhi_tre *event, struct mhi_ring_element *event,
struct mhi_chan *mhi_chan) struct mhi_chan *mhi_chan)
{ {
struct mhi_ring *buf_ring, *tre_ring; struct mhi_ring *buf_ring, *tre_ring;
@ -753,12 +753,12 @@ end_process_rsc_event:
} }
static void mhi_process_cmd_completion(struct mhi_controller *mhi_cntrl, static void mhi_process_cmd_completion(struct mhi_controller *mhi_cntrl,
struct mhi_tre *tre) struct mhi_ring_element *tre)
{ {
dma_addr_t ptr = MHI_TRE_GET_EV_PTR(tre); dma_addr_t ptr = MHI_TRE_GET_EV_PTR(tre);
struct mhi_cmd *cmd_ring = &mhi_cntrl->mhi_cmd[PRIMARY_CMD_RING]; struct mhi_cmd *cmd_ring = &mhi_cntrl->mhi_cmd[PRIMARY_CMD_RING];
struct mhi_ring *mhi_ring = &cmd_ring->ring; struct mhi_ring *mhi_ring = &cmd_ring->ring;
struct mhi_tre *cmd_pkt; struct mhi_ring_element *cmd_pkt;
struct mhi_chan *mhi_chan; struct mhi_chan *mhi_chan;
u32 chan; u32 chan;
@ -791,7 +791,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_controller *mhi_cntrl,
struct mhi_event *mhi_event, struct mhi_event *mhi_event,
u32 event_quota) u32 event_quota)
{ {
struct mhi_tre *dev_rp, *local_rp; struct mhi_ring_element *dev_rp, *local_rp;
struct mhi_ring *ev_ring = &mhi_event->ring; struct mhi_ring *ev_ring = &mhi_event->ring;
struct mhi_event_ctxt *er_ctxt = struct mhi_event_ctxt *er_ctxt =
&mhi_cntrl->mhi_ctxt->er_ctxt[mhi_event->er_index]; &mhi_cntrl->mhi_ctxt->er_ctxt[mhi_event->er_index];
@ -961,7 +961,7 @@ int mhi_process_data_event_ring(struct mhi_controller *mhi_cntrl,
struct mhi_event *mhi_event, struct mhi_event *mhi_event,
u32 event_quota) u32 event_quota)
{ {
struct mhi_tre *dev_rp, *local_rp; struct mhi_ring_element *dev_rp, *local_rp;
struct mhi_ring *ev_ring = &mhi_event->ring; struct mhi_ring *ev_ring = &mhi_event->ring;
struct mhi_event_ctxt *er_ctxt = struct mhi_event_ctxt *er_ctxt =
&mhi_cntrl->mhi_ctxt->er_ctxt[mhi_event->er_index]; &mhi_cntrl->mhi_ctxt->er_ctxt[mhi_event->er_index];
@ -1185,7 +1185,7 @@ int mhi_gen_tre(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan,
struct mhi_buf_info *info, enum mhi_flags flags) struct mhi_buf_info *info, enum mhi_flags flags)
{ {
struct mhi_ring *buf_ring, *tre_ring; struct mhi_ring *buf_ring, *tre_ring;
struct mhi_tre *mhi_tre; struct mhi_ring_element *mhi_tre;
struct mhi_buf_info *buf_info; struct mhi_buf_info *buf_info;
int eot, eob, chain, bei; int eot, eob, chain, bei;
int ret; int ret;
@ -1256,7 +1256,7 @@ int mhi_send_cmd(struct mhi_controller *mhi_cntrl,
struct mhi_chan *mhi_chan, struct mhi_chan *mhi_chan,
enum mhi_cmd_type cmd) enum mhi_cmd_type cmd)
{ {
struct mhi_tre *cmd_tre = NULL; struct mhi_ring_element *cmd_tre = NULL;
struct mhi_cmd *mhi_cmd = &mhi_cntrl->mhi_cmd[PRIMARY_CMD_RING]; struct mhi_cmd *mhi_cmd = &mhi_cntrl->mhi_cmd[PRIMARY_CMD_RING];
struct mhi_ring *ring = &mhi_cmd->ring; struct mhi_ring *ring = &mhi_cmd->ring;
struct device *dev = &mhi_cntrl->mhi_dev->dev; struct device *dev = &mhi_cntrl->mhi_dev->dev;
@ -1518,7 +1518,7 @@ static void mhi_mark_stale_events(struct mhi_controller *mhi_cntrl,
int chan) int chan)
{ {
struct mhi_tre *dev_rp, *local_rp; struct mhi_ring_element *dev_rp, *local_rp;
struct mhi_ring *ev_ring; struct mhi_ring *ev_ring;
struct device *dev = &mhi_cntrl->mhi_dev->dev; struct device *dev = &mhi_cntrl->mhi_dev->dev;
unsigned long flags; unsigned long flags;