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-Tag: v4.9.8~5950^2~43^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45e70b7d48d53d5eb193c6b3f012b31ca135fb4c;p=platform%2Fkernel%2Flinux-rpi3.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 1602abc,0031a57..d58995c9 --- 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 3705048,24a8efe..6f36086 --- 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 5848d3c,099b22f..80b90e3 --- 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 483dfcd,1120c28..eb91d23 --- 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 9e5e230,f5ec7e80..ec02422 --- 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; }