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: 85845 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2EHQ4jH002888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 14 Mar 2010 17:26:40 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NqrZj-0007JJ-6L; Sun, 14 Mar 2010 17:26:03 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NqrZi-0007JE-KE for spi-devel-general@lists.sourceforge.net; Sun, 14 Mar 2010 17:26:02 +0000 X-ACL-Warn: Received: from pan.gwi.net ([207.5.128.165]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NqrZh-0003bq-ER for spi-devel-general@lists.sourceforge.net; Sun, 14 Mar 2010 17:26:02 +0000 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) From: Scott Ellis To: spi-devel-general@lists.sourceforge.net 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 X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1NqrZh-0003bq-ER Cc: David Brownell , Tony Lindgren , Aaro Koskinen , Kevin Hilman , Andrew Morton , linux-omap@vger.kernel.org, Roman Tereshonkov Subject: [spi-devel-general] [PATCH 2/6 Revised] SPI omap2_mcspi: Add max_clk_div field to mcspi platform config X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net 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:26:41 +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 {