This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM8147 nand flash启动异常的问题 急!



硬件信息:CPU:DM8147
   NAND FLASH:MT29F4G16

DM8147使用NAND FLASH启动停止在1级uboot当中,串口显示如下:
U-Boot 2010.06

TI8148-GP rev 2.1

ARM clk: 720MHz
DSP clk: 600MHz
DDR clk: 333MHz

DRAM:  2 GiB
NAND:  ____停留在此

根据printf打印跟踪最终确定代码停留在drivers/mtd/nand/ti81xx_nand.c中:
 while (cs < GPMC_MAX_CS) {
  /* Check if NAND type is set */
  if ((readl(&gpmc_cfg->cs[cs].config1) & 0xC00) == 0x800)  //gpmc_cfg地址为0x0,循环无法跳出


几点补充:
1、nand flash相关的初始化代码未作修改,使用make CROSS_COMPILE=arm-none-linux-gnueabi-

ARCH=arm ti8148_evm_min_nand进行u-boot.min.nand文件编译,使用SD进行镜像文件烧写。
2、同样的代码在u-boot.bin中能够正确传递gpmc_cfg = 0x50000000,并且能正确识别、初始化NAND

FLASH。
3、在2级uboot中使用nand read、nand write等命令均能正确执行。
4、另外在调试过程中发现1级uboot中使用malloc申请内存返回值为0。

是否硬件有特殊要求?或者是代码优化过度?请高手指点,非常感谢。