From 5aeaa84cab08154dc451a39902c376bd8a8922f4 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sun, 9 Aug 2009 16:12:36 +0000 Subject: Samsung YP-S3: add beginning of a low-level NAND driver and update bootloader demo program to display the NAND ids. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22221 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/samsung_yps3.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bootloader/samsung_yps3.c') diff --git a/bootloader/samsung_yps3.c b/bootloader/samsung_yps3.c index e541ff2f53..6d12f684fc 100644 --- a/bootloader/samsung_yps3.c +++ b/bootloader/samsung_yps3.c @@ -55,6 +55,7 @@ #include "si4700.h" #include "fmradio_i2c.h" #include "wmcodec.h" +#include "nand-target.h" char version[] = APPSVERSION; #define LONG_DELAY 200000 @@ -82,6 +83,7 @@ void main(void) unsigned int button; unsigned int fm_frequency = 100700000; int audiovol = 0x60; + unsigned nand_ids[4]; // enable all peripherals PWRCON = 0; @@ -141,6 +143,11 @@ void main(void) PCON5 = (PCON5 & ~0x0000000F) | 0x00000001; PDAT5 |= 1; + nand_ll_init(); + for (i = 0; i < 4; i++) { + nand_ids[i] = nand_ll_read_id(i); + } + while (true) { line = 1; @@ -279,6 +286,13 @@ void main(void) lcd_puts(0, line++, mystring); #endif +#if 1 /* NAND debug */ + snprintf(mystring, 64, "NAND ID: %08X %08X", nand_ids[0], nand_ids[1]); + lcd_puts(0, line++, mystring); + snprintf(mystring, 64, "NAND ID: %08X %08X", nand_ids[2], nand_ids[3]); + lcd_puts(0, line++, mystring); +#endif + lcd_update(); } } -- cgit v1.2.3