summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-05-28 10:58:13 -0600
committerCommit Bot <commit-bot@chromium.org>2019-06-05 22:16:59 +0000
commite1fdc01fc5de76e5ecd052f5b1d2de61956cb4e4 (patch)
tree75e6bb5364c6c2b7178c2dd7b3efb704f02a75e7
parentc058908e5f8514d0c78b8b392dc2d73b077a0e26 (diff)
downloadchrome-ec-e1fdc01fc5de76e5ecd052f5b1d2de61956cb4e4.tar.gz
ish: remove unused ish_dma_page code
ish_dma_page was intended to be used in the aontaskfw implementation, but we never used it. Remove the unused code. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I33983a4e6c6de082078b8b6b59519fbc095d8022 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1631588 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1643846 Commit-Queue: Jett Rink <jettrink@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--chip/ish/dma.c30
-rw-r--r--chip/ish/ish_dma.h13
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