summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-06-07 06:00:37 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-06-11 08:54:10 +0200
commit4661c7bb15c1ab348f35299585fc8edb520cb81d (patch)
tree2de3b4c5f33fbd5af7c0d33b029508cf8242449b
parent52a1cadf11d40ec0b8fed08b98b25a8a0c9b4f57 (diff)
downloadbarebox-4661c7bb15c1ab348f35299585fc8edb520cb81d.tar.gz
barebox-4661c7bb15c1ab348f35299585fc8edb520cb81d.tar.xz
ARM: i.MX: boot: Fix address casting on 64-bit platforms
Add an intermediary casting step in order to avoid casting 32-bit integer to 64-bit pointer on 64-bit platforms. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-imx/boot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c
index 22cf08e6ad..11105a148f 100644
--- a/arch/arm/mach-imx/boot.c
+++ b/arch/arm/mach-imx/boot.c
@@ -485,7 +485,8 @@ void imx7_get_boot_source(enum bootsource *src, int *instance)
*/
const struct imx_boot_sw_info *info;
- info = (const void *)readl(IMX_BOOT_SW_INFO_POINTER_ADDR);
+ info = (const void *)(unsigned long)
+ readl(IMX_BOOT_SW_INFO_POINTER_ADDR);
if (info->boot_device_type == IMX_BOOT_SW_INFO_BDT_SD) {
*src = BOOTSOURCE_MMC;