From patchwork Thu May 7 10:50:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 22304 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 n47ArjfD032242 for ; Thu, 7 May 2009 10:53:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752667AbZEGKxn (ORCPT ); Thu, 7 May 2009 06:53:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753935AbZEGKxn (ORCPT ); Thu, 7 May 2009 06:53:43 -0400 Received: from wa-out-1112.google.com ([209.85.146.181]:46996 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667AbZEGKxn (ORCPT ); Thu, 7 May 2009 06:53:43 -0400 Received: by wa-out-1112.google.com with SMTP id j5so403948wah.21 for ; Thu, 07 May 2009 03:53:43 -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=bNllosVrperNWimdABGrAQoCvEI/87ixAleaaYG9Rro=; b=DgJ16VYDcIPj7MIBNN5AgHOcaJUAGcWLqqLT3DHSe1kPerLpGI/zQCJm81pxHH+0GM GEJT31pXNae/tf/RQAHVFUFawIcidnzhuO86d7UyazLJWQxGYFyEBy6fN32OJVWqUBX5 X6xAgdCLk8BN1uUarJGgrNj/HH+DgaiVO+Yis= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=d5H5fv67CNYttuiye1rLF8QokTU3Hual2tHK6MQG5wSjR9+zctjlEycFae/tt5hpXp IfXfRAcmLMQDtIr0+Ep1p9wypvlk4jDfjwRCddCvX23R3ae5/0HwcwD0Zvdkc0SXD4P1 q9i9SWWckLNFNNMUbFgUtjcZ3xXoPz3gY7En4= Received: by 10.114.73.6 with SMTP id v6mr2176746waa.48.1241693623363; Thu, 07 May 2009 03:53:43 -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 n40sm14622120wag.33.2009.05.07.03.53.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 07 May 2009 03:53:42 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Thu, 07 May 2009 19:50:56 +0900 Message-Id: <20090507105056.32013.9929.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: add mode4 pin support to sh7785 clock code Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm Use early_param() to select mode4 configuration for the sh7785 clock code. Without this patch there is no board configuration code that selects PLL multiplier (36x/72x) for sh7785. The board code must make sure that mode4 is setup according to the hardware configuration. Signed-off-by: Magnus Damm --- arch/sh/kernel/cpu/sh4a/clock-sh7785.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) -- 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/kernel/cpu/sh4a/clock-sh7785.c +++ work/arch/sh/kernel/cpu/sh4a/clock-sh7785.c 2009-05-07 16:28:24.000000000 +0900 @@ -15,6 +15,22 @@ #include #include +static int mode4_pin; + +static int __init setup_mode4_pin(char *buf) +{ + if (buf) { + if (strstr(buf, "high")) + mode4_pin = 1; + + if (strstr(buf, "low")) + mode4_pin = 0; + } + + return 0; +} +early_param("mode4_pin", setup_mode4_pin); + static int ifc_divisors[] = { 1, 2, 4, 6 }; static int ufc_divisors[] = { 1, 1, 4, 6 }; static int sfc_divisors[] = { 1, 1, 4, 6 }; @@ -26,7 +42,7 @@ static int pfc_divisors[] = { 1, 1, 1, 1 static void master_clk_init(struct clk *clk) { - clk->rate *= pfc_divisors[ctrl_inl(FRQMR1) & 0x000f]; + clk->rate *= mode4_pin ? 36 : 72; } static struct clk_ops sh7785_master_clk_ops = {