public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <fabio.estevam@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/4] mx6qsabreauto: Configure the WEIM controller like the kernel
Date: Thu, 15 Dec 2016 16:00:10 -0200	[thread overview]
Message-ID: <1481824813-14432-1-git-send-email-fabio.estevam@nxp.com> (raw)

Do the same WEIM initialization as done in the Linux kernel
according to arch/arm/boot/dts/imx6qdl-sabreauto.dtsi from kernel 4.9.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v1:
- None

 board/freescale/mx6qsabreauto/mx6qsabreauto.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index 5fca4d1..13a9b5a 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -221,12 +221,20 @@ static void eimnor_cs_setup(void)
 {
 	struct weim *weim_regs = (struct weim *)WEIM_BASE_ADDR;
 
-	writel(0x00020181, &weim_regs->cs0gcr1);
+	/*
+	 * Configure weim like the linux kernel.
+	 * From arch/arm/boot/dts/imx6qdl-sabreauto.dtsi:
+	 *
+	 * fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
+	 *		      	 0x0000c000 0x1404a38e 0x00000000>;
+	 */
+
+	writel(0x00620081, &weim_regs->cs0gcr1);
 	writel(0x00000001, &weim_regs->cs0gcr2);
-	writel(0x0a020000, &weim_regs->cs0rcr1);
+	writel(0x1c022000, &weim_regs->cs0rcr1);
 	writel(0x0000c000, &weim_regs->cs0rcr2);
-	writel(0x0804a240, &weim_regs->cs0wcr1);
-	writel(0x00000120, &weim_regs->wcr);
+	writel(0x1404a38e, &weim_regs->cs0wcr1);
+	writel(0x00000000, &weim_regs->wcr);
 
 	set_chipselect_size(CS0_128);
 }
-- 
2.7.4

             reply	other threads:[~2016-12-15 18:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15 18:00 Fabio Estevam [this message]
2016-12-15 18:00 ` [U-Boot] [PATCH v2 2/4] mx6qsabreauto: Pass the correct parallel NOR width Fabio Estevam
2017-01-27  9:33   ` Stefano Babic
2017-02-03 13:10     ` Fabio Estevam
2017-02-03 14:31       ` Stefano Babic
2016-12-15 18:00 ` [U-Boot] [PATCH v2 3/4] Kconfig: Move USE_ARCH_MEMCPY/MEMSET to Kconfig Fabio Estevam
2016-12-15 18:06   ` Tom Rini
2016-12-15 18:00 ` [U-Boot] [PATCH v2 4/4] cmd: mem: Use memcpy for 'cp' command Fabio Estevam
2016-12-17 15:11   ` Tom Rini
2016-12-19 22:09   ` Tom Rini
2016-12-19 22:11     ` Fabio Estevam
2017-01-11 15:49     ` Fabio Estevam
2017-01-11 16:21       ` Tom Rini
2017-01-13  0:51   ` [U-Boot] [U-Boot,v2,4/4] " Tom Rini

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=1481824813-14432-1-git-send-email-fabio.estevam@nxp.com \
    --to=fabio.estevam@nxp.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