[PATCH 05/15] ARM: i.MX: xload-gpmi: Fix compiler warning
Sascha Hauer
s.hauer at pengutronix.de
Mon May 17 11:54:14 PDT 2021
'pdesc' is a pointer casted to a 32bit value. This rightfully issues a
compiler warning when being compiled with a 64bit toolchain. This code
is compiled on 64bit systems, but the hardware won't be used there.
Just silence the warning by casting the pointer to unsigned long.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/mach-imx/xload-gpmi-nand.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/xload-gpmi-nand.c b/arch/arm/mach-imx/xload-gpmi-nand.c
index b3fd479cb4..deb7f4806e 100644
--- a/arch/arm/mach-imx/xload-gpmi-nand.c
+++ b/arch/arm/mach-imx/xload-gpmi-nand.c
@@ -111,14 +111,15 @@ static int mxs_dma_enable(struct mxs_dma_chan *pchan,
struct apbh_dma *apbh = pchan->apbh;
int channel_bit;
int channel = pchan->channel;
+ unsigned long pdesc32 = (unsigned long)pdesc;
if (apbh_dma_is_imx23(apbh)) {
- writel((uint32_t)pdesc,
+ writel(pdesc32,
apbh->regs + HW_APBHX_CHn_NXTCMDAR_MX23(channel));
writel(1, apbh->regs + HW_APBHX_CHn_SEMA_MX23(channel));
channel_bit = channel + BP_APBH_CTRL0_CLKGATE_CHANNEL;
} else {
- writel((uint32_t)pdesc,
+ writel(pdesc32,
apbh->regs + HW_APBHX_CHn_NXTCMDAR_MX28(channel));
writel(1, apbh->regs + HW_APBHX_CHn_SEMA_MX28(channel));
channel_bit = channel;
@@ -174,7 +175,7 @@ static int mxs_dma_run(struct mxs_dma_chan *pchan, struct mxs_dma_cmd *pdesc,
/* chain descriptors */
for (i = 0; i < num - 1; i++) {
- pdesc[i].next = (uint32_t)(&pdesc[i + 1]);
+ pdesc[i].next = (unsigned long)(&pdesc[i + 1]);
pdesc[i].data |= DMACMD_CHAIN;
}
--
2.29.2
More information about the barebox
mailing list