diff options
author | Alexander Graf <agraf@suse.de> | 2016-03-29 17:29:09 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-04-01 09:52:28 +0200 |
commit | 0ea5a04fbcd72ebb37eb4b3f744374fdf551d3b7 (patch) | |
tree | 0c4ee763250d33057c6ac5ca7fa085d3757b438b /arch | |
parent | 8434f0357624ad7345450d8c765264637dfd7cd1 (diff) | |
download | u-boot-imx-0ea5a04fbcd72ebb37eb4b3f744374fdf551d3b7.zip u-boot-imx-0ea5a04fbcd72ebb37eb4b3f744374fdf551d3b7.tar.gz u-boot-imx-0ea5a04fbcd72ebb37eb4b3f744374fdf551d3b7.tar.bz2 |
sunxi: Explicitly cast u32 pointer conversions
Some parts of the sunxi code cast explicitly between u32 values and pointers.
This is not a problem in practice, because all 64bit SoCs today only use the
lower 32 bits for their phyical address space. But we need to make sure that
the compiler is sure this is not an accident as well.
Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-sunxi/cpu_info.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-sunxi/dram_helpers.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-sunxi/usb_phy.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-sunxi/cpu_info.c b/arch/arm/mach-sunxi/cpu_info.c index c0eabdf..b885ea1 100644 --- a/arch/arm/mach-sunxi/cpu_info.c +++ b/arch/arm/mach-sunxi/cpu_info.c @@ -105,7 +105,7 @@ int sunxi_get_sid(unsigned int *sid) int i; for (i = 0; i< 4; i++) - sid[i] = readl(SUNXI_SID_BASE + 4 * i); + sid[i] = readl((ulong)SUNXI_SID_BASE + 4 * i); return 0; #else diff --git a/arch/arm/mach-sunxi/dram_helpers.c b/arch/arm/mach-sunxi/dram_helpers.c index 9a94e1b..50318d2 100644 --- a/arch/arm/mach-sunxi/dram_helpers.c +++ b/arch/arm/mach-sunxi/dram_helpers.c @@ -30,8 +30,8 @@ bool mctl_mem_matches(u32 offset) { /* Try to write different values to RAM at two addresses */ writel(0, CONFIG_SYS_SDRAM_BASE); - writel(0xaa55aa55, CONFIG_SYS_SDRAM_BASE + offset); + writel(0xaa55aa55, (ulong)CONFIG_SYS_SDRAM_BASE + offset); /* Check if the same value is actually observed when reading back */ return readl(CONFIG_SYS_SDRAM_BASE) == - readl(CONFIG_SYS_SDRAM_BASE + offset); + readl((ulong)CONFIG_SYS_SDRAM_BASE + offset); } diff --git a/arch/arm/mach-sunxi/usb_phy.c b/arch/arm/mach-sunxi/usb_phy.c index fa375f1..b258ce4 100644 --- a/arch/arm/mach-sunxi/usb_phy.c +++ b/arch/arm/mach-sunxi/usb_phy.c @@ -52,7 +52,7 @@ static struct sunxi_usb_phy { int id; int init_count; int power_on_count; - int base; + ulong base; } sunxi_usb_phy[] = { { .usb_rst_mask = CCM_USB_CTRL_PHY0_RST | CCM_USB_CTRL_PHY0_CLK, |