public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: CONFIG_SH_CLK_DISABLE_LEGACY V2
Date: Thu, 21 May 2009 06:29:58 +0000	[thread overview]
Message-ID: <20090521062958.31416.44670.sendpatchset@rx1.opensource.se> (raw)
In-Reply-To: <20090520135502.7742.12748.sendpatchset@rx1.opensource.se>

From: Magnus Damm <damm@igel.co.jp>

Invert legacy kconfig logic in clkfwk branch V2. Instead
of building clock-cpg.c if CONFIG_SH_CLK_CPG_LEGACY is set,
let CONFIG_SH_CLK_DISABLE_LEGACY be no by default and let
upgraded processors use select to disable the legacy code.
Always build clock-cpg.c but wrap legacy code in ifdefs to
only build if CONFIG_SH_CLK_DISABLE_LEGACY is set to no.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 arch/sh/Kconfig                |    5 +++--
 arch/sh/kernel/cpu/Makefile    |    3 +--
 arch/sh/kernel/cpu/clock-cpg.c |    4 ++++
 3 files changed, 8 insertions(+), 4 deletions(-)

--- 0001/arch/sh/Kconfig
+++ work/arch/sh/Kconfig	2009-05-21 14:52:36.000000000 +0900
@@ -398,6 +398,7 @@ config CPU_SUBTYPE_SH7785
 	select CPU_SHX2
 	select ARCH_SPARSEMEM_ENABLE
 	select SYS_SUPPORTS_NUMA
+	select SH_CLK_DISABLE_LEGACY
 
 config CPU_SUBTYPE_SH7786
 	bool "Support SH7786 processor"
@@ -513,8 +514,8 @@ config SH_PCLK_FREQ
 	  This is necessary for determining the reference clock value on
 	  platforms lacking an RTC.
 
-config SH_CLK_CPG_LEGACY
-	def_bool y if !CPU_SUBTYPE_SH7785
+config SH_CLK_DISABLE_LEGACY
+	def_bool n
 
 config SH_CLK_MD
 	int "CPU Mode Pin Setting"
--- 0001/arch/sh/kernel/cpu/Makefile
+++ work/arch/sh/kernel/cpu/Makefile	2009-05-21 14:53:19.000000000 +0900
@@ -17,6 +17,5 @@ obj-$(CONFIG_ARCH_SHMOBILE)	+= shmobile/
 
 obj-$(CONFIG_UBC_WAKEUP)	+= ubc.o
 obj-$(CONFIG_SH_ADC)		+= adc.o
-obj-$(CONFIG_SH_CLK_CPG_LEGACY)	+= clock-cpg.o
 
-obj-y	+= irq/ init.o clock.o
+obj-y	+= irq/ init.o clock.o clock-cpg.o
--- 0001/arch/sh/kernel/cpu/clock-cpg.c
+++ work/arch/sh/kernel/cpu/clock-cpg.c	2009-05-21 14:55:08.000000000 +0900
@@ -2,6 +2,8 @@
 #include <linux/compiler.h>
 #include <asm/clock.h>
 
+#ifndef CONFIG_SH_CLK_DISABLE_LEGACY
+
 static struct clk master_clk = {
 	.name		= "master_clk",
 	.flags		= CLK_ENABLE_ON_INIT,
@@ -58,3 +60,5 @@ int __init __weak arch_clk_init(void)
 {
 	return cpg_clk_init();
 }
+
+#endif /* CONFIG_SH_CLK_DISABLE_LEGACY */

  reply	other threads:[~2009-05-21  6:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20 13:55 [PATCH] sh: CONFIG_SH_CLK_DISABLE_LEGACY Magnus Damm
2009-05-21  6:29 ` Magnus Damm [this message]
2009-05-21 17:52 ` [PATCH] sh: CONFIG_SH_CLK_DISABLE_LEGACY V2 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=20090521062958.31416.44670.sendpatchset@rx1.opensource.se \
    --to=magnus.damm@gmail.com \
    --cc=linux-sh@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