diff options
author | Olof Johansson | 2017-04-19 08:58:33 -0500 |
---|---|---|
committer | Olof Johansson | 2017-04-19 08:58:33 -0500 |
commit | d12523f14ed615d093053cbfc46e3b257b1b9810 (patch) | |
tree | 466dc5955354a64a83e7b196d86c15bc1d2ed728 /drivers | |
parent | 32d8b52b900c88dfe8d83e38c73eba3dcf00e901 (diff) | |
parent | a0ebf66267ebab093cd7e230e70d29249768d249 (diff) | |
download | kernel-d12523f14ed615d093053cbfc46e3b257b1b9810.tar.gz kernel-d12523f14ed615d093053cbfc46e3b257b1b9810.tar.xz kernel-d12523f14ed615d093053cbfc46e3b257b1b9810.zip |
Merge tag 'samsung-drivers-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers
Samsung SoC drivers update for v4.12 - split building of the PMU driver between
ARMv7 and ARMv8.
* tag 'samsung-drivers-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
soc: samsung: Do not build ARMv7 PMU drivers on ARMv8
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/soc/samsung/Kconfig | 8 | ||||
-rw-r--r-- | drivers/soc/samsung/Makefile | 4 | ||||
-rw-r--r-- | drivers/soc/samsung/exynos-pmu.c | 22 | ||||
-rw-r--r-- | drivers/soc/samsung/exynos-pmu.h | 3 |
4 files changed, 29 insertions, 8 deletions
diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig index 245533907d1b..8b25bd55e648 100644 --- a/drivers/soc/samsung/Kconfig +++ b/drivers/soc/samsung/Kconfig | |||
@@ -8,7 +8,13 @@ if SOC_SAMSUNG | |||
8 | 8 | ||
9 | config EXYNOS_PMU | 9 | config EXYNOS_PMU |
10 | bool "Exynos PMU controller driver" if COMPILE_TEST | 10 | bool "Exynos PMU controller driver" if COMPILE_TEST |
11 | depends on (ARM && ARCH_EXYNOS) || ((ARM || ARM64) && COMPILE_TEST) | 11 | depends on ARCH_EXYNOS || ((ARM || ARM64) && COMPILE_TEST) |
12 | select EXYNOS_PMU_ARM_DRIVERS if ARM && ARCH_EXYNOS | ||
13 | |||
14 | # There is no need to enable these drivers for ARMv8 | ||
15 | config EXYNOS_PMU_ARM_DRIVERS | ||
16 | bool "Exynos PMU ARMv7-specific driver extensions" if COMPILE_TEST | ||
17 | depends on EXYNOS_PMU | ||
12 | 18 | ||
13 | config EXYNOS_PM_DOMAINS | 19 | config EXYNOS_PM_DOMAINS |
14 | bool "Exynos PM domains" if COMPILE_TEST | 20 | bool "Exynos PM domains" if COMPILE_TEST |
diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile index 3619f2ecddaa..4d7694a4e7a4 100644 --- a/drivers/soc/samsung/Makefile +++ b/drivers/soc/samsung/Makefile | |||
@@ -1,3 +1,5 @@ | |||
1 | obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o exynos3250-pmu.o exynos4-pmu.o \ | 1 | obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o |
2 | |||
3 | obj-$(CONFIG_EXYNOS_PMU_ARM_DRIVERS) += exynos3250-pmu.o exynos4-pmu.o \ | ||
2 | exynos5250-pmu.o exynos5420-pmu.o | 4 | exynos5250-pmu.o exynos5420-pmu.o |
3 | obj-$(CONFIG_EXYNOS_PM_DOMAINS) += pm_domains.o | 5 | obj-$(CONFIG_EXYNOS_PM_DOMAINS) += pm_domains.o |
diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 56d9244ff981..bd4a76f27bc2 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c | |||
@@ -69,27 +69,37 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * Split the data between ARM architectures because it is relatively big | ||
73 | * and useless on other arch. | ||
74 | */ | ||
75 | #ifdef CONFIG_EXYNOS_PMU_ARM_DRIVERS | ||
76 | #define exynos_pmu_data_arm_ptr(data) (&data) | ||
77 | #else | ||
78 | #define exynos_pmu_data_arm_ptr(data) NULL | ||
79 | #endif | ||
80 | |||
81 | /* | ||
72 | * PMU platform driver and devicetree bindings. | 82 | * PMU platform driver and devicetree bindings. |
73 | */ | 83 | */ |
74 | static const struct of_device_id exynos_pmu_of_device_ids[] = { | 84 | static const struct of_device_id exynos_pmu_of_device_ids[] = { |
75 | { | 85 | { |
76 | .compatible = "samsung,exynos3250-pmu", | 86 | .compatible = "samsung,exynos3250-pmu", |
77 | .data = &exynos3250_pmu_data, | 87 | .data = exynos_pmu_data_arm_ptr(exynos3250_pmu_data), |
78 | }, { | 88 | }, { |
79 | .compatible = "samsung,exynos4210-pmu", | 89 | .compatible = "samsung,exynos4210-pmu", |
80 | .data = &exynos4210_pmu_data, | 90 | .data = exynos_pmu_data_arm_ptr(exynos4210_pmu_data), |
81 | }, { | 91 | }, { |
82 | .compatible = "samsung,exynos4212-pmu", | 92 | .compatible = "samsung,exynos4212-pmu", |
83 | .data = &exynos4212_pmu_data, | 93 | .data = exynos_pmu_data_arm_ptr(exynos4212_pmu_data), |
84 | }, { | 94 | }, { |
85 | .compatible = "samsung,exynos4412-pmu", | 95 | .compatible = "samsung,exynos4412-pmu", |
86 | .data = &exynos4412_pmu_data, | 96 | .data = exynos_pmu_data_arm_ptr(exynos4412_pmu_data), |
87 | }, { | 97 | }, { |
88 | .compatible = "samsung,exynos5250-pmu", | 98 | .compatible = "samsung,exynos5250-pmu", |
89 | .data = &exynos5250_pmu_data, | 99 | .data = exynos_pmu_data_arm_ptr(exynos5250_pmu_data), |
90 | }, { | 100 | }, { |
91 | .compatible = "samsung,exynos5420-pmu", | 101 | .compatible = "samsung,exynos5420-pmu", |
92 | .data = &exynos5420_pmu_data, | 102 | .data = exynos_pmu_data_arm_ptr(exynos5420_pmu_data), |
93 | }, { | 103 | }, { |
94 | .compatible = "samsung,exynos5433-pmu", | 104 | .compatible = "samsung,exynos5433-pmu", |
95 | }, | 105 | }, |
diff --git a/drivers/soc/samsung/exynos-pmu.h b/drivers/soc/samsung/exynos-pmu.h index a469e366fead..40d4229abfb5 100644 --- a/drivers/soc/samsung/exynos-pmu.h +++ b/drivers/soc/samsung/exynos-pmu.h | |||
@@ -31,6 +31,8 @@ struct exynos_pmu_data { | |||
31 | }; | 31 | }; |
32 | 32 | ||
33 | extern void __iomem *pmu_base_addr; | 33 | extern void __iomem *pmu_base_addr; |
34 | |||
35 | #ifdef CONFIG_EXYNOS_PMU_ARM_DRIVERS | ||
34 | /* list of all exported SoC specific data */ | 36 | /* list of all exported SoC specific data */ |
35 | extern const struct exynos_pmu_data exynos3250_pmu_data; | 37 | extern const struct exynos_pmu_data exynos3250_pmu_data; |
36 | extern const struct exynos_pmu_data exynos4210_pmu_data; | 38 | extern const struct exynos_pmu_data exynos4210_pmu_data; |
@@ -38,6 +40,7 @@ extern const struct exynos_pmu_data exynos4212_pmu_data; | |||
38 | extern const struct exynos_pmu_data exynos4412_pmu_data; | 40 | extern const struct exynos_pmu_data exynos4412_pmu_data; |
39 | extern const struct exynos_pmu_data exynos5250_pmu_data; | 41 | extern const struct exynos_pmu_data exynos5250_pmu_data; |
40 | extern const struct exynos_pmu_data exynos5420_pmu_data; | 42 | extern const struct exynos_pmu_data exynos5420_pmu_data; |
43 | #endif | ||
41 | 44 | ||
42 | extern void pmu_raw_writel(u32 val, u32 offset); | 45 | extern void pmu_raw_writel(u32 val, u32 offset); |
43 | extern u32 pmu_raw_readl(u32 offset); | 46 | extern u32 pmu_raw_readl(u32 offset); |