summaryrefslogtreecommitdiff
path: root/drivers/edgetpu/include/linux/acpm_dvfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edgetpu/include/linux/acpm_dvfs.h')
-rw-r--r--drivers/edgetpu/include/linux/acpm_dvfs.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/edgetpu/include/linux/acpm_dvfs.h b/drivers/edgetpu/include/linux/acpm_dvfs.h
new file mode 100644
index 0000000..6872abe
--- /dev/null
+++ b/drivers/edgetpu/include/linux/acpm_dvfs.h
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Fallback header for systems without Exynos ACPM support.
+ *
+ * Copyright (C) 2021 Google, Inc.
+ */
+
+#ifndef __ACPM_DVFS_H__
+#define __ACPM_DVFS_H__
+
+static inline int exynos_acpm_set_init_freq(unsigned int dfs_id, unsigned long freq)
+{
+ return 0;
+}
+
+static inline int exynos_acpm_set_policy(unsigned int id, unsigned long policy)
+{
+ return 0;
+}
+
+#if IS_ENABLED(CONFIG_EDGETPU_TEST)
+
+int exynos_acpm_set_rate(unsigned int id, unsigned long rate);
+unsigned long exynos_acpm_get_rate(unsigned int id, unsigned long dbg_val);
+
+#else /* IS_ENABLED(CONFIG_EDGETPU_TEST) */
+
+static inline int exynos_acpm_set_rate(unsigned int id, unsigned long rate)
+{
+ return 0;
+}
+
+static inline unsigned long exynos_acpm_get_rate(unsigned int id, unsigned long dbg_val)
+{
+ return 0;
+}
+
+#endif /* IS_ENABLED(CONFIG_EDGETPU_TEST) */
+
+#endif /* __ACPM_DVFS_H__ */