diff options
-rw-r--r-- | arch/arm/mach-mvebu/armada-370-xp.c | 38 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/armada-370-xp.h | 8 |
2 files changed, 27 insertions, 19 deletions
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index c1c0556fd250..0dbc370f9e35 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/of_address.h> | ||
17 | #include <linux/of_platform.h> | 18 | #include <linux/of_platform.h> |
18 | #include <linux/io.h> | 19 | #include <linux/io.h> |
19 | #include <linux/time-armada-370-xp.h> | 20 | #include <linux/time-armada-370-xp.h> |
@@ -33,29 +34,44 @@ static void __init armada_370_xp_map_io(void) | |||
33 | debug_ll_io_init(); | 34 | debug_ll_io_init(); |
34 | } | 35 | } |
35 | 36 | ||
36 | static void __init armada_370_xp_timer_and_clk_init(void) | 37 | /* |
38 | * This initialization will be replaced by a DT-based | ||
39 | * initialization once the mvebu-mbus driver gains DT support. | ||
40 | */ | ||
41 | |||
42 | #define ARMADA_370_XP_MBUS_WINS_OFFS 0x20000 | ||
43 | #define ARMADA_370_XP_MBUS_WINS_SIZE 0x100 | ||
44 | #define ARMADA_370_XP_SDRAM_WINS_OFFS 0x20180 | ||
45 | #define ARMADA_370_XP_SDRAM_WINS_SIZE 0x20 | ||
46 | |||
47 | static void __init armada_370_xp_mbus_init(void) | ||
37 | { | 48 | { |
38 | char *mbus_soc_name; | 49 | char *mbus_soc_name; |
50 | struct device_node *dn; | ||
51 | const __be32 mbus_wins_offs = cpu_to_be32(ARMADA_370_XP_MBUS_WINS_OFFS); | ||
52 | const __be32 sdram_wins_offs = cpu_to_be32(ARMADA_370_XP_SDRAM_WINS_OFFS); | ||
39 | 53 | ||
40 | mvebu_clocks_init(); | ||
41 | armada_370_xp_timer_init(); | ||
42 | coherency_init(); | ||
43 | |||
44 | /* | ||
45 | * This initialization will be replaced by a DT-based | ||
46 | * initialization once the mvebu-mbus driver gains DT support. | ||
47 | */ | ||
48 | if (of_machine_is_compatible("marvell,armada370")) | 54 | if (of_machine_is_compatible("marvell,armada370")) |
49 | mbus_soc_name = "marvell,armada370-mbus"; | 55 | mbus_soc_name = "marvell,armada370-mbus"; |
50 | else | 56 | else |
51 | mbus_soc_name = "marvell,armadaxp-mbus"; | 57 | mbus_soc_name = "marvell,armadaxp-mbus"; |
52 | 58 | ||
59 | dn = of_find_node_by_name(NULL, "internal-regs"); | ||
60 | BUG_ON(!dn); | ||
61 | |||
53 | mvebu_mbus_init(mbus_soc_name, | 62 | mvebu_mbus_init(mbus_soc_name, |
54 | ARMADA_370_XP_MBUS_WINS_BASE, | 63 | of_translate_address(dn, &mbus_wins_offs), |
55 | ARMADA_370_XP_MBUS_WINS_SIZE, | 64 | ARMADA_370_XP_MBUS_WINS_SIZE, |
56 | ARMADA_370_XP_SDRAM_WINS_BASE, | 65 | of_translate_address(dn, &sdram_wins_offs), |
57 | ARMADA_370_XP_SDRAM_WINS_SIZE); | 66 | ARMADA_370_XP_SDRAM_WINS_SIZE); |
67 | } | ||
58 | 68 | ||
69 | static void __init armada_370_xp_timer_and_clk_init(void) | ||
70 | { | ||
71 | mvebu_clocks_init(); | ||
72 | armada_370_xp_timer_init(); | ||
73 | coherency_init(); | ||
74 | armada_370_xp_mbus_init(); | ||
59 | #ifdef CONFIG_CACHE_L2X0 | 75 | #ifdef CONFIG_CACHE_L2X0 |
60 | l2x0_of_init(0, ~0UL); | 76 | l2x0_of_init(0, ~0UL); |
61 | #endif | 77 | #endif |
diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h index 585e14710c8b..c612b2c4ed6c 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.h +++ b/arch/arm/mach-mvebu/armada-370-xp.h | |||
@@ -15,14 +15,6 @@ | |||
15 | #ifndef __MACH_ARMADA_370_XP_H | 15 | #ifndef __MACH_ARMADA_370_XP_H |
16 | #define __MACH_ARMADA_370_XP_H | 16 | #define __MACH_ARMADA_370_XP_H |
17 | 17 | ||
18 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 | ||
19 | |||
20 | /* These defines can go away once mvebu-mbus has a DT binding */ | ||
21 | #define ARMADA_370_XP_MBUS_WINS_BASE (ARMADA_370_XP_REGS_PHYS_BASE + 0x20000) | ||
22 | #define ARMADA_370_XP_MBUS_WINS_SIZE 0x100 | ||
23 | #define ARMADA_370_XP_SDRAM_WINS_BASE (ARMADA_370_XP_REGS_PHYS_BASE + 0x20180) | ||
24 | #define ARMADA_370_XP_SDRAM_WINS_SIZE 0x20 | ||
25 | |||
26 | #ifdef CONFIG_SMP | 18 | #ifdef CONFIG_SMP |
27 | #include <linux/cpumask.h> | 19 | #include <linux/cpumask.h> |
28 | 20 | ||