]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mach-ux500: make PRCMU base address dynamic
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 29 Mar 2011 14:53:29 +0000 (16:53 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 24 May 2011 20:11:48 +0000 (22:11 +0200)
This makes the PRCMU base address be selected at runtime for U8500
and U5500 instead of being compiled-in.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-ux500/cpu-db5500.c
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-ux500/cpu.c
arch/arm/mach-ux500/include/mach/hardware.h
arch/arm/mach-ux500/include/mach/prcmu-regs.h

index c9dc2eff3cb2d5a8677c16ee7e43ec6d992c47b9..c01bc19e3c5eac6c51d3adf1cffb13333a29047b 100644 (file)
@@ -188,6 +188,8 @@ void __init u5500_map_io(void)
        ux500_map_io();
 
        iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc));
+
+       _PRCMU_BASE = __io_address(U5500_PRCMU_BASE);
 }
 
 static int usb_db5500_rx_dma_cfg[] = {
index 516126cb357dfeb52d918e57d4af4598669773d1..3d419fef0470f80be7025d60e60d61fa47bdd7a2 100644 (file)
@@ -87,6 +87,8 @@ void __init u8500_map_io(void)
                iotable_init(u8500_v1_io_desc, ARRAY_SIZE(u8500_v1_io_desc));
        else if (cpu_is_u8500v2())
                iotable_init(u8500_v2_io_desc, ARRAY_SIZE(u8500_v2_io_desc));
+
+       _PRCMU_BASE = __io_address(U8500_PRCMU_BASE);
 }
 
 static struct resource db8500_pmu_resources[] = {
index 5a43107c62325fc8a3f533053777ca0385cdc436..0190e0e68b4d11d68a91ef3ca3fcf31783cac9cf 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "clock.h"
 
+void __iomem *_PRCMU_BASE;
+
 #ifdef CONFIG_CACHE_L2X0
 static void __iomem *l2x0_base;
 #endif
index bf63f2631ba0519234ef6f1d0c94d0af92d2b548..2c6f71049f2ec7fec0fe2f3ac6ca934330f33033 100644 (file)
@@ -35,6 +35,7 @@
 #ifndef __ASSEMBLY__
 
 #include <mach/id.h>
+extern void __iomem *_PRCMU_BASE;
 
 #define ARRAY_AND_SIZE(x)      (x), ARRAY_SIZE(x)
 
index 455467e887915d628cd13ea416e47fc5d86ebdc6..c1226da19bfba11a686c70df56e91cd943d9b50b 100644 (file)
@@ -15,8 +15,6 @@
 
 #include <mach/hardware.h>
 
-#define _PRCMU_BASE            IO_ADDRESS(U8500_PRCMU_BASE)
-
 #define PRCM_ARM_PLLDIVPS      (_PRCMU_BASE + 0x118)
 #define PRCM_ARM_CHGCLKREQ     (_PRCMU_BASE + 0x114)
 #define PRCM_PLLARM_ENABLE     (_PRCMU_BASE + 0x98)