mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 3/9] ARM: clps711x: Adds config option for CPU PLL multiplier
Date: Wed, 13 Feb 2013 18:40:51 +0100	[thread overview]
Message-ID: <20130213174051.GH1906@pengutronix.de> (raw)
In-Reply-To: <1360776009.524936687@f310.mail.ru>

On Wed, Feb 13, 2013 at 09:20:09PM +0400, Alexander Shiyan wrote:
> > > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > > ---
> > >  arch/arm/boards/clep7212/lowlevel.c            |    6 +++++-
> > >  arch/arm/mach-clps711x/Kconfig                 |   13 +++++++++++++
> > >  arch/arm/mach-clps711x/include/mach/clps711x.h |    2 +-
> > >  arch/arm/mach-clps711x/lowlevel.c              |    7 +++++--
> > >  4 files changed, 24 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/arch/arm/boards/clep7212/lowlevel.c b/arch/arm/boards/clep7212/lowlevel.c
> > > index b7d6d1d..fcf8285 100644
> > > --- a/arch/arm/boards/clep7212/lowlevel.c
> > > +++ b/arch/arm/boards/clep7212/lowlevel.c
> > > @@ -14,9 +14,13 @@
> > >  
> > >  #include <mach/clps711x.h>
> > >  
> > > +#if (CONFIG_CLPS711X_CPU_PLL_MULT < 20) || (CONFIG_CLPS711X_CPU_PLL_MULT > 50)
> > > +# error "CPU PLL multiplier out of range"
> > > +#endif
> > > +
> > >  void __naked __bare_init barebox_arm_reset_vector(void)
> > >  {
> > >  	arm_cpu_lowlevel_init();
> > >  
> > > -	clps711x_barebox_entry();
> > > +	clps711x_barebox_entry(CONFIG_CLPS711X_CPU_PLL_MULT);
> > 
> > I don't quite understand why you want to have this configurable. I mean
> > this is a single board only, why not simply run it with the maximum
> > allowed frequency? Or does this board come with multiple SoCs for which
> > different maximum values exist?
> 
> Yes. There are 2 versions of the chip. One with a maximum operating
> frequency of 74 MHz, second with 90 MHz. The only difference is on the CPU label.
> Which version is used, it is impossible to know in runtime.
> You can simply reject this patch [3/9], all other should not depend on this one.
> Later I'll try to make another different version.

Ok, thanks for explaining. It's really discouraged to put such things in
Kconfig, but in this case it seems acceptable: There's no way to detect
it during runtime *and* it varies across the same board type. So I
applied this series.

One option out of this might be that you could always startup with 74MHz
and add a command to switch to 90MHz. You could put this into the
environment on boards that you know work with 90MHz. Aynway, I don't
want to force you to do this on an Architecture you're probably
currently the only user of.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-02-13 17:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 11:41 [PATCH v2 1/9] ARM: clps711x: Rework lowlevel initialization code Alexander Shiyan
2013-02-13 11:41 ` [PATCH v2 2/9] ARM: clps711x: Move basic lowlevel initialization in common CLPS711X location Alexander Shiyan
2013-02-13 11:41 ` [PATCH v2 3/9] ARM: clps711x: Adds config option for CPU PLL multiplier Alexander Shiyan
2013-02-13 12:02   ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-13 12:23     ` Re[2]: " Alexander Shiyan
2013-02-13 13:36       ` [SPAM] " Jean-Christophe PLAGNIOL-VILLARD
2013-02-13 17:06   ` Sascha Hauer
2013-02-13 17:20     ` Re[2]: " Alexander Shiyan
2013-02-13 17:40       ` Sascha Hauer [this message]
2013-02-13 18:01         ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-13 18:06         ` Re[2]: " Alexander Shiyan
2013-02-13 11:41 ` [PATCH v2 4/9] ARM: clps711x: Remove unused "start" declaration from reset.c Alexander Shiyan
2013-02-13 11:41 ` [PATCH v2 5/9] ARM: clps711x: Mark private functions that not will be used outside as static Alexander Shiyan
2013-02-13 11:41 ` [PATCH v2 6/9] ARM: clep7212: Fix NULL pointer exception if MMU is enabled Alexander Shiyan
2013-02-13 11:41 ` [PATCH v2 7/9] ARM: clps711x: Move memory initialization in common CLPS711X location Alexander Shiyan
2013-02-13 11:41 ` [PATCH v2 8/9] ARM: clep7212: Update default environment Alexander Shiyan
2013-02-13 11:41 ` [PATCH v2 9/9] ARM: clps711x: Update defconfig Alexander Shiyan

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=20130213174051.GH1906@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=shc_work@mail.ru \
    /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