TI中文支持网
TI专业的中文技术问题搜集分享网站

SD启动却加载不了u-boot.img文件

具体问题和这篇帖子一样:   http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/71837.aspx

新做开发板有1/20机会可以启动成功,包括uboot读写nand 、DDR,

大部分是在MLO  MMC 初始化卡死,在 gpmc_init中

void gpmc_init(void)
{
/* putting a blanket check on GPMC based on ZeBu for now */
gpmc_cfg = (struct gpmc *)GPMC_BASE;

#if defined(CONFIG_CMD_NAND) || defined(CONFIG_NOR)
const u32 *gpmc_config = NULL;
u32 base = 0;
u32 size = 0;
#endif
/* global settings */
printf("========10=======readl(GPMC_REVISION) = %x\n",readl(0x50000000));
printf("========11=======%x %x\n",&gpmc_cfg,&gpmc_cfg->sysconfig);  // 打印的寄存器地址出错, 只是偏移地址 (正常是  0x50000000 + 偏移地址)

writel(0x00000008, &gpmc_cfg->sysconfig);       // 这样写寄存器卡死,由于地址造成
writel(0x00000008, 0x50000010);                       // 这样写寄存器 不会卡死
debug("========12=======\n");
#ifdef CONFIG_NOR
debug("========13=======\n");
writel(0x00000000, &gpmc_cfg->irqstatus);
writel(0x00000000, &gpmc_cfg->irqenable);
writel(0x00000A00, &gpmc_cfg->config);
#else
printf("========14======%x %x %x=\n",&gpmc_cfg->irqstatus,&gpmc_cfg->irqenable,&gpmc_cfg->config);   // 打印的寄存器地址出错, 只是偏移地址

writel(0x00000100, &gpmc_cfg->irqstatus);    // 这样写寄存器卡死,由于地址造成
writel(0x00000100, 0x50000018);  // 这样写寄存器 不会卡死
writel(0x00000200, 0x5000001c);//&gpmc_cfg->irqenable); 
writel(0x00000012, 0x50000050);//&gpmc_cfg->config);
#endif
debug("========15=======%x\n",&gpmc_cfg->cs[0].config7);
/*
* Disable the GPMC0 config set by ROM code
*/
writel(0, 0x50000078);//&gpmc_cfg->cs[0].config7);
sdelay(1000);
debug("========16=======\n");
#ifdef CONFIG_CMD_NAND
debug("========17=======\n");
gpmc_config = gpmc_m_nand;

base = PISMO1_NAND_BASE;
size = PISMO1_NAND_SIZE;
enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
#endif

#ifdef CONFIG_NOR
debug("========18=======\n");
/* NOR – CS0 */
gpmc_config = gpmc_nor;
base = CONFIG_SYS_FLASH_BASE;
size = GPMC_SIZE_16M;
enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
writel(0x00000a00, 0x50000050);
#endif
}

Jian Zhou:

这个卡死地方不是MMC的初始化,而是NAND的初始化,定位到卡死在哪个部分了?

赞(0)
未经允许不得转载:TI中文支持网 » SD启动却加载不了u-boot.img文件
分享到: 更多 (0)