Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes

Merge Samsung fixes for 3.16 from Kukjin Kim:

- use WFI macro in platform_do_lowpower because exynos cpuhotplug
includes a hardcoded WFI instruction and it causes compile error
in Thumb-2 mode.
- fix GIC reg sizes for exynos4 SoCs
- remove reset timer counter value during boot and resume for mct
to fix a big jump in printk timestamps
- fix pm code to check cortex-A9 for another exynos SoCs
- don't rely on firmware's secondary_cpu_start for mcpm

* tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: EXYNOS: Don't rely on firmware's secondary_cpu_start for mcpm
ARM: EXYNOS: fix pm code to check for cortex A9 rather than the SoC
clocksource: exynos_mct: Don't reset the counter during boot and resume
ARM: dts: fix reg sizes of GIC for exynos4
ARM: EXYNOS: Use wfi macro in platform_do_lowpower

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+20 -25
+1 -1
arch/arm/boot/dts/exynos4.dtsi
··· 113 113 compatible = "arm,cortex-a9-gic"; 114 114 #interrupt-cells = <3>; 115 115 interrupt-controller; 116 - reg = <0x10490000 0x1000>, <0x10480000 0x100>; 116 + reg = <0x10490000 0x10000>, <0x10480000 0x10000>; 117 117 }; 118 118 119 119 combiner: interrupt-controller@10440000 {
+1 -7
arch/arm/mach-exynos/hotplug.c
··· 46 46 if (cpu == 1) 47 47 exynos_cpu_power_down(cpu); 48 48 49 - /* 50 - * here's the WFI 51 - */ 52 - asm(".word 0xe320f003\n" 53 - : 54 - : 55 - : "memory", "cc"); 49 + wfi(); 56 50 57 51 if (pen_release == cpu_logical_map(cpu)) { 58 52 /*
+6 -5
arch/arm/mach-exynos/mcpm-exynos.c
··· 25 25 26 26 #define EXYNOS5420_CPUS_PER_CLUSTER 4 27 27 #define EXYNOS5420_NR_CLUSTERS 2 28 - #define MCPM_BOOT_ADDR_OFFSET 0x1c 29 28 30 29 /* 31 30 * The common v7_exit_coherency_flush API could not be used because of the ··· 342 343 pr_info("Exynos MCPM support installed\n"); 343 344 344 345 /* 345 - * Future entries into the kernel can now go 346 - * through the cluster entry vectors. 346 + * U-Boot SPL is hardcoded to jump to the start of ns_sram_base_addr 347 + * as part of secondary_cpu_start(). Let's redirect it to the 348 + * mcpm_entry_point(). 347 349 */ 348 - __raw_writel(virt_to_phys(mcpm_entry_point), 349 - ns_sram_base_addr + MCPM_BOOT_ADDR_OFFSET); 350 + __raw_writel(0xe59f0000, ns_sram_base_addr); /* ldr r0, [pc, #0] */ 351 + __raw_writel(0xe12fff10, ns_sram_base_addr + 4); /* bx r0 */ 352 + __raw_writel(virt_to_phys(mcpm_entry_point), ns_sram_base_addr + 8); 350 353 351 354 iounmap(ns_sram_base_addr); 352 355
+9 -6
arch/arm/mach-exynos/pm.c
··· 300 300 tmp = (S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0); 301 301 __raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION); 302 302 303 - if (!soc_is_exynos5250()) 303 + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) 304 304 exynos_cpu_save_register(); 305 305 306 306 return 0; ··· 334 334 if (exynos_pm_central_resume()) 335 335 goto early_wakeup; 336 336 337 - if (!soc_is_exynos5250()) 337 + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) 338 338 exynos_cpu_restore_register(); 339 339 340 340 /* For release retention */ ··· 353 353 354 354 s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save)); 355 355 356 - if (!soc_is_exynos5250()) 356 + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) 357 357 scu_enable(S5P_VA_SCU); 358 358 359 359 early_wakeup: ··· 440 440 case CPU_PM_ENTER: 441 441 if (cpu == 0) { 442 442 exynos_pm_central_suspend(); 443 - exynos_cpu_save_register(); 443 + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) 444 + exynos_cpu_save_register(); 444 445 } 445 446 break; 446 447 447 448 case CPU_PM_EXIT: 448 449 if (cpu == 0) { 449 - if (!soc_is_exynos5250()) 450 + if (read_cpuid_part_number() == 451 + ARM_CPU_PART_CORTEX_A9) { 450 452 scu_enable(S5P_VA_SCU); 451 - exynos_cpu_restore_register(); 453 + exynos_cpu_restore_register(); 454 + } 452 455 exynos_pm_central_resume(); 453 456 } 454 457 break;
+3 -6
drivers/clocksource/exynos_mct.c
··· 153 153 } 154 154 155 155 /* Clocksource handling */ 156 - static void exynos4_mct_frc_start(u32 hi, u32 lo) 156 + static void exynos4_mct_frc_start(void) 157 157 { 158 158 u32 reg; 159 - 160 - exynos4_mct_write(lo, EXYNOS4_MCT_G_CNT_L); 161 - exynos4_mct_write(hi, EXYNOS4_MCT_G_CNT_U); 162 159 163 160 reg = __raw_readl(reg_base + EXYNOS4_MCT_G_TCON); 164 161 reg |= MCT_G_TCON_START; ··· 178 181 179 182 static void exynos4_frc_resume(struct clocksource *cs) 180 183 { 181 - exynos4_mct_frc_start(0, 0); 184 + exynos4_mct_frc_start(); 182 185 } 183 186 184 187 struct clocksource mct_frc = { ··· 197 200 198 201 static void __init exynos4_clocksource_init(void) 199 202 { 200 - exynos4_mct_frc_start(0, 0); 203 + exynos4_mct_frc_start(); 201 204 202 205 if (clocksource_register_hz(&mct_frc, clk_rate)) 203 206 panic("%s: can't register clocksource\n", mct_frc.name);