mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: dma: define DMA_ALIGNMENT instead of defining dma_alloc
@ 2023-11-29  6:10 Ahmad Fatoum
  2023-12-05  7:48 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-11-29  6:10 UTC (permalink / raw)
  To: barebox; +Cc: Marco Felsch, Ahmad Fatoum

There's a suitable fallback dma_alloc implementation already in dma.h,
which we can use as soon as we define DMA_ALIGNMENT.

Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/include/asm/dma.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index 53953a486393..0774a11c5a30 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -3,11 +3,7 @@
 
 #include <common.h>
 
-#define dma_alloc dma_alloc
-static inline void *dma_alloc(size_t size)
-{
-	return xmemalign(64, ALIGN(size, 64));
-}
+#define DMA_ALIGNMENT	64
 
 #ifndef CONFIG_MMU
 #define dma_alloc_coherent dma_alloc_coherent
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: dma: define DMA_ALIGNMENT instead of defining dma_alloc
  2023-11-29  6:10 [PATCH] ARM: dma: define DMA_ALIGNMENT instead of defining dma_alloc Ahmad Fatoum
@ 2023-12-05  7:48 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-12-05  7:48 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox, Marco Felsch

On Wed, Nov 29, 2023 at 07:10:30AM +0100, Ahmad Fatoum wrote:
> There's a suitable fallback dma_alloc implementation already in dma.h,
> which we can use as soon as we define DMA_ALIGNMENT.
> 
> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  arch/arm/include/asm/dma.h | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
> index 53953a486393..0774a11c5a30 100644
> --- a/arch/arm/include/asm/dma.h
> +++ b/arch/arm/include/asm/dma.h
> @@ -3,11 +3,7 @@
>  
>  #include <common.h>
>  
> -#define dma_alloc dma_alloc
> -static inline void *dma_alloc(size_t size)
> -{
> -	return xmemalign(64, ALIGN(size, 64));
> -}
> +#define DMA_ALIGNMENT	64
>  
>  #ifndef CONFIG_MMU
>  #define dma_alloc_coherent dma_alloc_coherent
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-05  7:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29  6:10 [PATCH] ARM: dma: define DMA_ALIGNMENT instead of defining dma_alloc Ahmad Fatoum
2023-12-05  7:48 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox