summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-05-17 20:54:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-05-18 08:24:46 +0200
commit89846de3d35791d4b6c7bbd949ac8df2d59f0117 (patch)
tree2c603d56516a2527554399a45de8658e246fa421 /arch
parent639c818958b8fcf6d96c02d5f6e8e9e28dc3a7f3 (diff)
downloadbarebox-89846de3d35791d4b6c7bbd949ac8df2d59f0117.tar.gz
barebox-89846de3d35791d4b6c7bbd949ac8df2d59f0117.tar.xz
ARM: i.MX: xload-gpmi: Fix compiler warning
'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@pengutronix.de> Link: https://lore.barebox.org/20210517185424.32145-6-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/xload-gpmi-nand.c7
1 files 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;
}