PD#SWPL-19014
Problem:
m3 channel (low mailbox) use wrong rx_size in mbox_handler
Solution:
m4 channel use read back rx_size, m3 use rx_size from package
Verify:
S905X3-AC214
Change-Id: I44a5a038b14f3d6860ffb01e733d56795696024f
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
memcpy(data->rx_buf, payload + TX_PAYLOAD(idx),
data->rx_size);
} else {
- data->rx_size =
- readl(mbox_base + RX_STATUS(idx));
+ /*idx=0 means there is an old machenism:
+ * AP SET0 send/ MCU SET1 ack
+ */
+ if (idx)
+ data->rx_size =
+ readl(mbox_base + RX_STATUS(idx));
memcpy(data->rx_buf, payload + RX_PAYLOAD(idx),
data->rx_size);
}