linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/11] sh: Make peripheral clock frequency setting mandatory.
Date: Sat, 28 Jan 2006 00:50:53 +0200	[thread overview]
Message-ID: <20060127225053.GC30816@linux-sh.org> (raw)
In-Reply-To: <20060127224919.GA30816@linux-sh.org>

Pretty much every subtype does this now anyways, and as we depend
on it in a few places being set to something sensible quite early
on, it's better for a new subtype to simply set a sensible default.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

---

 arch/sh/Kconfig            |    6 ------
 arch/sh/kernel/cpu/clock.c |   13 +------------
 2 files changed, 1 insertions(+), 18 deletions(-)

e3efa1355438864fd56f850604722dc62d2aaa1b
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 01bc7d5..504d56f 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -396,14 +396,8 @@ source "arch/sh/boards/renesas/hs7751rvo
 
 source "arch/sh/boards/renesas/rts7751r2d/Kconfig"
 
-config SH_PCLK_FREQ_BOOL
-	bool "Set default pclk frequency"
-	default y if !SH_RTC
-	default n
-
 config SH_PCLK_FREQ
 	int "Peripheral clock frequency (in Hz)"
-	depends on SH_PCLK_FREQ_BOOL
 	default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780
 	default "60000000" if CPU_SUBTYPE_SH7751
 	default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || CPU_SUBTYPE_SH7760
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index 989e7fd..97fa37f 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -38,9 +38,7 @@ static DECLARE_MUTEX(clock_list_sem);
 static struct clk master_clk = {
 	.name		= "master_clk",
 	.flags		= CLK_ALWAYS_ENABLED | CLK_RATE_PROPAGATES,
-#ifdef CONFIG_SH_PCLK_FREQ_BOOL
 	.rate		= CONFIG_SH_PCLK_FREQ,
-#endif
 };
 
 static struct clk module_clk = {
@@ -227,16 +225,7 @@ int __init clk_init(void)
 {
 	int i, ret = 0;
 
-	if (unlikely(!master_clk.rate))
-		/*
-		 * NOTE: This will break if the default divisor has been
-		 * changed.
-		 *
-		 * No one should be changing the default on us however,
-		 * expect that a sane value for CONFIG_SH_PCLK_FREQ will
-		 * be defined in the event of a different divisor.
-		 */
-		master_clk.rate = get_timer_frequency() * 4;
+	BUG_ON(unlikely(!master_clk.rate));
 
 	for (i = 0; i < ARRAY_SIZE(onchip_clocks); i++) {
 		struct clk *clk = onchip_clocks[i];

  parent reply	other threads:[~2006-01-27 22:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-27 22:49 [PATCH 0/11] sh cleanups Paul Mundt
2006-01-27 22:50 ` [PATCH 1/11] sh: SH4-202 microdev updates Paul Mundt
2006-01-27 22:50 ` Paul Mundt [this message]
2006-01-28  0:38   ` [PATCH 2/11] sh: Make peripheral clock frequency setting mandatory Andrew Morton
2006-01-27 22:51 ` [PATCH 3/11] sh: Move TRA/EXPEVT/INTEVT definitions for reuse Paul Mundt
2006-01-27 22:51 ` [PATCH 4/11] sh: Cleanup struct sh_cpuinfo for clock framework changes Paul Mundt
2006-01-27 22:51 ` [PATCH 5/11] sh: unknown mach-type updates Paul Mundt
2006-01-27 22:52 ` [PATCH 6/11] sh: drop maskpos from make_ipr_irq(), remove duplicate irq definitions Paul Mundt
2006-01-27 22:52 ` [PATCH 7/11] sh: convert voyagergx to platform device, drop sh-bus Paul Mundt
2006-01-27 22:53 ` [PATCH 8/11] sh: sh-sci clock framework updates Paul Mundt
2006-01-27 22:53 ` [PATCH 9/11] sh: Add missing timers directory rule to build Paul Mundt
2006-01-27 22:53 ` [PATCH 10/11] sh: machine_halt()/machine_power_off() cleanups Paul Mundt
2006-01-27 22:54 ` [PATCH 11/11] sh/sh64: Fix bogus TIOCGICOUNT definitions Paul Mundt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060127225053.GC30816@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).