MIPS: Loongson 2F: Add CPU frequency scaling support
Loongson 2F supports CPU clock scaling. When put it into wait mode by
setting the frequency as ZERO it will stay in this mode until an external
interrupt wakes the CPU again.
To enable clock scaling support, an external timer of a known stable rate
is required.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: cpufreq@vger.kernel.org,
Cc: Dave Jones <davej@redhat.com>,
Cc: Dominik Brodowski <linux@dominikbrodowski.net>,
Cc: yanh@lemote.com
Cc: huhb@lemote.com,
Patchwork: http://patchwork.linux-mips.org/patch/660/
Patchwork: http://patchwork.linux-mips.org/patch/751/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
index 8b5cc13..7a86987 100644
--- a/arch/mips/loongson/Kconfig
+++ b/arch/mips/loongson/Kconfig
@@ -34,10 +34,10 @@
select ARCH_SPARSEMEM_ENABLE
select BOARD_SCACHE
select BOOT_ELF32
- select CEVT_R4K
+ select CEVT_R4K if ! MIPS_EXTERNAL_TIMER
select CPU_HAS_WB
select CS5536
- select CSRC_R4K
+ select CSRC_R4K if ! MIPS_EXTERNAL_TIMER
select DMA_NONCOHERENT
select GENERIC_HARDIRQS_NO__DO_IRQ
select GENERIC_ISA_DMA_SUPPORT_BROKEN
@@ -65,6 +65,7 @@
config CS5536_MFGPT
bool "CS5536 MFGPT Timer"
depends on CS5536
+ select MIPS_EXTERNAL_TIMER
help
This option enables the mfgpt0 timer of AMD CS5536.