summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRanjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>2015-04-09 15:50:07 -0500
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:22:42 -0500
commit95c793ef5fff5a5f32344e6231de34c3b1c8acec (patch)
tree78daa385113238501d5db1089a244f6bf1ab925b /include
parentb1f0e1df20671295efcb5480952c60847f7e213f (diff)
MLK-10643 ARM:imx:Fix kernel build break when CPU_FREQ or CPU_IDLE is not defined.
Kernel build fails when CPU_FREQ or CPU_IDLE is disabled in the kernel config. This patch fixes the problem. When CPU_FREQ is disabled the system will run at the frequency setup by uboot. Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/busfreq-imx6.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/include/linux/busfreq-imx6.h b/include/linux/busfreq-imx6.h
index 46d9cba21049..85b8b3844dba 100644
--- a/include/linux/busfreq-imx6.h
+++ b/include/linux/busfreq-imx6.h
@@ -10,22 +10,62 @@
#define __ASM_ARCH_MXC_BUSFREQ_H__
#include <linux/notifier.h>
+
/*
- * This enumerates busfreq mode.
+ * This enumerates busfreq low power mode entry and exit.
*/
enum busfreq_event {
LOW_BUSFREQ_ENTER,
LOW_BUSFREQ_EXIT,
};
+/*
+ * This enumerates the system bus and ddr frequencies in various modes.
+ * BUS_FREQ_HIGH - DDR @ 528MHz, AHB @ 132MHz.
+ * BUS_FREQ_MED - DDR @ 400MHz, AHB @ 132MHz
+ * BUS_FREQ_AUDIO - DDR @ 50MHz/100MHz, AHB @ 24MHz.
+ * BUS_FREQ_LOW - DDR @ 24MHz, AHB @ 24MHz.
+ * BUS_FREQ_ULTRA_LOW - DDR @ 1MHz, AHB - 3MHz.
+ *
+ * Drivers need to request/release the bus/ddr frequencies based on their performance
+ * requirements. Drivers cannot request/release BUS_FREQ_ULTRA_LOW mode as
+ * this mode is automatically entered from either BUS_FREQ_AUDIO or BUS_FREQ_LOW
+ * modes.
+ */
enum bus_freq_mode {
BUS_FREQ_HIGH,
BUS_FREQ_MED,
BUS_FREQ_AUDIO,
BUS_FREQ_LOW,
+ BUS_FREQ_ULTRA_LOW,
};
+
+#ifdef CONFIG_CPU_FREQ
void request_bus_freq(enum bus_freq_mode mode);
void release_bus_freq(enum bus_freq_mode mode);
int register_busfreq_notifier(struct notifier_block *nb);
int unregister_busfreq_notifier(struct notifier_block *nb);
+int get_bus_freq_mode(void);
+#else
+static inline void request_bus_freq(enum bus_freq_mode mode)
+{
+ return;
+}
+static inline void release_bus_freq(enum bus_freq_mode mode)
+{
+ return;
+}
+static inline int register_busfreq_notifier(struct notifier_block *nb)
+{
+ return 0;
+}
+static inline int unregister_busfreq_notifier(struct notifier_block *nb)
+{
+ return 0;
+}
+static inline int get_bus_freq_mode(void)
+{
+ return BUS_FREQ_HIGH;
+}
+#endif
#endif