mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
PCI: rockchip: move the handshake data to the end of 1M
Change-Id: Ia5a6587b3ef8de00434496c111bc035a09d4c6e6 Signed-off-by: Simon Xue <xxm@rock-chips.com> Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
This commit is contained in:
@@ -118,9 +118,9 @@
|
||||
#define PCIE_DMA_WR_BUF_SIZE (PCIE_DMA_BUF_SIZE * PCIE_DMA_BUF_CNT)
|
||||
#define PCIE_DMA_ACK_BASE (PCIE_DMA_RD_BUF_SIZE + PCIE_DMA_WR_BUF_SIZE)
|
||||
|
||||
#define PCIE_DMA_SET_DATA_CHECK_POS 0x0
|
||||
#define PCIE_DMA_SET_LOCAL_IDX_POS 0x4
|
||||
#define PCIE_DMA_SET_BUF_SIZE_POS 0x8
|
||||
#define PCIE_DMA_SET_DATA_CHECK_POS (SZ_1M - 0x4)
|
||||
#define PCIE_DMA_SET_LOCAL_IDX_POS (SZ_1M - 0x8)
|
||||
#define PCIE_DMA_SET_BUF_SIZE_POS (SZ_1M - 0xc)
|
||||
|
||||
#define PCIE_DMA_DATA_CHECK 0x12345678
|
||||
#define PCIE_DMA_DATA_ACK_CHECK 0xdeadbeef
|
||||
@@ -171,6 +171,7 @@ static void rk_pcie_prepare_dma(struct dma_trx_obj *obj,
|
||||
writel(local_idx, virt + PCIE_DMA_SET_LOCAL_IDX_POS);
|
||||
writel(buf_size, virt + PCIE_DMA_SET_BUF_SIZE_POS);
|
||||
|
||||
buf_size = SZ_1M;
|
||||
break;
|
||||
case PCIE_DMA_DATA_RCV_ACK:
|
||||
table = obj->table[PCIE_DMA_DATA_RCV_ACK_TABLE_OFFSET + idx];
|
||||
@@ -306,7 +307,7 @@ static enum hrtimer_restart rk_pcie_scan_timer(struct hrtimer *timer)
|
||||
if (sdv == PCIE_DMA_DATA_CHECK) {
|
||||
if (!need_ack)
|
||||
need_ack = true;
|
||||
writel(0x0, scan_data_addr);
|
||||
writel(0x0, scan_data_addr + PCIE_DMA_SET_DATA_CHECK_POS);
|
||||
set_bit(i, &obj->local_read_available);
|
||||
rk_pcie_prepare_dma(obj, idx, 0, 0, 0x4,
|
||||
PCIE_DMA_DATA_RCV_ACK);
|
||||
|
||||
Reference in New Issue
Block a user