diff options
Diffstat (limited to 'arch/arm/mach-imx')
| -rw-r--r-- | arch/arm/mach-imx/clk-imx35.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-imx/common.h | 2 | ||||
| -rw-r--r-- | arch/arm/mach-imx/headsmp.S | 18 | ||||
| -rw-r--r-- | arch/arm/mach-imx/hotplug.c | 12 | ||||
| -rw-r--r-- | arch/arm/mach-imx/imx25-dt.c | 5 | ||||
| -rw-r--r-- | arch/arm/mach-imx/pm-imx6q.c | 15 | ||||
| -rw-r--r-- | arch/arm/mach-imx/src.c | 12 | 
8 files changed, 42 insertions, 25 deletions
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index 74e3a34d78b..e13a8fa5e62 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c @@ -264,6 +264,7 @@ int __init mx35_clocks_init(void)  	clk_prepare_enable(clk[gpio3_gate]);  	clk_prepare_enable(clk[iim_gate]);  	clk_prepare_enable(clk[emi_gate]); +	clk_prepare_enable(clk[max_gate]);  	/*  	 * SCC is needed to boot via mmc after a watchdog reset. The clock code diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 7b025ee528a..2f9ff93a4e6 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -172,7 +172,7 @@ static struct clk *clk[clk_max];  static struct clk_onecell_data clk_data;  static enum mx6q_clks const clks_init_on[] __initconst = { -	mmdc_ch0_axi, rom, +	mmdc_ch0_axi, rom, pll1_sys,  };  static struct clk_div_table clk_enet_ref_table[] = { diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 5a800bfcec5..5bf4a97ab24 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -110,6 +110,8 @@ void tzic_handle_irq(struct pt_regs *);  extern void imx_enable_cpu(int cpu, bool enable);  extern void imx_set_cpu_jump(int cpu, void *jump_addr); +extern u32 imx_get_cpu_arg(int cpu); +extern void imx_set_cpu_arg(int cpu, u32 arg);  extern void v7_cpu_resume(void);  extern u32 *pl310_get_save_ptr(void);  #ifdef CONFIG_SMP diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S index 921fc155585..a58c8b0527c 100644 --- a/arch/arm/mach-imx/headsmp.S +++ b/arch/arm/mach-imx/headsmp.S @@ -26,16 +26,16 @@ ENDPROC(v7_secondary_startup)  #ifdef CONFIG_PM  /* - * The following code is located into the .data section.  This is to - * allow phys_l2x0_saved_regs to be accessed with a relative load - * as we are running on physical address here. + * The following code must assume it is running from physical address + * where absolute virtual addresses to the data section have to be + * turned into relative ones.   */ -	.data -	.align  #ifdef CONFIG_CACHE_L2X0  	.macro	pl310_resume -	ldr	r2, phys_l2x0_saved_regs +	adr	r0, l2x0_saved_regs_offset +	ldr	r2, [r0] +	add	r2, r2, r0  	ldr	r0, [r2, #L2X0_R_PHY_BASE]	@ get physical base of l2x0  	ldr	r1, [r2, #L2X0_R_AUX_CTRL]	@ get aux_ctrl value  	str	r1, [r0, #L2X0_AUX_CTRL]	@ restore aux_ctrl @@ -43,9 +43,9 @@ ENDPROC(v7_secondary_startup)  	str	r1, [r0, #L2X0_CTRL]		@ re-enable L2  	.endm -	.globl	phys_l2x0_saved_regs -phys_l2x0_saved_regs: -        .long   0 +l2x0_saved_regs_offset: +	.word	l2x0_saved_regs - . +  #else  	.macro	pl310_resume  	.endm diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c index 7bc5fe15dda..361a253e2b6 100644 --- a/arch/arm/mach-imx/hotplug.c +++ b/arch/arm/mach-imx/hotplug.c @@ -46,11 +46,23 @@ static inline void cpu_enter_lowpower(void)  void imx_cpu_die(unsigned int cpu)  {  	cpu_enter_lowpower(); +	/* +	 * We use the cpu jumping argument register to sync with +	 * imx_cpu_kill() which is running on cpu0 and waiting for +	 * the register being cleared to kill the cpu. +	 */ +	imx_set_cpu_arg(cpu, ~0);  	cpu_do_idle();  }  int imx_cpu_kill(unsigned int cpu)  { +	unsigned long timeout = jiffies + msecs_to_jiffies(50); + +	while (imx_get_cpu_arg(cpu) == 0) +		if (time_after(jiffies, timeout)) +			return 0;  	imx_enable_cpu(cpu, false); +	imx_set_cpu_arg(cpu, 0);  	return 1;  } diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c index 03b65e5ea54..82348391582 100644 --- a/arch/arm/mach-imx/imx25-dt.c +++ b/arch/arm/mach-imx/imx25-dt.c @@ -27,6 +27,11 @@ static const char * const imx25_dt_board_compat[] __initconst = {  	NULL  }; +static void __init imx25_timer_init(void) +{ +	mx25_clocks_init_dt(); +} +  DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)")  	.map_io		= mx25_map_io,  	.init_early	= imx25_init_early, diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c index ee42d20cba1..5faba7a3c95 100644 --- a/arch/arm/mach-imx/pm-imx6q.c +++ b/arch/arm/mach-imx/pm-imx6q.c @@ -22,8 +22,6 @@  #include "common.h"  #include "hardware.h" -extern unsigned long phys_l2x0_saved_regs; -  static int imx6q_suspend_finish(unsigned long val)  {  	cpu_do_idle(); @@ -57,18 +55,5 @@ static const struct platform_suspend_ops imx6q_pm_ops = {  void __init imx6q_pm_init(void)  { -	/* -	 * The l2x0 core code provides an infrastucture to save and restore -	 * l2x0 registers across suspend/resume cycle.  But because imx6q -	 * retains L2 content during suspend and needs to resume L2 before -	 * MMU is enabled, it can only utilize register saving support and -	 * have to take care of restoring on its own.  So we save physical -	 * address of the data structure used by l2x0 core to save registers, -	 * and later restore the necessary ones in imx6q resume entry. -	 */ -#ifdef CONFIG_CACHE_L2X0 -	phys_l2x0_saved_regs = __pa(&l2x0_saved_regs); -#endif -  	suspend_set_ops(&imx6q_pm_ops);  } diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c index e15f1555c59..09a742f8c7a 100644 --- a/arch/arm/mach-imx/src.c +++ b/arch/arm/mach-imx/src.c @@ -43,6 +43,18 @@ void imx_set_cpu_jump(int cpu, void *jump_addr)  		       src_base + SRC_GPR1 + cpu * 8);  } +u32 imx_get_cpu_arg(int cpu) +{ +	cpu = cpu_logical_map(cpu); +	return readl_relaxed(src_base + SRC_GPR1 + cpu * 8 + 4); +} + +void imx_set_cpu_arg(int cpu, u32 arg) +{ +	cpu = cpu_logical_map(cpu); +	writel_relaxed(arg, src_base + SRC_GPR1 + cpu * 8 + 4); +} +  void imx_src_prepare_restart(void)  {  	u32 val;  |