debug read nand(weekly report)

xiangfu xiangfu at
Sun Jul 13 07:22:32 CEST 2008

Andy Green wrote:
> What is size and NAND_BLOCK_MASK at this time?
/* configuration for 2440 with 2048byte sized flash */
#define NAND_PAGE_SIZE          2048
#define NAND_BLOCK_MASK         (NAND_PAGE_SIZE - 1)
#define NAND_BLOCK_SIZE         (NAND_PAGE_SIZE * 64)

i use the code uboot/cpu/arm920t/s3c24x0/nand_read.c.
i write this in my code:    nand_read_ll(buf,0x32000000,sizeof(buf));

this part of nand_read_ll:
  for (i=start_addr; i < (start_addr + size);) {
    if (i % NAND_BLOCK_SIZE == 0) {
      if (is_bad_block(i) ||
          is_bad_block(i + NAND_PAGE_SIZE)) {
        orange_on(1);-----------------------------it's always run here code.
        i += NAND_BLOCK_SIZE;
        size += NAND_BLOCK_SIZE;
    blue_on(1);------------------------------------never execute here code.
    j = nand_read_page_ll(buf, i);
    i += j;
    /*    buf += j;*/

the orange_on(1) and blue_on(1) write by me, that mean orange led on the 
parameter is blink times.
> For serial console debug, it's still a question about how to write to
> the serial device?
i want use serial console debug, but i still have no ideas about serial 
console ,
later will be better :-)

More information about the openmoko-kernel mailing list