From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 2/6 Revised] SPI omap2_mcspi: Add max_clk_div field to mcspi platform config Date: Mon, 15 Mar 2010 09:32:46 -0700 Message-ID: <20100315163246.GT2900@atomide.com> References: <1268407307.14445.51.camel@quad> <20100312172148.GG2900@atomide.com> <1268587548.30878.11.camel@quad> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: David Brownell , Kevin Hilman , Aaro Koskinen , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Andrew Morton , linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roman Tereshonkov To: Scott Ellis Return-path: Content-Disposition: inline In-Reply-To: <1268587548.30878.11.camel@quad> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org * Scott Ellis [100314 10:22]: > The McSPI_CHxCONF.CLKD register field has different limits for > the OMAP3 then the OMAP24xx. New max_clk_div field added to > mcspi platform config structure to keep track of this. > > Revised patch to not break multi-omap booting. > > Signed-off-by: Scott Ellis > > arch/arm/mach-omap2/devices.c | 14 ++++++++++++++ > arch/arm/plat-omap/include/plat/mcspi.h | 1 + > 2 files changed, 15 insertions(+), 0 deletions(-) > > 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 Hmm now it looks like you're missing 3630 handling? If the max_clk_div is 0x0f for 2420 and 2430, then you can just check for cpu_is_omap24xx(). If it's only different for 2420, then you can check for cpu_is_omap2420(). That way it should be more future proof, and you don't need to change it for new processors. Regards, Tony ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev