diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-07-04 17:11:22 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-07-04 17:11:22 -0400 |
commit | 2b0f89317e99735bbf32eaede81f707f98ab1b5e (patch) | |
tree | 16daa236e21876b11f1c0b9256cd4046aadba020 /arch/arm/mach-imx | |
parent | 07bd1172902e782f288e4d44b1fde7dec0f08b6f (diff) | |
parent | fa18f7bde3ad4568d1d343b60d963bfbd8dc3991 (diff) |
Merge branch 'timers/posix-cpu-timers-for-tglx' of
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into timers/core
Frederic sayed: "Most of these patches have been hanging around for
several month now, in -mmotm for a significant chunk. They already
missed a few releases."
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-imx/headsmp.S | 12 | ||||
-rw-r--r-- | arch/arm/mach-imx/platsmp.c | 14 |
3 files changed, 34 insertions, 7 deletions
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 151259003086..4e3148ce852d 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -177,17 +177,18 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | |||
177 | static const char *step_sels[] = { "osc", "pll2_pfd2_396m", }; | 177 | static const char *step_sels[] = { "osc", "pll2_pfd2_396m", }; |
178 | static const char *pll1_sw_sels[] = { "pll1_sys", "step", }; | 178 | static const char *pll1_sw_sels[] = { "pll1_sys", "step", }; |
179 | static const char *periph_pre_sels[] = { "pll2_bus", "pll2_pfd2_396m", "pll2_pfd0_352m", "pll2_198m", }; | 179 | static const char *periph_pre_sels[] = { "pll2_bus", "pll2_pfd2_396m", "pll2_pfd0_352m", "pll2_198m", }; |
180 | static const char *periph_clk2_sels[] = { "pll3_usb_otg", "osc", }; | 180 | static const char *periph_clk2_sels[] = { "pll3_usb_otg", "osc", "osc", "dummy", }; |
181 | static const char *periph2_clk2_sels[] = { "pll3_usb_otg", "pll2_bus", }; | ||
181 | static const char *periph_sels[] = { "periph_pre", "periph_clk2", }; | 182 | static const char *periph_sels[] = { "periph_pre", "periph_clk2", }; |
182 | static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", }; | 183 | static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", }; |
183 | static const char *axi_sels[] = { "periph", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | 184 | static const char *axi_sels[] = { "periph", "pll2_pfd2_396m", "periph", "pll3_pfd1_540m", }; |
184 | static const char *audio_sels[] = { "pll4_post_div", "pll3_pfd2_508m", "pll3_pfd3_454m", "pll3_usb_otg", }; | 185 | static const char *audio_sels[] = { "pll4_post_div", "pll3_pfd2_508m", "pll3_pfd3_454m", "pll3_usb_otg", }; |
185 | static const char *gpu_axi_sels[] = { "axi", "ahb", }; | 186 | static const char *gpu_axi_sels[] = { "axi", "ahb", }; |
186 | static const char *gpu2d_core_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd0_352m", "pll2_pfd2_396m", }; | 187 | static const char *gpu2d_core_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd0_352m", "pll2_pfd2_396m", }; |
187 | static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; | 188 | static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; |
188 | static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd9_720m", }; | 189 | static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll3_pfd0_720m", }; |
189 | static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; | 190 | static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; |
190 | static const char *ldb_di_sels[] = { "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "mmdc_ch1_axi", "pll3_usb_otg", }; | 191 | static const char *ldb_di_sels[] = { "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "mmdc_ch1_axi", "pll3_usb_otg", }; |
191 | static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | 192 | static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; |
192 | static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 193 | static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
193 | static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 194 | static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
@@ -369,8 +370,8 @@ int __init mx6q_clocks_init(void) | |||
369 | clk[pll1_sw] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels)); | 370 | clk[pll1_sw] = imx_clk_mux("pll1_sw", base + 0xc, 2, 1, pll1_sw_sels, ARRAY_SIZE(pll1_sw_sels)); |
370 | clk[periph_pre] = imx_clk_mux("periph_pre", base + 0x18, 18, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); | 371 | clk[periph_pre] = imx_clk_mux("periph_pre", base + 0x18, 18, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); |
371 | clk[periph2_pre] = imx_clk_mux("periph2_pre", base + 0x18, 21, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); | 372 | clk[periph2_pre] = imx_clk_mux("periph2_pre", base + 0x18, 21, 2, periph_pre_sels, ARRAY_SIZE(periph_pre_sels)); |
372 | clk[periph_clk2_sel] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 1, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); | 373 | clk[periph_clk2_sel] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); |
373 | clk[periph2_clk2_sel] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); | 374 | clk[periph2_clk2_sel] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels)); |
374 | clk[axi_sel] = imx_clk_mux("axi_sel", base + 0x14, 6, 2, axi_sels, ARRAY_SIZE(axi_sels)); | 375 | clk[axi_sel] = imx_clk_mux("axi_sel", base + 0x14, 6, 2, axi_sels, ARRAY_SIZE(axi_sels)); |
375 | clk[esai_sel] = imx_clk_mux("esai_sel", base + 0x20, 19, 2, audio_sels, ARRAY_SIZE(audio_sels)); | 376 | clk[esai_sel] = imx_clk_mux("esai_sel", base + 0x20, 19, 2, audio_sels, ARRAY_SIZE(audio_sels)); |
376 | clk[asrc_sel] = imx_clk_mux("asrc_sel", base + 0x30, 7, 2, audio_sels, ARRAY_SIZE(audio_sels)); | 377 | clk[asrc_sel] = imx_clk_mux("asrc_sel", base + 0x30, 7, 2, audio_sels, ARRAY_SIZE(audio_sels)); |
@@ -498,7 +499,7 @@ int __init mx6q_clocks_init(void) | |||
498 | clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); | 499 | clk[ldb_di1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); |
499 | clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); | 500 | clk[ipu2_di1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); |
500 | clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); | 501 | clk[hsi_tx] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); |
501 | clk[mlb] = imx_clk_gate2("mlb", "pll8_mlb", base + 0x74, 18); | 502 | clk[mlb] = imx_clk_gate2("mlb", "axi", base + 0x74, 18); |
502 | clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); | 503 | clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20); |
503 | clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); | 504 | clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22); |
504 | clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); | 505 | clk[ocram] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28); |
diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S index 67b9c48dcafe..627f16f0e9d1 100644 --- a/arch/arm/mach-imx/headsmp.S +++ b/arch/arm/mach-imx/headsmp.S | |||
@@ -18,8 +18,20 @@ | |||
18 | .section ".text.head", "ax" | 18 | .section ".text.head", "ax" |
19 | 19 | ||
20 | #ifdef CONFIG_SMP | 20 | #ifdef CONFIG_SMP |
21 | diag_reg_offset: | ||
22 | .word g_diag_reg - . | ||
23 | |||
24 | .macro set_diag_reg | ||
25 | adr r0, diag_reg_offset | ||
26 | ldr r1, [r0] | ||
27 | add r1, r1, r0 @ r1 = physical &g_diag_reg | ||
28 | ldr r0, [r1] | ||
29 | mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register | ||
30 | .endm | ||
31 | |||
21 | ENTRY(v7_secondary_startup) | 32 | ENTRY(v7_secondary_startup) |
22 | bl v7_invalidate_l1 | 33 | bl v7_invalidate_l1 |
34 | set_diag_reg | ||
23 | b secondary_startup | 35 | b secondary_startup |
24 | ENDPROC(v7_secondary_startup) | 36 | ENDPROC(v7_secondary_startup) |
25 | #endif | 37 | #endif |
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c index 4a69305db65e..c6e1ab544882 100644 --- a/arch/arm/mach-imx/platsmp.c +++ b/arch/arm/mach-imx/platsmp.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
15 | #include <asm/cacheflush.h> | ||
15 | #include <asm/page.h> | 16 | #include <asm/page.h> |
16 | #include <asm/smp_scu.h> | 17 | #include <asm/smp_scu.h> |
17 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
@@ -21,6 +22,7 @@ | |||
21 | 22 | ||
22 | #define SCU_STANDBY_ENABLE (1 << 5) | 23 | #define SCU_STANDBY_ENABLE (1 << 5) |
23 | 24 | ||
25 | u32 g_diag_reg; | ||
24 | static void __iomem *scu_base; | 26 | static void __iomem *scu_base; |
25 | 27 | ||
26 | static struct map_desc scu_io_desc __initdata = { | 28 | static struct map_desc scu_io_desc __initdata = { |
@@ -80,6 +82,18 @@ void imx_smp_prepare(void) | |||
80 | static void __init imx_smp_prepare_cpus(unsigned int max_cpus) | 82 | static void __init imx_smp_prepare_cpus(unsigned int max_cpus) |
81 | { | 83 | { |
82 | imx_smp_prepare(); | 84 | imx_smp_prepare(); |
85 | |||
86 | /* | ||
87 | * The diagnostic register holds the errata bits. Mostly bootloader | ||
88 | * does not bring up secondary cores, so that when errata bits are set | ||
89 | * in bootloader, they are set only for boot cpu. But on a SMP | ||
90 | * configuration, it should be equally done on every single core. | ||
91 | * Read the register from boot cpu here, and will replicate it into | ||
92 | * secondary cores when booting them. | ||
93 | */ | ||
94 | asm("mrc p15, 0, %0, c15, c0, 1" : "=r" (g_diag_reg) : : "cc"); | ||
95 | __cpuc_flush_dcache_area(&g_diag_reg, sizeof(g_diag_reg)); | ||
96 | outer_clean_range(__pa(&g_diag_reg), __pa(&g_diag_reg + 1)); | ||
83 | } | 97 | } |
84 | 98 | ||
85 | struct smp_operations imx_smp_ops __initdata = { | 99 | struct smp_operations imx_smp_ops __initdata = { |