mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2025-04-21 12:27:27 +03:00
file a way to debug the nand_read.c
if it's work the one led will be always on if something wrong blink two led under Power Button
This commit is contained in:
@@ -19,7 +19,9 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "blink_led.h"
|
||||
#include "nand_read.h"
|
||||
/*
|
||||
unsigned char buf[]={
|
||||
0x0d,0xc0,0xa0,0xe1,0x00,0xd8,0x2d,0xe9,0x04,0xb0,0x4c,0xe2,0x4c,0x20,0x9f,0xe5,
|
||||
0x05,0x30,0xa0,0xe3,0x00,0x30,0x82,0xe5,0x44,0x20,0x9f,0xe5,0x44,0x30,0x9f,0xe5,
|
||||
@@ -29,16 +31,22 @@ unsigned char buf[]={
|
||||
0x00,0x30,0x82,0xe5,0x0c,0x00,0x9f,0xe5,0x04,0x00,0x00,0xeb,0xf0,0xff,0xff,0xea,
|
||||
0x10,0x00,0x00,0x56,0x18,0x00,0x00,0x56,0xff,0xff,0x00,0x00,0x14,0x00,0x00,0x56,
|
||||
0x01,0x00,0x50,0xe2,0xfd,0xff,0xff,0x1a,0x0e,0xf0,0xa0,0xe1,0x0a};
|
||||
*/
|
||||
unsigned char buf[124];
|
||||
|
||||
#define ADDR ((volatile unsigned *)&buf)
|
||||
|
||||
int start_kboot()
|
||||
{
|
||||
/* nand_read_ll(buf, 0, sizeof(buf));*/
|
||||
if(nand_read_ll(buf, 0, sizeof(buf))==-1) {
|
||||
blink_led();
|
||||
}
|
||||
|
||||
/*
|
||||
void (*fp)(void)=(void (*)(void))&buf;
|
||||
(fp)();
|
||||
*/
|
||||
|
||||
asm volatile("mov pc, %0\n"
|
||||
: /* output */
|
||||
:"r"(ADDR) /* input */
|
||||
|
||||
Reference in New Issue
Block a user