From patchwork Thu May 21 06:29:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 25184 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4L6WwnC010712 for ; Thu, 21 May 2009 06:32:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbZEUGcz (ORCPT ); Thu, 21 May 2009 02:32:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751195AbZEUGcz (ORCPT ); Thu, 21 May 2009 02:32:55 -0400 Received: from wf-out-1314.google.com ([209.85.200.170]:32834 "EHLO wf-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751190AbZEUGcz (ORCPT ); Thu, 21 May 2009 02:32:55 -0400 Received: by wf-out-1314.google.com with SMTP id 26so301974wfd.4 for ; Wed, 20 May 2009 23:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=HI1YKUaE5aj7kUbHONGjw11tnB21ZYhcoY6uwXwPgXA=; b=j4oDilsBj4NEC2iHK+KN6DMQWkpXVUvalzd5+WtlZ0BT0TF8W10tHSm18o/6+YVWw4 SPNFTGOZ3tppnxwqApNJ2gnjT9pmgY3z7cu86spgCl3zt4qIWYZYi5vSCQzgFLwFLJjP +vo8Ffe6eCWGjo7zYYg8C09L45e7PaCeTWjOg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=MFZtjg35t5LzITWu2Pgz9QKHPUfR14TPzFSYJIcDpR6J1u4e7YaJfVs6L1Bn5SXnpD 9sNN3miUxlz57eZpoAsKEsrGti1GE6+c1Lv87EyGkiP7haIfc7djRLSd0Iu7+cQ9UnSi ZGTqaQQtyQp+WoTWB9DVfVNASfRcMwuWxxk6M= Received: by 10.143.42.7 with SMTP id u7mr874457wfj.288.1242887576570; Wed, 20 May 2009 23:32:56 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id 28sm485903wfd.23.2009.05.20.23.32.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 20 May 2009 23:32:55 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Thu, 21 May 2009 15:29:58 +0900 Message-Id: <20090521062958.31416.44670.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: CONFIG_SH_CLK_DISABLE_LEGACY V2 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm 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 --- 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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 #include +#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 */