From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] KARO TX25: Fix NAND Flash R/W cycle times
Date: Wed, 8 Aug 2012 15:55:32 +0200 (CEST) [thread overview]
Message-ID: <176388006.2143625.1344434132868.JavaMail.root@advansee.com> (raw)
In-Reply-To: <452528157.1063435.1343993680313.JavaMail.root@advansee.com>
The NAND Flash of the KARO TX25 board is a Samsung K9F1G08U0B with 25-ns R/W
cycle times. However, the NFC clock for this board was set to 66.5 MHz, so using
the NFC driver in symmetric mode (i.e. 1 NFC clock cycle = 1 NF R/W cycle)
resulted in NF R/W cycle times of 15 ns, hence corrupted NF accesses.
This patch fixes this issue by setting the NFC clock to the highest frequency
complying to the 25-ns NF R/W cycle times specification, i.e. 33.25 MHz.
Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
Cc: John Rigby <jcrigby@gmail.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Daniel Gachet <Daniel.Gachet@hefr.ch>
---
This patch is a replacement solution that I suggest instead of
http://patchwork.ozlabs.org/patch/174735/ since there is no need for a
CONFIG_SYS_NAND_MXC_NFC_TWO_CYCLES config option in the NFC driver.
It still has to be tested by someone having this board, but I'm very confident
that it works since I have another PCB design based on the i.MX25 with a NAND
Flash with the same timings that works fine using these clock settings.
.../board/karo/tx25/lowlevel_init.S | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git u-boot-2012.07.orig/board/karo/tx25/lowlevel_init.S u-boot-2012.07/board/karo/tx25/lowlevel_init.S
index 823df10..eb3f187 100644
--- u-boot-2012.07.orig/board/karo/tx25/lowlevel_init.S
+++ u-boot-2012.07/board/karo/tx25/lowlevel_init.S
@@ -67,6 +67,14 @@
write32 0x53f80008, 0x20034000
/*
+ * PCDR2: NFC = 33.25 MHz
+ * This is required for the NAND Flash of this board, which is a Samsung
+ * K9F1G08U0B with 25-ns R/W cycle times, in order to make it work with
+ * the NFC driver in symmetric (i.e. one-cycle) mode.
+ */
+ write32 0x53f80020, 0x01010103
+
+ /*
* enable all implemented clocks in all three
* clock control registers
*/
next prev parent reply other threads:[~2012-08-08 13:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 11:17 [U-Boot] [PATCH v5] Corrupted NAND Flash access on KARO TX25 modules Daniel Gachet
2012-08-02 11:28 ` Benoît Thébaudeau
2012-08-02 13:55 ` Benoît Thébaudeau
2012-08-03 11:34 ` Benoît Thébaudeau
2012-08-08 13:55 ` Benoît Thébaudeau [this message]
2012-08-08 14:18 ` [U-Boot] [PATCH] KARO TX25: Fix NAND Flash R/W cycle times Stefano Babic
2012-09-23 18:01 ` Stefano Babic
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=176388006.2143625.1344434132868.JavaMail.root@advansee.com \
--to=benoit.thebaudeau@advansee.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