public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/4] mx6qsabreauto: Configure the WEIM controller like the kernel
@ 2016-12-15 18:00 Fabio Estevam
  2016-12-15 18:00 ` [U-Boot] [PATCH v2 2/4] mx6qsabreauto: Pass the correct parallel NOR width Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Fabio Estevam @ 2016-12-15 18:00 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-02-03 14:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-15 18:00 [U-Boot] [PATCH v2 1/4] mx6qsabreauto: Configure the WEIM controller like the kernel Fabio Estevam
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox