From: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
To: Scott Ellis <scott-oZqG5KApg2M/jFmSBShxMA@public.gmane.org>
Cc: David Brownell
<dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Kevin Hilman
<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>,
Aaro Koskinen
<Aaro.Koskinen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Roman Tereshonkov
<roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
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 [thread overview]
Message-ID: <20100315163246.GT2900@atomide.com> (raw)
In-Reply-To: <1268587548.30878.11.camel@quad>
* Scott Ellis <scott-oZqG5KApg2M/jFmSBShxMA@public.gmane.org> [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 <scott-oZqG5KApg2M/jFmSBShxMA@public.gmane.org>
>
> 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
next prev parent reply other threads:[~2010-03-15 16:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 15:21 [PATCH 2/6] SPI omap2_mcspi: Add max_clk_div field to mcspi platform config Scott Ellis
2010-03-12 17:21 ` Tony Lindgren
2010-03-14 17:25 ` [PATCH 2/6 Revised] " Scott Ellis
2010-03-15 16:32 ` Tony Lindgren [this message]
2010-03-15 18:03 ` Felipe Balbi
2010-03-15 18:52 ` Tony Lindgren
2010-03-15 19:16 ` Felipe Balbi
2010-03-15 19:29 ` Tony Lindgren
2010-03-15 19:31 ` Felipe Balbi
2010-03-15 20:06 ` Tony Lindgren
2010-03-15 20:30 ` Scott Ellis
2010-03-15 21:02 ` Tony Lindgren
2010-03-19 19:46 ` Scott Ellis
2010-03-19 20:38 ` Tony Lindgren
2010-05-24 14:26 ` Scott Ellis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100315163246.GT2900@atomide.com \
--to=tony-4v6ys6ai5vpbdgjk7y7tuq@public.gmane.org \
--cc=Aaro.Koskinen-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
--cc=scott-oZqG5KApg2M/jFmSBShxMA@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).