diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2014-12-22 17:58:11 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-08 22:36:31 +0000 |
commit | 61d50195e1fb568327d2cdce5b5a5095f1be6e05 (patch) | |
tree | a17bd73885baa3fbec53c11a56b1bc6a8629c40b /include/dma.h | |
parent | 3c292e0398e066279124ced299e860585890e4c6 (diff) | |
download | chrome-ec-61d50195e1fb568327d2cdce5b5a5095f1be6e05.tar.gz |
disable DMA before sysjumping
It's not safe to sysjump with a DMA enabled as it can led to memory
corruption after we have landed in the new image before that piece of
hardware is re-configured.
Implement and call dma_disable_all() on all platforms with generic DMA.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=all
BUG=chrome-os-partner:34865
TEST=on various boards, call "sysjump rw".
Change-Id: I2a6b63ff19c2d932a5e31bc375bf468bc8ae5125
Reviewed-on: https://chromium-review.googlesource.com/237340
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/dma.h')
-rw-r--r-- | include/dma.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/dma.h b/include/dma.h index e63d03a232..5e5553a794 100644 --- a/include/dma.h +++ b/include/dma.h @@ -65,6 +65,9 @@ void dma_start_rx(const struct dma_option *option, unsigned count, */ void dma_disable(enum dma_channel channel); +/* Stop transfers on all DMA channels */ +void dma_disable_all(void); + /** * Get the number of bytes available to read, or number of bytes written * |