From patchwork Thu Jun 2 17:11:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 844332 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p52HCMbi017794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 2 Jun 2011 17:12:43 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QSBRG-0004rT-LJ; Thu, 02 Jun 2011 17:12:07 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QSBRE-0001YD-RU; Thu, 02 Jun 2011 17:12:04 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QSBQf-0001Rz-Mh for linux-arm-kernel@lists.infradead.org; Thu, 02 Jun 2011 17:11:31 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p52HBPx9013978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Jun 2011 12:11:27 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p52HBJJ7029635; Thu, 2 Jun 2011 22:41:21 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 8.3.106.1; Thu, 2 Jun 2011 22:41:21 +0530 Received: from psplinux051.india.ti.com (psplinux051.india.ti.com [172.24.162.244]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p52HBIj0005757; Thu, 2 Jun 2011 22:41:18 +0530 (IST) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by psplinux051.india.ti.com (8.13.1/8.13.1) with ESMTP id p52HBIjJ027281; Thu, 2 Jun 2011 22:41:18 +0530 Received: (from a0875516@localhost) by psplinux051.india.ti.com (8.13.1/8.13.1/Submit) id p52HBIVq027278; Thu, 2 Jun 2011 22:41:18 +0530 From: Sekhar Nori To: Subject: [PATCH v3 3/3] davinci: da850: move input frequency to board specific files Date: Thu, 2 Jun 2011 22:41:17 +0530 Message-ID: <1307034677-27236-3-git-send-email-nsekhar@ti.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: <1307034677-27236-2-git-send-email-nsekhar@ti.com> References: <1307034677-27236-1-git-send-email-nsekhar@ti.com> <1307034677-27236-2-git-send-email-nsekhar@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110602_131129_997439_78DF829E X-CRM114-Status: GOOD ( 13.99 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [198.47.26.153 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Sekhar Nori , Christian Riesch , Bob Dunlop , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 02 Jun 2011 17:12:43 +0000 (UTC) From: Bob Dunlop Currently the input frequency of the SoC is hardcoded in the SoC specific da850.c file to 24 MHz. Since the SoC accepts input frequencies in a wide range from 12 to 50 MHz, boards with different oscillator/crystal frequencies may be built. This patch allows setting a different input frequency in the board specific files to support boards with oscillator/crystal frequencies other than 24 MHz. Signed-off-by: Bob Dunlop Signed-off-by: Christian Riesch Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/board-da850-evm.c | 2 +- arch/arm/mach-davinci/board-mityomapl138.c | 2 +- arch/arm/mach-davinci/board-omapl138-hawk.c | 2 +- arch/arm/mach-davinci/da850.c | 5 ++++- arch/arm/mach-davinci/include/mach/da8xx.h | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index a7b41bf..231ff87 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -1252,7 +1252,7 @@ console_initcall(da850_evm_console_init); static void __init da850_evm_map_io(void) { - da850_init(); + da850_init(NULL); } MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM") diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 606a6f2..362770c 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -561,7 +561,7 @@ console_initcall(mityomapl138_console_init); static void __init mityomapl138_map_io(void) { - da850_init(); + da850_init(NULL); } MACHINE_START(MITYOMAPL138, "MityDSP-L138/MityARM-1808") diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 67c38d0..c43a6c3 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -334,7 +334,7 @@ console_initcall(omapl138_hawk_console_init); static void __init omapl138_hawk_map_io(void) { - da850_init(); + da850_init(NULL); } MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard") diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 133aac4..7f94d77 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -1104,10 +1104,13 @@ static struct davinci_soc_info davinci_soc_info_da850 = { .reset_device = &da8xx_wdt_device, }; -void __init da850_init(void) +void __init da850_init(struct davinci_board_info *board) { unsigned int v; + if (board && board->ref_clk_rate) + ref_clk.rate = board->ref_clk_rate; + davinci_common_init(&davinci_soc_info_da850); da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K); diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index ad64da7..90227ce 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -70,7 +71,7 @@ extern unsigned int da850_max_speed; #define DA8XX_ARM_RAM_BASE 0xffff0000 void __init da830_init(void); -void __init da850_init(void); +void __init da850_init(struct davinci_board_info *info); int da830_register_edma(struct edma_rsv_info *rsv); int da850_register_edma(struct edma_rsv_info *rsv[2]);