aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/id.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-05-31 22:47:04 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-06-04 11:21:58 +0200
commit080e0435e54298992dfc03dc04ca53cfe3de36ba (patch)
tree4ecb520553e3dc517f6d8412b7321e304f9c938a /arch/arm/mach-ux500/id.c
parent19d323412447177208785ba391c0f2288b56b5c8 (diff)
ARM: ux500: avoid warning in ux500_read_asicid
phys_addr_t may be 64 bit, which causes this harmless warning in ux500_read_asicid: arch/arm/mach-ux500/id.c: In function 'ux500_read_asicid': arch/arm/include/asm/io.h:159:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IOMEM(x) ((void __force __iomem *)(x)) ^ arch/arm/mach-ux500/id.c:40:9: note: in expansion of macro 'readl' return readl(IOMEM(UX500_VIRT_ROM + (addr & 0xfff))); We can solve this in a nicer way by making UX500_VIRT_ROM have a proper type to start with and calculating the address using pointer arithmetic. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/id.c')
-rw-r--r--arch/arm/mach-ux500/id.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-ux500/id.c b/arch/arm/mach-ux500/id.c
index 0d33d1a0695..392f2fdb37d 100644
--- a/arch/arm/mach-ux500/id.c
+++ b/arch/arm/mach-ux500/id.c
@@ -21,11 +21,11 @@
struct dbx500_asic_id dbx500_id;
-static unsigned int ux500_read_asicid(phys_addr_t addr)
+static unsigned int __init ux500_read_asicid(phys_addr_t addr)
{
phys_addr_t base = addr & ~0xfff;
struct map_desc desc = {
- .virtual = UX500_VIRT_ROM,
+ .virtual = (unsigned long)UX500_VIRT_ROM,
.pfn = __phys_to_pfn(base),
.length = SZ_16K,
.type = MT_DEVICE,
@@ -37,7 +37,7 @@ static unsigned int ux500_read_asicid(phys_addr_t addr)
local_flush_tlb_all();
flush_cache_all();
- return readl(IOMEM(UX500_VIRT_ROM + (addr & 0xfff)));
+ return readl(UX500_VIRT_ROM + (addr & 0xfff));
}
static void ux500_print_soc_info(unsigned int asicid)