linux-mips
[Top] [All Lists]

[PATCH -queue 2/3] MIPS: add basic options for CPUFreq support

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH -queue 2/3] MIPS: add basic options for CPUFreq support
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Wed, 11 Nov 2009 15:09:58 +0800
Cc: linux-mips@linux-mips.org, cpufreq@vger.kernel.org, Dave Jones <davej@redhat.com>, yanh@lemote.com, huhb@lemote.com, Wu Zhangjin <wuzhangjin@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:in-reply-to:references; bh=ExptP/rsoqSgkQIu5Fqal2K9LKwf7G1SDc3KhSO0e1E=; b=BQzoSRNA2Y2A9cSVNgQdOrRZRcgwdHw2ZNKJS7EAnPiSCLSf74B+XBckfhGInW/Cv4 ih0ssxCmktDJlkcNZrWobFWxSzKvjX/htHsjh8mGssg1/oAg+Tsa53YT33tLkctWmrEU uw0MlbwCgV1vE3tAVdunUvcVf9h2b7Q2b9esg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=f5o+rZjLfa3+O9AsQOtSoVhQnpb5pujDsE4ZWclKz+orjqlndfTL354RnN6PR+IlmS VkapsfxL8TEB8R2DZ/4zfy1y6pMxbdsRTqNfx3bkqjVjsjMdDaqcmq0BYRdr/S2jWEmr kRj0+3a8BF1h3UGAYUN78sNmTB7zvh1/cO+so=
In-reply-to: <de82733902e9549883b840f082a67b9edaa32c45.1257923011.git.wuzhangjin@gmail.com>
In-reply-to: <cover.1257923011.git.wuzhangjin@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <cover.1257923011.git.wuzhangjin@gmail.com> <de82733902e9549883b840f082a67b9edaa32c45.1257923011.git.wuzhangjin@gmail.com>
References: <cover.1257923011.git.wuzhangjin@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
This patch adds basic options for MIPS CPUFreq support.

Since MIPS Timer's frequency is relative to the processor's frequency,
So, MIPS CPUFreq support not only need the processor's CPUFreq support
but also need an external timer. otherwise, we will make the system time
"mussy".

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
 arch/mips/Kconfig                |    3 +++
 arch/mips/kernel/cpufreq/Kconfig |   27 +++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 arch/mips/kernel/cpufreq/Kconfig

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 2e39609..2228e5a 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2127,6 +2127,7 @@ config MMU
 
 config I8253
        bool
+       select MIPS_EXTERNAL_TIMER
 
 config ZONE_DMA32
        bool
@@ -2203,6 +2204,8 @@ source "kernel/power/Kconfig"
 
 endmenu
 
+source "arch/mips/kernel/cpufreq/Kconfig"
+
 source "net/Kconfig"
 
 source "drivers/Kconfig"
diff --git a/arch/mips/kernel/cpufreq/Kconfig b/arch/mips/kernel/cpufreq/Kconfig
new file mode 100644
index 0000000..3969661
--- /dev/null
+++ b/arch/mips/kernel/cpufreq/Kconfig
@@ -0,0 +1,27 @@
+#
+# CPU Frequency scaling
+#
+
+config MIPS_EXTERNAL_TIMER
+       bool
+
+config MIPS_CPUFREQ
+       bool
+       default y
+       depends on CPU_SUPPORT_CPUFREQ && MIPS_EXTERNAL_TIMER
+
+if MIPS_CPUFREQ
+
+menu "CPU Frequency scaling"
+
+source "drivers/cpufreq/Kconfig"
+
+if CPU_FREQ
+
+comment "CPUFreq processor drivers"
+
+endif  # CPU_FREQ
+
+endmenu
+
+endif  # MIPS_CPUFREQ
-- 
1.6.2.1


<Prev in Thread] Current Thread [Next in Thread>