mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 03/11] ARM: clps711x: Adds config option for CPU PLL multiplier
Date: Fri, 8 Feb 2013 12:11:26 +0100	[thread overview]
Message-ID: <20130208111126.GR19322@game.jcrosoft.org> (raw)
In-Reply-To: <1360317743-25975-3-git-send-email-shc_work@mail.ru>

On 14:02 Fri 08 Feb     , Alexander Shiyan wrote:
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  arch/arm/mach-clps711x/Kconfig    |   13 +++++++++++++
>  arch/arm/mach-clps711x/lowlevel.c |    4 ++--
>  2 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
> index f0adeda..d2873b4 100644
> --- a/arch/arm/mach-clps711x/Kconfig
> +++ b/arch/arm/mach-clps711x/Kconfig
> @@ -10,6 +10,19 @@ config MACH_CLEP7212
>  
>  endchoice
>  
> +menu "CLPS711X specific settings"
> +
> +config CLPS711X_CPU_PLL_MULT
> +	int "CPU PLL multiplier (20-50)"
> +	range 20 50
> +	default "40"
> +	help
> +	  Define CPU PLL multiplier. PLL is calculated by formula:
> +	    PLL Frequency = (PLL Multiplier / 2) * 3686400 Hz
> +	  Default value is 40, for achieve 73 MHz.
> +
this board specific put this in c code
kconfig is too easy to break

check how we do on at91

Best Regards,
J.
> +endmenu
> +
>  config BOARDINFO
>  	default "Cirrus Logic CLEP7212" if MACH_CLEP7212
>  
> diff --git a/arch/arm/mach-clps711x/lowlevel.c b/arch/arm/mach-clps711x/lowlevel.c
> index 0249c60..245ac93 100644
> --- a/arch/arm/mach-clps711x/lowlevel.c
> +++ b/arch/arm/mach-clps711x/lowlevel.c
> @@ -18,10 +18,10 @@
>  #include <mach/clps711x.h>
>  
>  #define MAIN_CLOCK		3686400
> -#define CPU_SPEED		92160000
> +#define CPU_SPEED		((CONFIG_CLPS711X_CPU_PLL_MULT * MAIN_CLOCK) / 2)
>  #define BUS_SPEED		(CPU_SPEED / 2)
>  
> -#define PLL_VALUE		(((CPU_SPEED * 2) / MAIN_CLOCK) << 24)
> +#define PLL_VALUE		(CONFIG_CLPS711X_CPU_PLL_MULT << 24)
>  #define SDRAM_REFRESH_RATE	(64 * (BUS_SPEED / (8192 * 1000)))
>  
>  void __naked __bare_init barebox_arm_reset_vector(void)
> -- 
> 1.7.3.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

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

  reply	other threads:[~2013-02-08 11:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 10:02 [PATCH 01/11] ARM: clps711x: Move lowlevel initialization in common CLPS711X location Alexander Shiyan
2013-02-08 10:02 ` [PATCH 02/11] ARM: clps711x: Fix SDRAM setup comment Alexander Shiyan
2013-02-08 10:02 ` [PATCH 03/11] ARM: clps711x: Adds config option for CPU PLL multiplier Alexander Shiyan
2013-02-08 11:11   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-02-08 11:58     ` Re[2]: " Alexander Shiyan
2013-02-08 13:37       ` [SPAM] " Jean-Christophe PLAGNIOL-VILLARD
2013-02-08 10:02 ` [PATCH 04/11] ARM: clps711x: Decrease initial memory size to 8MB Alexander Shiyan
2013-02-08 10:02 ` [PATCH 05/11] ARM: clps711x: Remove unused "start" declaration from reset.c Alexander Shiyan
2013-02-08 10:02 ` [PATCH 06/11] ARM: clps711x: Mark private functions that not will be used outside as static Alexander Shiyan
2013-02-08 10:02 ` [PATCH 07/11] ARM: clep7212: Fix NULL pointer exception if MMU is enabled Alexander Shiyan
2013-02-08 10:02 ` [PATCH 08/11] ARM: mmu: Clear unpredictable bits for translation table Alexander Shiyan
2013-02-11  8:26   ` Sascha Hauer
2013-02-08 10:02 ` [PATCH 09/11] ARM: clps711x: Move memory initialization in common CLPS711X location Alexander Shiyan
2013-02-08 10:02 ` [PATCH 10/11] ARM: clps711x: Turn off all peripherals on startup Alexander Shiyan
2013-02-08 10:02 ` [PATCH 11/11] ARM: clps711x: Update defconfig Alexander Shiyan
2013-02-11  8:48 ` [PATCH 01/11] ARM: clps711x: Move lowlevel initialization in common CLPS711X location Sascha Hauer
2013-02-11  9:30   ` Re[2]: " Alexander Shiyan
2013-02-11  9:41     ` Sascha Hauer

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=20130208111126.GR19322@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --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