public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Nishanth Menon <menon.nishanth@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARMV7: Overo: Automatically set clock rate to maximum if mpurate env variable is "auto"
Date: Sat, 06 Nov 2010 00:44:34 -0400	[thread overview]
Message-ID: <4CD4DD32.7000807@gmail.com> (raw)
In-Reply-To: <1289012370.18546.66.camel@quadra>

just a minor crib - $subject length is around 88 characters, it'd look 
better with around 50 character length.

Steve Sakoman wrote, on 11/05/2010 10:59 PM:
> The maximum clock rate for the OMAP3 processors on Overo depends on the
> processor type and revision.  This patch sets the clock rate to the
> spec sheet maximum if the mpurate environment variable is set to
> "auto".  Otherwise it passes the mpurate variable unchanged on the
> kernel command line.
>
> Signed-off-by: Steve Sakoman<steve.sakoman@linaro.org>
> ---
>
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index f917e40..3c9e4a6 100644
> --- a/board/overo/overo.c
> +++ b/board/overo/overo.c
> @@ -281,6 +281,22 @@ int misc_init_r(void)
>
>   	dieid_num_r();
>
> +	if (strcmp(getenv("mpurate"), "auto") == 0)
> +		switch (get_cpu_family()) {
> +		case CPU_OMAP34XX:
> +			if ((get_cpu_rev()>= CPU_3XX_ES31)&&
> +			    (get_sku_id() == SKUID_CLK_720MHZ))
> +				setenv("mpurate", "720");
> +			else
> +				setenv("mpurate", "600");
> +			break;
> +		case CPU_OMAP36XX:
> +			setenv("mpurate", "720");
> +			break;
> +		default:
> +			setenv("mpurate", "500");
> +		}
> +
>   	return 0;
>   }
>
> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index 79a5b85..dbdfd9a 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -156,7 +156,7 @@
>   #define CONFIG_EXTRA_ENV_SETTINGS \
>   	"loadaddr=0x82000000\0" \
>   	"console=ttyS2,115200n8\0" \
> -	"mpurate=500\0" \
> +	"mpurate=auto\0" \
>   	"vram=12M\0" \
>   	"dvimode=1024x768MR-16 at 60\0" \
>   	"defaultdisplay=dvi\0" \

yep, this does look like a nice way to do it. thanks.

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2010-11-06  4:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06  2:59 [U-Boot] [PATCH] ARMV7: Overo: Automatically set clock rate to maximum if mpurate env variable is "auto" Steve Sakoman
2010-11-06  4:44 ` Nishanth Menon [this message]
2010-11-07 21:43 ` Wolfgang Denk
2010-11-08  8:46   ` Premi, Sanjeev

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=4CD4DD32.7000807@gmail.com \
    --to=menon.nishanth@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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