soc: samsung: Split ASV drivers into ARM and ARM64 parts 44/202444/1 accepted/tizen/unified/20190330.030053 submit/tizen/20190329.020226
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 28 Mar 2019 11:07:49 +0000 (12:07 +0100)
committerSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 28 Mar 2019 11:12:50 +0000 (12:12 +0100)
This fixes build error with tizen_odroid_defconfig related to missing
MTD symbols required by exynos5433-asv.c driver.

The Exynos5433 ASV driver has dependency on MTD, to avoid inheriting this
dependency by the Exynos5422 ASV driver split Exynos ASV drivers into ARM
and ARM64 parts, similarly as it is done for the PMU.
This also has an advantage that we don't need to include ARM ASV drivers on
ARM64 SoCs and we can build only ARM ASV drivers for ARM SoCs.

Change-Id: I3d647b784f936dcb535632e4ee15a7d571d7a131
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/soc/samsung/Kconfig
drivers/soc/samsung/Makefile
drivers/soc/samsung/exynos5422-asv.h
drivers/soc/samsung/exynos5433-asv.h

index ae4dc02..63fb645 100644 (file)
@@ -8,8 +8,20 @@ if SOC_SAMSUNG
 
 config EXYNOS_ASV
        bool "Exynos Adaptive Supply Voltage support" if COMPILE_TEST
-       depends on ARCH_EXYNOS || COMPILE_TEST
+       depends on ARCH_EXYNOS || ((ARM || ARM64) && COMPILE_TEST)
        depends on EXYNOS_CHIPID
+       select EXYNOS_ASV_ARM if ARM && ARCH_EXYNOS
+       select EXYNOS_ASV_ARM64 if ARM64 && ARCH_EXYNOS && MTD
+
+# There is no need to enable these drivers for ARMv8
+config EXYNOS_ASV_ARM
+       bool "Exynos ASV ARMv7-specific driver extensions" if COMPILE_TEST
+       depends on EXYNOS_ASV
+
+# There is no need to enable these drivers for ARMv7
+config EXYNOS_ASV_ARM64
+       bool "Exynos ASV ARMv8-specific driver extensions" if COMPILE_TEST
+       depends on EXYNOS_ASV
 
 config EXYNOS_CHIPID
        bool "Exynos Chipid controller driver" if COMPILE_TEST
index 0b50e0e..51927cf 100644 (file)
@@ -1,9 +1,10 @@
-obj-$(CONFIG_EXYNOS_CHIPID)    += exynos-chipid.o
-obj-$(CONFIG_EXYNOS_PMU)       += exynos-pmu.o exynos-sysram.o
+obj-$(CONFIG_EXYNOS_ASV)       += exynos-asv.o
+obj-$(CONFIG_EXYNOS_ASV_ARM)   += exynos5422-asv.o
+obj-$(CONFIG_EXYNOS_ASV_ARM64) += exynos5433-asv.o
 
-obj-$(CONFIG_EXYNOS_ASV)       += exynos-asv.o exynos5422-asv.o \
-                                       exynos5433-asv.o
+obj-$(CONFIG_EXYNOS_CHIPID)    += exynos-chipid.o
 
+obj-$(CONFIG_EXYNOS_PMU)       += exynos-pmu.o exynos-sysram.o
 obj-$(CONFIG_EXYNOS_PMU_ARM_DRIVERS)   += exynos3250-pmu.o exynos4-pmu.o \
                                        exynos5250-pmu.o exynos5420-pmu.o
 obj-$(CONFIG_EXYNOS_PMU_ARM64_DRIVERS) += exynos-pm.o exynos5433-pmu.o
index 9d994c5..b6d81b2 100644 (file)
@@ -9,7 +9,17 @@
 #ifndef __EXYNOS5422_ASV_H
 #define __EXYNOS5422_ASV_H
 
+#include <linux/errno.h>
+
 struct exynos_asv;
+
+#ifdef CONFIG_EXYNOS_ASV_ARM
 int exynos5422_asv_init(struct exynos_asv *asv);
+#else
+static inline int exynos5422_asv_init(struct exynos_asv *asv)
+{
+       return -ENOTSUPP;
+}
+#endif
 
 #endif /* __EXYNOS5422_ASV_H */
index e7df107..6e18405 100644 (file)
 #ifndef EXYNOS5433_ASV_H__
 #define EXYNOS5433_ASV_H__
 
+#include <linux/errno.h>
+
 struct exynos_asv;
 
+#ifdef CONFIG_EXYNOS_ASV_ARM64
 int exynos5433_asv_init(struct exynos_asv *asv);
+#else
+static inline int exynos5433_asv_init(struct exynos_asv *asv)
+{
+       return -ENOTSUPP;
+}
+#endif
 
 enum sysc_dvfs_level {
        SYSC_DVFS_L0 = 0,