From f85ebc5aae62200a0e1bc8e41969a6a520660e17 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 12 Jun 2016 22:12:13 +0200 Subject: [PATCH] nand: Make the toshiba flash (used in RevF/RevG) Empirically these timings wait not long enough for erase to succedd, we are waiting far longer than necessary but the RAUC system seems to be a lot more stable now. --- nand.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nand.c b/nand.c index dfde5ab..c3d408c 100644 --- a/nand.c +++ b/nand.c @@ -508,7 +508,12 @@ nand_set_a1cr(uint8_t manID, uint8_t deviceID) break; /* Toshiba */ case 0x98: - AEMIF->A1CR = 0x102442DC; + /* + * Factor 10 slower for R/W strobe than the current values. Seems + * to improve stability with mount/rm/umount/mount/write/umount + * cycle. Need to calculate good values based on the datasheet. + */ + AEMIF->A1CR = 0x20FEE7FC; break; default: log_info( "Unsupported NAND device" );