summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/soc/samsung/Kconfig14
-rw-r--r--drivers/soc/samsung/Makefile9
-rw-r--r--drivers/soc/samsung/exynos5422-asv.h10
-rw-r--r--drivers/soc/samsung/exynos5433-asv.h9
4 files changed, 37 insertions, 5 deletions
diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig
index ae4dc02d84a5..63fb6456db38 100644
--- a/drivers/soc/samsung/Kconfig
+++ b/drivers/soc/samsung/Kconfig
@@ -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
diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile
index 0b50e0ef7d62..51927cfb2019 100644
--- a/drivers/soc/samsung/Makefile
+++ b/drivers/soc/samsung/Makefile
@@ -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
diff --git a/drivers/soc/samsung/exynos5422-asv.h b/drivers/soc/samsung/exynos5422-asv.h
index 9d994c5d0de4..b6d81b29d01d 100644
--- a/drivers/soc/samsung/exynos5422-asv.h
+++ b/drivers/soc/samsung/exynos5422-asv.h
@@ -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 */
diff --git a/drivers/soc/samsung/exynos5433-asv.h b/drivers/soc/samsung/exynos5433-asv.h
index e7df107dc48d..6e1840597366 100644
--- a/drivers/soc/samsung/exynos5433-asv.h
+++ b/drivers/soc/samsung/exynos5433-asv.h
@@ -13,9 +13,18 @@
#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,