mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
Merge "mailbox: msm_qmp: Add msgram readback"
This commit is contained in:
commit
0acb956082
1 changed files with 4 additions and 1 deletions
|
|
@ -380,6 +380,7 @@ static int qmp_send_data(struct mbox_chan *chan, void *data)
|
|||
struct qmp_pkt *pkt = (struct qmp_pkt *)data;
|
||||
void __iomem *addr;
|
||||
unsigned long flags;
|
||||
u32 size;
|
||||
int i;
|
||||
|
||||
if (!mbox || !data || mbox->local_state != CHANNEL_CONNECTED)
|
||||
|
|
@ -401,13 +402,15 @@ static int qmp_send_data(struct mbox_chan *chan, void *data)
|
|||
|
||||
memcpy32_toio(addr + sizeof(pkt->size), pkt->data, pkt->size);
|
||||
iowrite32(pkt->size, addr);
|
||||
/* readback to ensure write reflects in msgram */
|
||||
size = ioread32(addr);
|
||||
mbox->tx_sent = true;
|
||||
for (i = 0; i < mbox->ctrl.num_chans; i++) {
|
||||
if (chan == &mbox->ctrl.chans[i])
|
||||
mbox->idx_in_flight = i;
|
||||
}
|
||||
QMP_INFO(mdev->ilc, "Copied buffer to msgram sz:%d i:%d\n",
|
||||
pkt->size, mbox->idx_in_flight);
|
||||
size, mbox->idx_in_flight);
|
||||
send_irq(mdev);
|
||||
qmp_schedule_tx_timeout(mbox);
|
||||
spin_unlock_irqrestore(&mbox->tx_lock, flags);
|
||||
|
|
|
|||
Loading…
Reference in a new issue