All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Paul Walmsley <paul@pwsan.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2a/5 v2] ARM: OMAP1: select clock rate by CPU type
Date: Wed, 30 Nov 2011 14:28:38 -0800	[thread overview]
Message-ID: <20111130222837.GR31337@atomide.com> (raw)
In-Reply-To: <1322686675-26855-1-git-send-email-jkrzyszt@tis.icnet.pl>

* Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [111130 12:23]:
> DPLL1 reprogramming to a different rate is actually blocked inside
> omap1_select_table_rate(), resulting in the defalut rate of 60 MHz
> always used instead of the one selected in .config. OTOH, in
> omap1_defconfig we currently rely on Kconfig options for the supported
> MHz rates in case of boards which boot with dpll1 not set correctly by
> their boot loaders.
> 
> This means that before we allow for reprogramming of dpll1 rate, we
> should prevent from incompatible clock rates being selected, otherwise
> omap1_defconfig will stop booting on boards with imperfect boot loaders,
> as it would always try to change to 216MHz.
> 
> Expand omap1_rate_table with flags for different CPU types and match
> them while selecting clock rates. The idea is stolen from current
> omap24xx clock rate selection algorithm.
> 
> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
> ---
> Hi,
> Since there is no response to patch 2a/5 "Remove unsafe clock values 
> from omap1_defconfig" yet, while rc4 is probably almost out:

Well I'm still wondering what would be the absolute minimal fixe(s)
for the -rc cycle?

Is the problem just that currently with omap1_defconfig boards boot at
the bootloader rate, or at the safe 60MHz unless the .config is changed?
If so, I think that's OK for now as fixing it properly requires what
this patch is doing.
 
> If there are reasons for keeping high clock rates selected in
> omap1_defconfig, and those reasons are more important than fixing bugs
> which prevent some boards from working correctly under 3.2, here is an
> alternative, low intrusive solution which should allow booting from
> omap1_defconfig at correct speeds, selected by CPU type. If the idea is
> acceptable, please review the CPU per clock rate selections I made,
> since I'm not sure about their correctness, perhaps except CK_1510,
> which is based on my own experience with Amstrad Delta. I'll fix that if
> necessary.

Great, this looks like pretty much what I had in mind for the next
merge window! Just one comment below.

 
> @@ -21,38 +22,52 @@ struct mpu_rate omap1_rate_table[] = {
>  	 * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv
>  	 */
>  #if defined(CONFIG_OMAP_ARM_216MHZ)
> -	{ 216000000, 12000000, 216000000, 0x050d, 0x2910 }, /* 1/1/2/2/2/8 */
> +	{ 216000000, 12000000, 216000000, 0x050d, 0x2910, /* 1/1/2/2/2/8 */
> +			CK_16XX },
>  #endif
>  #if defined(CONFIG_OMAP_ARM_195MHZ)
> -	{ 195000000, 13000000, 195000000, 0x050e, 0x2790 }, /* 1/1/2/2/4/8 */
> +	{ 195000000, 13000000, 195000000, 0x050e, 0x2790, /* 1/1/2/2/4/8 */
> +			CK_7XX|CK_16XX },
>  #endif
>  #if defined(CONFIG_OMAP_ARM_192MHZ)
...

We should also now be able to remove all the CONFIG_OMAP_ARM_XXXMHZ options
too, right?

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2a/5 v2] ARM: OMAP1: select clock rate by CPU type
Date: Wed, 30 Nov 2011 14:28:38 -0800	[thread overview]
Message-ID: <20111130222837.GR31337@atomide.com> (raw)
In-Reply-To: <1322686675-26855-1-git-send-email-jkrzyszt@tis.icnet.pl>

* Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [111130 12:23]:
> DPLL1 reprogramming to a different rate is actually blocked inside
> omap1_select_table_rate(), resulting in the defalut rate of 60 MHz
> always used instead of the one selected in .config. OTOH, in
> omap1_defconfig we currently rely on Kconfig options for the supported
> MHz rates in case of boards which boot with dpll1 not set correctly by
> their boot loaders.
> 
> This means that before we allow for reprogramming of dpll1 rate, we
> should prevent from incompatible clock rates being selected, otherwise
> omap1_defconfig will stop booting on boards with imperfect boot loaders,
> as it would always try to change to 216MHz.
> 
> Expand omap1_rate_table with flags for different CPU types and match
> them while selecting clock rates. The idea is stolen from current
> omap24xx clock rate selection algorithm.
> 
> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
> ---
> Hi,
> Since there is no response to patch 2a/5 "Remove unsafe clock values 
> from omap1_defconfig" yet, while rc4 is probably almost out:

Well I'm still wondering what would be the absolute minimal fixe(s)
for the -rc cycle?

Is the problem just that currently with omap1_defconfig boards boot at
the bootloader rate, or at the safe 60MHz unless the .config is changed?
If so, I think that's OK for now as fixing it properly requires what
this patch is doing.
 
> If there are reasons for keeping high clock rates selected in
> omap1_defconfig, and those reasons are more important than fixing bugs
> which prevent some boards from working correctly under 3.2, here is an
> alternative, low intrusive solution which should allow booting from
> omap1_defconfig at correct speeds, selected by CPU type. If the idea is
> acceptable, please review the CPU per clock rate selections I made,
> since I'm not sure about their correctness, perhaps except CK_1510,
> which is based on my own experience with Amstrad Delta. I'll fix that if
> necessary.

Great, this looks like pretty much what I had in mind for the next
merge window! Just one comment below.

 
> @@ -21,38 +22,52 @@ struct mpu_rate omap1_rate_table[] = {
>  	 * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv
>  	 */
>  #if defined(CONFIG_OMAP_ARM_216MHZ)
> -	{ 216000000, 12000000, 216000000, 0x050d, 0x2910 }, /* 1/1/2/2/2/8 */
> +	{ 216000000, 12000000, 216000000, 0x050d, 0x2910, /* 1/1/2/2/2/8 */
> +			CK_16XX },
>  #endif
>  #if defined(CONFIG_OMAP_ARM_195MHZ)
> -	{ 195000000, 13000000, 195000000, 0x050e, 0x2790 }, /* 1/1/2/2/4/8 */
> +	{ 195000000, 13000000, 195000000, 0x050e, 0x2790, /* 1/1/2/2/4/8 */
> +			CK_7XX|CK_16XX },
>  #endif
>  #if defined(CONFIG_OMAP_ARM_192MHZ)
...

We should also now be able to remove all the CONFIG_OMAP_ARM_XXXMHZ options
too, right?

Regards,

Tony

  reply	other threads:[~2011-11-30 22:28 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-27  3:32 [PATCH 0/5] ARM: OMAP1: Fix dpll1 reprogramming related issues Janusz Krzysztofik
2011-11-27  3:32 ` Janusz Krzysztofik
2011-11-27  3:32 ` Janusz Krzysztofik
2011-11-27  3:32 ` [PATCH 1/5] ARM: OMAP1: Fix dpll1 default rate reprogramming method Janusz Krzysztofik
2011-11-27  3:32   ` Janusz Krzysztofik
2011-11-28 17:45   ` Tony Lindgren
2011-11-28 17:45     ` Tony Lindgren
2011-11-28 22:00     ` [PATCH 2a/5] Remove unsafe clock values from omap1_defconfig Janusz Krzysztofik
2011-11-28 22:00       ` Janusz Krzysztofik
2011-11-30 22:32       ` Tony Lindgren
2011-11-30 22:32         ` Tony Lindgren
2011-11-30 20:57     ` [PATCH 2a/5 v2] ARM: OMAP1: select clock rate by CPU type Janusz Krzysztofik
2011-11-30 20:57       ` Janusz Krzysztofik
2011-11-30 22:28       ` Tony Lindgren [this message]
2011-11-30 22:28         ` Tony Lindgren
2011-12-01 10:10         ` Janusz Krzysztofik
2011-12-01 10:10           ` Janusz Krzysztofik
2011-12-01 18:22           ` Tony Lindgren
2011-12-01 18:22             ` Tony Lindgren
2011-12-01 18:54             ` Janusz Krzysztofik
2011-12-01 18:54               ` Janusz Krzysztofik
2011-12-01 19:06               ` Tony Lindgren
2011-12-01 19:06                 ` Tony Lindgren
2011-12-04 12:17         ` [PATCH] ARM: OMAP1: Move dpll1 rates selection from config to runtime Janusz Krzysztofik
2011-12-04 12:17           ` Janusz Krzysztofik
2011-12-08 23:13           ` Janusz Krzysztofik
2011-12-08 23:13             ` Janusz Krzysztofik
2011-12-09  1:51             ` [PATCH v2] " Janusz Krzysztofik
2011-12-09  1:51               ` Janusz Krzysztofik
2011-12-09  2:09               ` Tony Lindgren
2011-12-09  2:09                 ` Tony Lindgren
2011-12-09  2:31                 ` Janusz Krzysztofik
2011-12-09  2:31                   ` Janusz Krzysztofik
2011-12-09  1:51       ` [PATCH] ARM: OMAP1: Set the omap1623 sram size to 16K Tony Lindgren
2011-12-09  1:51         ` Tony Lindgren
     [not found]     ` <201112010310.43890.jkrzyszt@tis.icnet.pl>
     [not found]       ` <20111201022750.GY13928@atomide.com>
2011-12-01  9:54         ` [PATCH 2a/5] Remove unsafe clock values from omap1_defconfig Janusz Krzysztofik
2011-12-01  9:54           ` Janusz Krzysztofik
2011-12-01 10:21           ` Janusz Krzysztofik
2011-12-01 10:21             ` Janusz Krzysztofik
2011-12-01 17:17           ` Tony Lindgren
2011-12-01 17:17             ` Tony Lindgren
2011-12-01 18:38             ` Janusz Krzysztofik
2011-12-01 18:38               ` Janusz Krzysztofik
2011-12-01 19:04               ` Tony Lindgren
2011-12-01 19:04                 ` Tony Lindgren
2011-12-01 19:23                 ` Janusz Krzysztofik
2011-12-01 19:23                   ` Janusz Krzysztofik
2011-12-01 19:46                   ` Tony Lindgren
2011-12-01 19:46                     ` Tony Lindgren
2011-12-01 20:30                     ` [PATCH] ARM: OMAP1: " Janusz Krzysztofik
2011-12-01 20:30                       ` Janusz Krzysztofik
2011-12-01 20:13                   ` [PATCH 0/2 v2] ARM: OMAP1: Fix dpll1 reprogramming related issues Janusz Krzysztofik
2011-12-01 20:13                     ` Janusz Krzysztofik
2011-12-01 21:16                     ` [PATCH v2] ARM: OMAP1: Update dpll1 default rate reprogramming method Janusz Krzysztofik
2011-12-01 21:16                       ` Janusz Krzysztofik
2011-12-02  2:09                     ` [PATCH 0/2 v2] ARM: OMAP1: Fix dpll1 reprogramming related issues Tony Lindgren
2011-12-02  2:09                       ` Tony Lindgren
2011-12-02 17:02                       ` Janusz Krzysztofik
2011-12-02 17:02                         ` Janusz Krzysztofik
2011-12-01 20:13                   ` [PATCH 1/2 v2] ARM: OMAP1: Fix ckctl value used for dpll1 defualt rate Janusz Krzysztofik
2011-12-01 20:13                     ` Janusz Krzysztofik
2011-12-01 20:13                   ` [PATCH 2/2 v2] ARM: OMAP1: recalculate loops per jiffy after dpll1 reprogram Janusz Krzysztofik
2011-12-01 20:13                     ` Janusz Krzysztofik
2011-12-04 15:07                 ` [PATCH] ARM: OMAP1: Always reprogramme dpll1 rate at boot Janusz Krzysztofik
2011-12-04 15:07                   ` Janusz Krzysztofik
2011-11-27  3:32 ` [PATCH 2/5] ARM: OMAP1: Fix ckctl value used for dpll1 defualt rate Janusz Krzysztofik
2011-11-27  3:32   ` Janusz Krzysztofik
2011-11-27  3:32 ` [PATCH 3/5] ARM: OMAP1: Fix dpll1 reprogramming not actually allowed Janusz Krzysztofik
2011-11-27  3:32   ` Janusz Krzysztofik
2011-11-28 17:46   ` Tony Lindgren
2011-11-28 17:46     ` Tony Lindgren
2011-11-27  3:32 ` [PATCH 4/5] init/calibrate.c: allow for recalibration of loops per jiffy Janusz Krzysztofik
2011-11-27  3:32   ` Janusz Krzysztofik
2011-11-28 15:39   ` Russell King - ARM Linux
2011-11-28 15:39     ` Russell King - ARM Linux
2011-11-28 22:30     ` Janusz Krzysztofik
2011-11-28 22:30       ` Janusz Krzysztofik
2011-11-27  3:32 ` [PATCH 5/5] ARM: OMAP1: recalibrate loops per jiffy after dpll1 reprogram Janusz Krzysztofik
2011-11-27  3:32   ` Janusz Krzysztofik
2011-11-29  0:25   ` [PATCH 5/5 v2] ARM: OMAP1: recalculate " Janusz Krzysztofik
2011-11-29  0:25     ` Janusz Krzysztofik
2011-12-09  8:42     ` Russell King - ARM Linux
2011-12-09  8:42       ` Russell King - ARM Linux
2011-12-09 10:00       ` Janusz Krzysztofik
2011-12-09 10:00         ` Janusz Krzysztofik
2011-12-09 10:09         ` Janusz Krzysztofik
2011-12-09 10:09           ` Janusz Krzysztofik
2011-12-10  0:25         ` Russell King - ARM Linux
2011-12-10  0:25           ` Russell King - ARM Linux
2011-12-10 12:04           ` Janusz Krzysztofik
2011-12-10 12:04             ` Janusz Krzysztofik

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=20111130222837.GR31337@atomide.com \
    --to=tony@atomide.com \
    --cc=jkrzyszt@tis.icnet.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.