From: Olof Johansson Date: Sat, 31 May 2014 04:48:39 +0000 (-0700) Subject: Merge tag 'samsung-drivers-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=45e70b7d48d53d5eb193c6b3f012b31ca135fb4c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Merge tag 'samsung-drivers-2' of git://git./linux/kernel/git/kgene/linux-samsung into next/drivers Merge "Samsung 2nd drivers for 3.16" from Kukjin Kim: This is including fix exynos cpufreq driver compilation with ARCH_MULTIPLATFORM. Even though this is a work around, this is required for support exynos multiplatform for a while and will be updated in near future. This is based on tags/samsung-exynos. * tag 'samsung-drivers-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (24 commits) cpufreq: exynos: Fix driver compilation with ARCH_MULTIPLATFORM ARM: EXYNOS: Enable multi-platform build support ARM: EXYNOS: Consolidate Kconfig entries ARM: EXYNOS: Add support for EXYNOS5410 SoC ARM: EXYNOS: Support secondary CPU boot of Exynos3250 ARM: EXYNOS: Add Exynos3250 SoC ID ARM: EXYNOS: Add 5800 SoC support ARM: EXYNOS: initial board support for exynos5260 SoC clk: exynos5250: Add missing sysmmu clocks for DISP and ISP blocks cpufreq: exynos: Fix the compile error ARM: S3C24XX: move debug-macro.S into the common space ARM: S3C24XX: use generic DEBUG_UART_PHY/_VIRT in debug macro ARM: S3C24XX: trim down debug uart handling ARM: compressed/head.S: remove s3c24xx special case ARM: EXYNOS: Remove unnecessary inclusion of cpu.h ARM: EXYNOS: Migrate Exynos specific macros from plat to mach ARM: EXYNOS: Remove exynos_subsys registration ARM: EXYNOS: Remove duplicate lines in Makefile ARM: EXYNOS: use v7_exit_coherency_flush macro for cache disabling ARM: dts: Remove g2d_pd node for exynos5420 ... Signed-off-by: Olof Johansson --- 45e70b7d48d53d5eb193c6b3f012b31ca135fb4c diff --cc arch/arm/mach-exynos/Kconfig index 1602abce6ec0,0031a57aad94..d58995c9a95a --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@@ -108,14 -113,11 +113,19 @@@ config SOC_EXYNOS544 help Enable EXYNOS5440 SoC support + config SOC_EXYNOS5800 + bool "SAMSUNG EXYNOS5800" + default y + depends on SOC_EXYNOS5420 + endmenu +config EXYNOS5420_MCPM + bool "Exynos5420 Multi-Cluster PM support" + depends on MCPM && SOC_EXYNOS5420 + select ARM_CCI + help + This is needed to provide CPU and cluster power management + on Exynos5420 implementing big.LITTLE. + endif diff --cc arch/arm/mach-exynos/Makefile index 3705048f744a,24a8efe3d4bd..6f3608602bfa --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@@ -16,17 -18,11 +18,12 @@@ obj-$(CONFIG_ARCH_EXYNOS) += exynos.o p obj-$(CONFIG_PM_SLEEP) += pm.o sleep.o obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o -obj-$(CONFIG_CPU_IDLE) += cpuidle.o - obj-$(CONFIG_ARCH_EXYNOS) += pmu.o - obj-$(CONFIG_SMP) += platsmp.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o - obj-$(CONFIG_ARCH_EXYNOS) += exynos-smc.o - obj-$(CONFIG_ARCH_EXYNOS) += firmware.o - plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) + +obj-$(CONFIG_EXYNOS5420_MCPM) += mcpm-exynos.o diff --cc arch/arm/mach-exynos/common.h index 5848d3cc29e9,099b22f9fd9f..80b90e346ca0 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@@ -64,12 -158,8 +160,15 @@@ struct exynos_pmu_conf }; extern void exynos_sys_powerdown_conf(enum sys_powerdown mode); +extern void exynos_cpu_power_down(int cpu); +extern void exynos_cpu_power_up(int cpu); +extern int exynos_cpu_power_state(int cpu); +extern void exynos_cluster_power_down(int cluster); +extern void exynos_cluster_power_up(int cluster); +extern int exynos_cluster_power_state(int cluster); +extern void exynos_enter_aftr(void); + extern void s5p_init_cpu(void __iomem *cpuid_addr); + extern unsigned int samsung_rev(void); + #endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ diff --cc arch/arm/mach-exynos/firmware.c index 483dfcd69065,1120c28394dd..eb91d2350f8c --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@@ -35,12 -50,10 +50,15 @@@ static int exynos_cpu_boot(int cpu static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr) { - void __iomem *boot_reg = S5P_VA_SYSRAM_NS + 0x1c; + void __iomem *boot_reg; + + if (!sysram_ns_base_addr) + return -ENODEV; + - boot_reg = sysram_ns_base_addr + 0x1c + 4*cpu; ++ boot_reg = sysram_ns_base_addr + 0x1c; + + if (!soc_is_exynos4212() && !soc_is_exynos3250()) + boot_reg += 4*cpu; __raw_writel(boot_addr, boot_reg); return 0; diff --cc arch/arm/mach-exynos/platsmp.c index 9e5e230575dd,f5ec7e805298..ec02422e8499 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@@ -68,11 -43,9 +66,11 @@@ static inline void __iomem *cpu_boot_re void __iomem *boot_reg; boot_reg = cpu_boot_reg_base(); + if (!boot_reg) + return ERR_PTR(-ENODEV); if (soc_is_exynos4412()) boot_reg += 4*cpu; - else if (soc_is_exynos5420()) + else if (soc_is_exynos5420() || soc_is_exynos5800()) boot_reg += 4; return boot_reg; }