[PATCH 4/5] S3C2440/NAND: Re-enable the controller after NAND boot test

Juergen Beisert jbe at pengutronix.de
Sun Mar 6 16:53:17 EST 2011


From: Juergen Beisert <juergen at kreuzholzen.de>

After running the 'nand_boot_test' command, any usage of the NAND fails with
an IO error. This happens due to the load routine disables the NAND controller
after loading the image.

This patch re-enables the NAND controller again after running the test.

Signed-off-by: Juergen Beisert <juergen at kreuzholzen.de>
---
 drivers/mtd/nand/nand_s3c2410.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/nand_s3c2410.c b/drivers/mtd/nand/nand_s3c2410.c
index e298771..7d7ff46 100644
--- a/drivers/mtd/nand/nand_s3c2410.c
+++ b/drivers/mtd/nand/nand_s3c2410.c
@@ -611,6 +611,10 @@ static int do_nand_boot_test(struct command *cmdtp, int argc, char *argv[])
 
 	s3c24x0_nand_load_image(dest, size, 0);
 
+	/* re-enable the controller again, as this was a test only */
+	enable_nand_controller((void *)S3C24X0_NAND_BASE,
+				BOARD_DEFAULT_NAND_TIMING);
+
 	return 0;
 }
 
-- 
1.7.2.3




More information about the barebox mailing list