aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mv78xx0/common.c
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-09-11 08:27:20 -0400
committerJason Cooper <jason@lakedaemon.net>2012-09-21 14:03:44 -0400
commit383b99610e6084878930d4e4682dfc5e9141b038 (patch)
tree1a35c3cac8cbb8335ec6dcb632db4ccd7a21dc68 /arch/arm/mach-mv78xx0/common.c
parent060f3d191b1d80312d7c90de2f3c3356db413f40 (diff)
arm: mach-mv78xx0: use IOMEM() for base address definitions
We now define all virtual base address constants using IOMEM() so that those are naturally typed as void __iomem pointers, and we do the necessary adjustements in the mach-mv78xx0 code. Note that we introduce a few temporary additional "unsigned long" casts when calling into plat-orion functions. Those are removed by followup patches converting plat-orion functions to void __iomem pointers as well. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-mv78xx0/common.c')
-rw-r--r--arch/arm/mach-mv78xx0/common.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c
index 3057f7d4329a..c4e3458e0674 100644
--- a/arch/arm/mach-mv78xx0/common.c
+++ b/arch/arm/mach-mv78xx0/common.c
@@ -130,17 +130,17 @@ static int get_tclk(void)
130 ****************************************************************************/ 130 ****************************************************************************/
131static struct map_desc mv78xx0_io_desc[] __initdata = { 131static struct map_desc mv78xx0_io_desc[] __initdata = {
132 { 132 {
133 .virtual = MV78XX0_CORE_REGS_VIRT_BASE, 133 .virtual = (unsigned long) MV78XX0_CORE_REGS_VIRT_BASE,
134 .pfn = 0, 134 .pfn = 0,
135 .length = MV78XX0_CORE_REGS_SIZE, 135 .length = MV78XX0_CORE_REGS_SIZE,
136 .type = MT_DEVICE, 136 .type = MT_DEVICE,
137 }, { 137 }, {
138 .virtual = MV78XX0_PCIE_IO_VIRT_BASE(0), 138 .virtual = (unsigned long) MV78XX0_PCIE_IO_VIRT_BASE(0),
139 .pfn = __phys_to_pfn(MV78XX0_PCIE_IO_PHYS_BASE(0)), 139 .pfn = __phys_to_pfn(MV78XX0_PCIE_IO_PHYS_BASE(0)),
140 .length = MV78XX0_PCIE_IO_SIZE * 8, 140 .length = MV78XX0_PCIE_IO_SIZE * 8,
141 .type = MT_DEVICE, 141 .type = MT_DEVICE,
142 }, { 142 }, {
143 .virtual = MV78XX0_REGS_VIRT_BASE, 143 .virtual = (unsigned long) MV78XX0_REGS_VIRT_BASE,
144 .pfn = __phys_to_pfn(MV78XX0_REGS_PHYS_BASE), 144 .pfn = __phys_to_pfn(MV78XX0_REGS_PHYS_BASE),
145 .length = MV78XX0_REGS_SIZE, 145 .length = MV78XX0_REGS_SIZE,
146 .type = MT_DEVICE, 146 .type = MT_DEVICE,
@@ -300,7 +300,8 @@ void __init mv78xx0_sata_init(struct mv_sata_platform_data *sata_data)
300 ****************************************************************************/ 300 ****************************************************************************/
301void __init mv78xx0_uart0_init(void) 301void __init mv78xx0_uart0_init(void)
302{ 302{
303 orion_uart0_init(UART0_VIRT_BASE, UART0_PHYS_BASE, 303 orion_uart0_init((unsigned long) UART0_VIRT_BASE,
304 UART0_PHYS_BASE,
304 IRQ_MV78XX0_UART_0, tclk); 305 IRQ_MV78XX0_UART_0, tclk);
305} 306}
306 307
@@ -310,7 +311,8 @@ void __init mv78xx0_uart0_init(void)
310 ****************************************************************************/ 311 ****************************************************************************/
311void __init mv78xx0_uart1_init(void) 312void __init mv78xx0_uart1_init(void)
312{ 313{
313 orion_uart1_init(UART1_VIRT_BASE, UART1_PHYS_BASE, 314 orion_uart1_init((unsigned long) UART1_VIRT_BASE,
315 UART1_PHYS_BASE,
314 IRQ_MV78XX0_UART_1, tclk); 316 IRQ_MV78XX0_UART_1, tclk);
315} 317}
316 318
@@ -320,7 +322,8 @@ void __init mv78xx0_uart1_init(void)
320 ****************************************************************************/ 322 ****************************************************************************/
321void __init mv78xx0_uart2_init(void) 323void __init mv78xx0_uart2_init(void)
322{ 324{
323 orion_uart2_init(UART2_VIRT_BASE, UART2_PHYS_BASE, 325 orion_uart2_init((unsigned long) UART2_VIRT_BASE,
326 UART2_PHYS_BASE,
324 IRQ_MV78XX0_UART_2, tclk); 327 IRQ_MV78XX0_UART_2, tclk);
325} 328}
326 329
@@ -329,7 +332,8 @@ void __init mv78xx0_uart2_init(void)
329 ****************************************************************************/ 332 ****************************************************************************/
330void __init mv78xx0_uart3_init(void) 333void __init mv78xx0_uart3_init(void)
331{ 334{
332 orion_uart3_init(UART3_VIRT_BASE, UART3_PHYS_BASE, 335 orion_uart3_init((unsigned long) UART3_VIRT_BASE,
336 UART3_PHYS_BASE,
333 IRQ_MV78XX0_UART_3, tclk); 337 IRQ_MV78XX0_UART_3, tclk);
334} 338}
335 339
@@ -338,12 +342,13 @@ void __init mv78xx0_uart3_init(void)
338 ****************************************************************************/ 342 ****************************************************************************/
339void __init mv78xx0_init_early(void) 343void __init mv78xx0_init_early(void)
340{ 344{
341 orion_time_set_base(TIMER_VIRT_BASE); 345 orion_time_set_base((unsigned long) TIMER_VIRT_BASE);
342} 346}
343 347
344static void mv78xx0_timer_init(void) 348static void mv78xx0_timer_init(void)
345{ 349{
346 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, 350 orion_time_init((unsigned long) BRIDGE_VIRT_BASE,
351 BRIDGE_INT_TIMER1_CLR,
347 IRQ_MV78XX0_TIMER_1, get_tclk()); 352 IRQ_MV78XX0_TIMER_1, get_tclk());
348} 353}
349 354