diff options
author | Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com> | 2015-04-09 15:50:07 -0500 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2015-05-08 16:35:10 +0800 |
commit | 1aec93deffde305b4c193e597020bfa6e2e387b6 (patch) | |
tree | c352f92ef3a1d46b6ee78441190ad9209adf12c4 /include | |
parent | 4fa1d0f9b597296a892eb40f3427c5aab6af5bbc (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.h | 42 |
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 |