diff options
-rw-r--r-- | chip/ish/dma.c | 30 | ||||
-rw-r--r-- | chip/ish/ish_dma.h | 13 |
2 files changed, 3 insertions, 40 deletions
diff --git a/chip/ish/dma.c b/chip/ish/dma.c index d73b7410e5..a409dc6ad3 100644 --- a/chip/ish/dma.c +++ b/chip/ish/dma.c @@ -183,36 +183,6 @@ int ish_wait_for_dma_done(uint32_t ch) return dma_poll(DMA_EN_REG_ADDR, 0, DMA_CH_EN_BIT(ch)); } -static int ish_dma_page_internal(uint32_t dst, uint32_t src, enum dma_mode mode) -{ - int rc; - uint32_t eflags = interrupt_lock(); - - if (!dma_init_called) - ish_dma_init(); - - /* Wait for DMA to be free */ - rc = dma_poll(DMA_EN_REG_ADDR, 0, - DMA_CH_EN_BIT(PAGING_CHAN) | DMA_CH_EN_BIT(KERNEL_CHAN)); - - if (rc == DMA_RC_OK) - rc = ish_dma_copy(PAGING_CHAN, dst, src, PAGE_SIZE, mode); - - interrupt_unlock(eflags); - return rc; -} - -/* DMA page between DRAM and SRAM. */ -int ish_dma_page(uint32_t dst, uint32_t src, int page_in) -{ - int ret = 0; - - ret = ish_dma_page_internal(dst, src, - (page_in ? UMA_TO_SRAM : SRAM_TO_UMA)); - - return ret; -} - void ish_dma_set_msb(uint32_t chan, uint32_t dst_msb, uint32_t src_msb) { uint32_t eflags = interrupt_lock(); diff --git a/chip/ish/ish_dma.h b/chip/ish/ish_dma.h index 8b06121234..2c76c7d319 100644 --- a/chip/ish/ish_dma.h +++ b/chip/ish/ish_dma.h @@ -44,6 +44,7 @@ enum dma_mode { void ish_dma_disable(void); /* Initialize DMA engine */ void ish_dma_init(void); + /** * Main DMA transfer function * @@ -64,16 +65,7 @@ int ish_dma_copy(uint32_t chan, uint32_t dst, uint32_t src, uint32_t length, * @param src_msb Source DRAM upper 32 bits address */ void ish_dma_set_msb(uint32_t chan, uint32_t dst_msb, uint32_t src_msb); -/** - * Page granularity transfer between SRAM and DRAM - * - * @param dst Destination address - * @param src Source address - * @param page_in Is from DRAM to SRAM - * @return DMA_RC_OK, or non-zero if error. - */ -int ish_dma_page(uint32_t dst, uint32_t src, - int page_in); /* API for page manager/d0i3 task */ + /** * Wait for DMA transfer finish * @@ -81,6 +73,7 @@ int ish_dma_page(uint32_t dst, uint32_t src, * @return DMA_RC_OK, or non-zero if error. */ int ish_wait_for_dma_done(uint32_t ch); + /* Disable OCP (Open Core Protocol) fabric time out */ void ish_dma_ocp_timeout_disable(void); #endif |