1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Bertrik Sikken 2009-08-09 16:12:36 +00:00
parent 0b7bfb6270
commit 5aeaa84cab
4 changed files with 157 additions and 0 deletions

View file

@ -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();
}
}