From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] sunxi: Add CONFIG_OLD_KERNEL_COMPAT Kconfig option
Date: Wed, 22 Oct 2014 19:44:06 +0100 [thread overview]
Message-ID: <1414003446.20604.69.camel@hellion.org.uk> (raw)
In-Reply-To: <1413985476-19209-3-git-send-email-hdegoede@redhat.com>
On Wed, 2014-10-22 at 15:44 +0200, Hans de Goede wrote:
> Add a Kconfig option which users can select when they want to boot older
> kernels, e.g. the linux-sunxi 3.4 kernels. For now this just forces the pll5
> "p" value to 1 (divide by 2) as that is what those kernels are hardcoded too,
> in the future this may enable further workarounds.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> arch/arm/cpu/armv7/sunxi/dram.c | 4 ++++
> board/sunxi/Kconfig | 7 +++++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/arch/arm/cpu/armv7/sunxi/dram.c b/arch/arm/cpu/armv7/sunxi/dram.c
> index 0cbcf57..c0dc456 100644
> --- a/arch/arm/cpu/armv7/sunxi/dram.c
> +++ b/arch/arm/cpu/armv7/sunxi/dram.c
> @@ -293,6 +293,10 @@ static void mctl_setup_dram_clock(u32 clk, u32 mbus_clk)
> reg_val |= CCM_PLL5_CTRL_K(CCM_PLL5_CTRL_K_X(2));
> reg_val |= CCM_PLL5_CTRL_N(CCM_PLL5_CTRL_N_X(clk / 24));
> }
> +#ifdef CONFIG_OLD_KERNEL_COMPAT
> + /* Old kernels are hardcoded to P=1 (divide by 2) */
> + reg_val |= CCM_PLL5_CTRL_P(1);
> +#endif
I think this would be better placed above the if/else ladder, just next
to the:
reg_val &= ~CCM_PLL5_CTRL_P_MASK; /* set P to 0 (x1) */
i.e. keep the frobbings of P in the same place.
Ian.
next prev parent reply other threads:[~2014-10-22 18:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 13:44 [U-Boot] [PATCH 1/3] sunxi: Add clock_get_pll5p() function Hans de Goede
2014-10-22 13:44 ` [U-Boot] [PATCH 2/3] sunxi: dram: Use clock_get_pll5p to calculate mbus, rather then hardcoding Hans de Goede
2014-10-22 18:41 ` Ian Campbell
2014-10-22 13:44 ` [U-Boot] [PATCH 3/3] sunxi: Add CONFIG_OLD_KERNEL_COMPAT Kconfig option Hans de Goede
2014-10-22 18:44 ` Ian Campbell [this message]
2014-10-22 18:57 ` Tom Rini
2014-10-22 18:39 ` [U-Boot] [PATCH 1/3] sunxi: Add clock_get_pll5p() function Ian Campbell
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=1414003446.20604.69.camel@hellion.org.uk \
--to=ijc@hellion.org.uk \
--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