summaryrefslogtreecommitdiff
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 @@
55#include "si4700.h" 55#include "si4700.h"
56#include "fmradio_i2c.h" 56#include "fmradio_i2c.h"
57#include "wmcodec.h" 57#include "wmcodec.h"
58#include "nand-target.h"
58 59
59char version[] = APPSVERSION; 60char version[] = APPSVERSION;
60#define LONG_DELAY 200000 61#define LONG_DELAY 200000
@@ -82,6 +83,7 @@ void main(void)
82 unsigned int button; 83 unsigned int button;
83 unsigned int fm_frequency = 100700000; 84 unsigned int fm_frequency = 100700000;
84 int audiovol = 0x60; 85 int audiovol = 0x60;
86 unsigned nand_ids[4];
85 87
86 // enable all peripherals 88 // enable all peripherals
87 PWRCON = 0; 89 PWRCON = 0;
@@ -141,6 +143,11 @@ void main(void)
141 PCON5 = (PCON5 & ~0x0000000F) | 0x00000001; 143 PCON5 = (PCON5 & ~0x0000000F) | 0x00000001;
142 PDAT5 |= 1; 144 PDAT5 |= 1;
143 145
146 nand_ll_init();
147 for (i = 0; i < 4; i++) {
148 nand_ids[i] = nand_ll_read_id(i);
149 }
150
144 while (true) 151 while (true)
145 { 152 {
146 line = 1; 153 line = 1;
@@ -279,6 +286,13 @@ void main(void)
279 lcd_puts(0, line++, mystring); 286 lcd_puts(0, line++, mystring);
280#endif 287#endif
281 288
289#if 1 /* NAND debug */
290 snprintf(mystring, 64, "NAND ID: %08X %08X", nand_ids[0], nand_ids[1]);
291 lcd_puts(0, line++, mystring);
292 snprintf(mystring, 64, "NAND ID: %08X %08X", nand_ids[2], nand_ids[3]);
293 lcd_puts(0, line++, mystring);
294#endif
295
282 lcd_update(); 296 lcd_update();
283 } 297 }
284} 298}