From patchwork Sun Mar 14 17:25:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Ellis X-Patchwork-Id: 85844 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2EHPqqx002854 for ; Sun, 14 Mar 2010 17:25:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752064Ab0CNRZw (ORCPT ); Sun, 14 Mar 2010 13:25:52 -0400 Received: from pan.gwi.net ([207.5.128.165]:3887 "EHLO pan.gwi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751075Ab0CNRZv (ORCPT ); Sun, 14 Mar 2010 13:25:51 -0400 Received: from [192.168.10.4] (66-63-88-74.static.suscom-maine.net [66.63.88.74]) by pan.gwi.net (8.13.1/8.13.1) with ESMTP id o2EHPnCD002890; Sun, 14 Mar 2010 13:25:49 -0400 (EDT) (envelope-from scott@jumpnowtek.com) Subject: [PATCH 2/6 Revised] SPI omap2_mcspi: Add max_clk_div field to mcspi platform config From: Scott Ellis To: spi-devel-general@lists.sourceforge.net Cc: Tony Lindgren , David Brownell , Grant Likely , Andrew Morton , Roman Tereshonkov , linux-omap@vger.kernel.org, Aaro Koskinen , Kevin Hilman In-Reply-To: <20100312172148.GG2900@atomide.com> References: <1268407307.14445.51.camel@quad> <20100312172148.GG2900@atomide.com> Date: Sun, 14 Mar 2010 13:25:48 -0400 Message-ID: <1268587548.30878.11.camel@quad> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 14 Mar 2010 17:25:53 +0000 (UTC) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 23e4d77..200f382 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -415,6 +415,11 @@ static inline void omap4_mcspi_fixup(void) defined(CONFIG_ARCH_OMAP4) static inline void omap2_mcspi3_init(void) { + if (cpu_is_omap343x() || cpu_is_omap44xx()) + omap2_mcspi3_config.max_clk_div = 0x0c; + else + omap2_mcspi3_config.max_clk_div = 0x0f; + platform_device_register(&omap2_mcspi3); } #else @@ -426,6 +431,7 @@ static inline void omap2_mcspi3_init(void) #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) static inline void omap2_mcspi4_init(void) { + omap2_mcspi4_config.max_clk_div = 0x0c; platform_device_register(&omap2_mcspi4); } #else @@ -439,6 +445,14 @@ static void omap_init_mcspi(void) if (cpu_is_omap44xx()) omap4_mcspi_fixup(); + if (cpu_is_omap343x() || cpu_is_omap44xx()) { + omap2_mcspi1_config.max_clk_div = 0x0c; + omap2_mcspi2_config.max_clk_div = 0x0c; + } else { + omap2_mcspi1_config.max_clk_div = 0x0f; + omap2_mcspi2_config.max_clk_div = 0x0f; + } + platform_device_register(&omap2_mcspi1); platform_device_register(&omap2_mcspi2); diff --git a/arch/arm/plat-omap/include/plat/mcspi.h b/arch/arm/plat-omap/include/plat/mcspi.h index 1254e49..9fadddd 100644 --- a/arch/arm/plat-omap/include/plat/mcspi.h +++ b/arch/arm/plat-omap/include/plat/mcspi.h @@ -3,6 +3,7 @@ struct omap2_mcspi_platform_config { unsigned short num_cs; + unsigned short max_clk_div; }; struct omap2_mcspi_device_config {