Message ID | 20190507155935.12672-2-christoph.muellner@theobroma-systems.com |
---|---|
State | Deferred |
Delegated to: | Philipp Tomsich |
Headers | show |
Series | [U-Boot,v2,1/3] board_f: Add mach specific DMA address check function. | expand |
diff --git a/common/bouncebuf.c b/common/bouncebuf.c index a7098e2caf..1b82243b06 100644 --- a/common/bouncebuf.c +++ b/common/bouncebuf.c @@ -26,6 +26,12 @@ static int addr_aligned(struct bounce_buffer *state) return 0; } + /* Check if valid DMA address. */ + if (!mach_addr_is_dmaable(state->user_buffer)) { + debug("Buffer address is not DMA-able\n"); + return 0; + } + /* Aligned */ return 1; }