From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 6/7] mxs: spl_mem_init: Skip the initialization of some DRAM_CTL registers
Date: Fri, 3 May 2013 04:26:48 +0200 [thread overview]
Message-ID: <201305030426.49057.marex@denx.de> (raw)
In-Reply-To: <1367534661-13502-7-git-send-email-festevam@gmail.com>
Dear Fabio Estevam,
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> HW_DRAM_CTL27, HW_DRAM_CTL28 and HW_DRAM_CTL35 are not initialized as per
> FSL bootlets code.
>
> mx23 Reference Manual mark HW_DRAM_CTL27 and HW_DRAM_CTL28 as "reserved".
>
> HW_DRAM_CTL8 is setup as the last element.
>
> So skip the initialization of these DRAM_CTL registers.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v2:
> - None
> Changes since v1:
> - To avoid polluting the mx28 case, separate the function definition in
> mx23 and for mx28.
>
> arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
> b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c index df25535..bf58058 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
> @@ -110,6 +110,7 @@ __weak void mxs_adjust_memory_params(uint32_t
> *dram_vals) {
> }
>
> +#ifdef CONFIG_MX28
> static void initialize_dram_values(void)
> {
> int i;
> @@ -118,15 +119,26 @@ static void initialize_dram_values(void)
>
> for (i = 0; i < ARRAY_SIZE(dram_vals); i++)
> writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
> +}
> +#else
> +static void initialize_dram_values(void)
> +{
> + int i;
> +
> + mxs_adjust_memory_params(dram_vals);
> +
> + for (i = 0; i < ARRAY_SIZE(dram_vals); i++) {
> + if (!(i == 8 || i == 27 || i == 28 || i == 35))
if (foo || bar || baz)
continue;
writel();
This will be much more readable.
> + writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
> + }
>
> -#ifdef CONFIG_MX23
> /*
> * Enable tRAS lockout in HW_DRAM_CTL08 ; it must be the last
> * element to be set
> */
> writel((1 << 24), MXS_DRAM_BASE + (4 * 8));
> -#endif
> }
> +#endif
>
> static void mxs_mem_init_clock(void)
> {
Best regards,
Marek Vasut
next prev parent reply other threads:[~2013-05-03 2:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 22:44 [U-Boot] [PATCH v3 0/9] mx23: Make DDR initialization stable Fabio Estevam
2013-05-02 22:44 ` [U-Boot] [PATCH v3 1/7] mx23: Fix pad voltage selection bit Fabio Estevam
2013-05-03 2:24 ` Marek Vasut
2013-05-03 2:33 ` Otavio Salvador
2013-05-03 2:34 ` Marek Vasut
2013-05-03 2:34 ` Fabio Estevam
2013-05-02 22:44 ` [U-Boot] [PATCH v3 2/7] mx23evk: Fix DDR pin iomux settings Fabio Estevam
2013-05-03 2:24 ` Marek Vasut
2013-05-03 2:35 ` Fabio Estevam
2013-05-03 2:37 ` Marek Vasut
2013-05-03 2:51 ` Fabio Estevam
2013-05-03 3:22 ` Marek Vasut
2013-05-02 22:44 ` [U-Boot] [PATCH v3 3/7] mx23_olinuxino: " Fabio Estevam
2013-05-02 22:44 ` [U-Boot] [PATCH v3 4/7] mxs: spl_mem_init: Fix comment about start bit Fabio Estevam
2013-05-02 22:44 ` [U-Boot] [PATCH v3 5/7] mxs: spl_mem_init: Remove erroneous DDR setting Fabio Estevam
2013-05-03 2:25 ` Marek Vasut
2013-05-03 2:37 ` Fabio Estevam
2013-05-03 2:50 ` Marek Vasut
2013-05-02 22:44 ` [U-Boot] [PATCH v3 6/7] mxs: spl_mem_init: Skip the initialization of some DRAM_CTL registers Fabio Estevam
2013-05-03 2:26 ` Marek Vasut [this message]
2013-05-03 2:33 ` Otavio Salvador
2013-05-02 22:44 ` [U-Boot] [PATCH v3 7/7] mxs: spl_mem_init: Change EMI port priority Fabio Estevam
2013-05-03 2:20 ` [U-Boot] [PATCH v3 0/9] mx23: Make DDR initialization stable Marek Vasut
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=201305030426.49057.marex@denx.de \
--to=marex@denx.de \
--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