diff mbox series

[06/12] dmaengine: bcm2835: Use to_bcm2711_cbaddr where relevant

Message ID b8962397fa4e77f6f82067c44bcf89e70050d4d4.1706948717.git.andrea.porta@suse.com (mailing list archive)
State New, archived
Headers show
Series Add support for BCM2712 DMA engine | expand

Commit Message

Andrea della Porta Feb. 4, 2024, 6:59 a.m. UTC
From: Maxime Ripard <maxime@cerno.tech>

bcm2711_dma40_memcpy has some code strictly equivalent to the
to_bcm2711_cbaddr() function. Let's use it instead.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/dma/bcm2835-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Florian Fainelli Feb. 4, 2024, 5:04 p.m. UTC | #1
On 2/3/2024 10:59 PM, 'Andrea della Porta' via 
BCM-KERNEL-FEEDBACK-LIST,PDL wrote:
> From: Maxime Ripard <maxime@cerno.tech>
> 
> bcm2711_dma40_memcpy has some code strictly equivalent to the
> to_bcm2711_cbaddr() function. Let's use it instead.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

Where is the full patch series?
Andrea della Porta Feb. 5, 2024, 10:25 a.m. UTC | #2
>> From: Maxime Ripard <maxime@cerno.tech>
>> 
>> bcm2711_dma40_memcpy has some code strictly equivalent to the
>> to_bcm2711_cbaddr() function. Let's use it instead.
>> 
>> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

>Where is the full patch series?

Hi Florian,
sorry, what do you mean with 'where is the full patch series', exactly?
diff mbox series

Patch

diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
index 077812eda609..d8d1f9ba2572 100644
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -1214,7 +1214,7 @@  void bcm2711_dma40_memcpy(dma_addr_t dst, dma_addr_t src, size_t size)
 	scb->len = size;
 	scb->next_cb = 0;
 
-	writel((u32)(memcpy_scb_dma >> 5), memcpy_chan + BCM2711_DMA40_CB);
+	writel(to_bcm2711_cbaddr(memcpy_scb_dma), memcpy_chan + BCM2711_DMA40_CB);
 	writel(BCM2711_DMA40_MEMCPY_FLAGS + BCM2711_DMA40_ACTIVE,
 	       memcpy_chan + BCM2711_DMA40_CS);