summaryrefslogtreecommitdiffstats
path: root/bootloader/samsung_yps3.c
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2009-08-09 16:12:36 +0000
committerBertrik Sikken <bertrik@sikken.nl>2009-08-09 16:12:36 +0000
commit5aeaa84cab08154dc451a39902c376bd8a8922f4 (patch)
tree91fa0013ec6a8ede69f74510bc347c459f38e480 /bootloader/samsung_yps3.c
parent0b7bfb62700ab0c0f8764dd04e7dc3d64835781d (diff)
downloadrockbox-5aeaa84cab08154dc451a39902c376bd8a8922f4.tar.gz
rockbox-5aeaa84cab08154dc451a39902c376bd8a8922f4.zip
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
Diffstat (limited to 'bootloader/samsung_yps3.c')
-rw-r--r--bootloader/samsung_yps3.c14
1 files changed, 14 insertions, 0 deletions
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();
}
}