Index: firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c =================================================================== --- firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c (Revision 23608) +++ firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c (Arbeitskopie) @@ -31,6 +31,7 @@ #include #include "led.h" +#define WFIFO_DELAY volatile int delaycounter;for(delaycounter=0;delaycounter<3500;delaycounter++); #define NAND_CMD_READ 0x00 #define NAND_CMD_PROGCNFRM 0x10 @@ -188,6 +189,7 @@ if (nand_send_cmd(NAND_CMD_RESET)) return 1; if (nand_wait_chip_ready(bank)) return 1; FMCTRL1 = FMCTRL1_CLEARRFIFO | FMCTRL1_CLEARWFIFO; + WFIFO_DELAY; return 0; } @@ -198,6 +200,7 @@ if ((FMCSTAT & (FMCSTAT_BANK0READY << bank))) FMCSTAT = (FMCSTAT_BANK0READY << bank); FMCTRL1 = FMCTRL1_CLEARRFIFO | FMCTRL1_CLEARWFIFO; + WFIFO_DELAY; if (nand_send_cmd(NAND_CMD_GET_STATUS)) return 1; while (1) { @@ -234,6 +237,7 @@ if (!direction) invalidate_dcache(); if (nand_wait_addrdone()) return 1; if (!direction) FMCTRL1 = FMCTRL1_CLEARRFIFO | FMCTRL1_CLEARWFIFO; + WFIFO_DELAY; return 0; } @@ -299,6 +303,7 @@ if (nand_wait_addrdone()) return nand_unlock(0xFFFFFFFF); result = FMFIFO; FMCTRL1 = FMCTRL1_CLEARRFIFO | FMCTRL1_CLEARWFIFO; + WFIFO_DELAY; return nand_unlock(result); }