OSDN Git Service

ARM: ux500: avoid warning in ux500_read_asicid
authorArnd Bergmann <arnd@arndb.de>
Fri, 31 May 2013 20:47:04 +0000 (22:47 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 4 Jun 2013 09:21:58 +0000 (11:21 +0200)
commit080e0435e54298992dfc03dc04ca53cfe3de36ba
tree4ecb520553e3dc517f6d8412b7321e304f9c938a
parent19d323412447177208785ba391c0f2288b56b5c8
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>
arch/arm/mach-ux500/db8500-regs.h
arch/arm/mach-ux500/id.c