]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: cadence_ospi_versal: Add support for 64-bit address
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Wed, 11 Oct 2023 03:15:15 +0000 (08:45 +0530)
committerMichal Simek <michal.simek@amd.com>
Tue, 7 Nov 2023 12:47:08 +0000 (13:47 +0100)
When 64-bit address is passed only lower 32-bit address
is getting updated. Program the upper 32-bit address in the
DMA destination memory address MSBs register.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20231011031515.4151-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/spi/cadence_ospi_versal.c

index a7685a2f512c39f87ffa721c9cae7ed37da0a566..e02a3b3de37d31375ff896310a3945d572804bad 100644 (file)
@@ -44,8 +44,10 @@ int cadence_qspi_apb_dma_read(struct cadence_spi_priv *priv,
                       priv->regbase + CQSPI_REG_INDIR_TRIG_ADDR_RANGE);
                writel(CQSPI_DFLT_DMA_PERIPH_CFG,
                       priv->regbase + CQSPI_REG_DMA_PERIPH_CFG);
-               writel((unsigned long)rxbuf, priv->regbase +
+               writel(lower_32_bits((unsigned long)rxbuf), priv->regbase +
                       CQSPI_DMA_DST_ADDR_REG);
+               writel(upper_32_bits((unsigned long)rxbuf), priv->regbase +
+                      CQSPI_DMA_DST_ADDR_MSB_REG);
                writel(priv->trigger_address, priv->regbase +
                       CQSPI_DMA_SRC_RD_ADDR_REG);
                writel(bytes_to_dma, priv->regbase +