diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-01-08 11:24:35 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-01-11 16:16:58 +0100 |
commit | ab1427f3d345964e15bde11b3c415a99ba9c02c4 (patch) | |
tree | 971c05bc28f579a9781232b66be7ca157c2545de /arch/sandbox | |
parent | 8f19edb2be1b2eabe611633cec20073a67768871 (diff) | |
download | barebox-ab1427f3d345964e15bde11b3c415a99ba9c02c4.tar.gz barebox-ab1427f3d345964e15bde11b3c415a99ba9c02c4.tar.xz |
sandbox: set DMA_ALIGNMENT instead of defining dma_alloc
<dma.h> will take care to define dma_alloc with DMA_ALIGNMENT as
alignment. As 32 is the default and we for some reason, use 64 for
sandbox, define DMA_ALIGNMENT and drop the now duplicate code.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240108102438.1318473-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/include/asm/dma.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/sandbox/include/asm/dma.h b/arch/sandbox/include/asm/dma.h index ac8b408aae..cafbb7fe6a 100644 --- a/arch/sandbox/include/asm/dma.h +++ b/arch/sandbox/include/asm/dma.h @@ -12,11 +12,7 @@ #include <linux/string.h> #include <driver.h> -#define dma_alloc dma_alloc -static inline void *dma_alloc(size_t size) -{ - return xmemalign(64, ALIGN(size, 64)); -} +#define DMA_ALIGNMENT 64 #define dma_alloc_coherent dma_alloc_coherent static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) |