From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 8/9] mxs: spl_mem_init: Skip the initialization of some DRAM_CTL registers
Date: Sun, 05 May 2013 16:40:02 +0200 [thread overview]
Message-ID: <51866F42.9040503@denx.de> (raw)
In-Reply-To: <1367444689-31301-9-git-send-email-festevam@gmail.com>
On 01/05/2013 23:44, Fabio Estevam wrote:
> 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>
> ---
Hi Fabio,
> arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
> index cde883d..f500851 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
> @@ -116,9 +116,12 @@ static void initialize_dram_values(void)
>
> mxs_adjust_memory_params(dram_vals);
>
> - for (i = 0; i < ARRAY_SIZE(dram_vals); i++)
> - writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
> -
> + for (i = 0; i < ARRAY_SIZE(dram_vals); i++) {
> +#ifdef CONFIG_MX23
> + if (!(i == 8 || i == 27 || i == 28 || i == 35))
> +#endif
I will suggest you add also a comment here telling that the registers
are reserved. I know you explain this in commit message, but people look
directly into the code and it will be easire to understand why you do that.
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2013-05-05 14:40 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 21:44 [U-Boot] [PATCH 0/9] mx23: Make DDR initialization stable Fabio Estevam
2013-05-01 21:44 ` [U-Boot] [PATCH 1/9] mxs: Make the names of the elements of mxs_pinctrl_regs shorter Fabio Estevam
2013-05-01 23:26 ` Marek Vasut
2013-05-01 23:52 ` Fabio Estevam
2013-05-02 0:12 ` Marek Vasut
2013-05-01 21:44 ` [U-Boot] [PATCH 2/9] mx23: regs-pinctrl.h: Add pinctrl support for mx23 Fabio Estevam
2013-05-01 23:27 ` Marek Vasut
2013-05-01 23:52 ` Fabio Estevam
2013-05-02 0:13 ` Marek Vasut
2013-05-02 0:28 ` Fabio Estevam
2013-05-02 1:44 ` Marek Vasut
2013-05-01 21:44 ` [U-Boot] [PATCH 3/9] mx23evk: Fix DDR pin iomux settings Fabio Estevam
2013-05-01 23:28 ` Marek Vasut
2013-05-01 23:56 ` Fabio Estevam
2013-05-02 0:13 ` Marek Vasut
2013-05-01 21:44 ` [U-Boot] [PATCH 4/9] mx23_olinuxino: " Fabio Estevam
2013-05-01 23:28 ` Marek Vasut
2013-05-01 23:53 ` Fabio Estevam
2013-05-02 0:14 ` Marek Vasut
2013-05-02 2:34 ` Fabio Estevam
2013-05-01 21:44 ` [U-Boot] [PATCH 5/9] mx23evk: Disable the internal pad keepers Fabio Estevam
2013-05-01 21:44 ` [U-Boot] [PATCH 6/9] mx23_olinuxino: " Fabio Estevam
2013-05-01 21:44 ` [U-Boot] [PATCH 7/9] mxs: spl_mem_init: Remove unneeded DRAM configurations Fabio Estevam
2013-05-01 23:29 ` Marek Vasut
2013-05-01 23:54 ` Fabio Estevam
2013-05-02 0:15 ` Marek Vasut
2013-05-02 0:24 ` Fabio Estevam
2013-05-01 21:44 ` [U-Boot] [PATCH 8/9] mxs: spl_mem_init: Skip the initialization of some DRAM_CTL registers Fabio Estevam
2013-05-01 23:30 ` Marek Vasut
2013-05-05 14:40 ` Stefano Babic [this message]
2013-05-01 21:44 ` [U-Boot] [PATCH 9/9] mxs: spl_mem_init: Change EMI port priority Fabio Estevam
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=51866F42.9040503@denx.de \
--to=sbabic@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 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.