关于AM335X uboot启动的时候找不到nand的问题

  关于AM335X uboot启动的时候找不到nand的问题

/******************************************************************

*      author:       卢浩

*      time:         2013.04.01

*      environment:   ubuntu10.04LTS +TI AM3359

*      kernel version:  linux-3.2

*      QQ Group For Technology Exchange122879839

******************************************************************/



U-Boot SPL 2011.09 (Apr 01 2013 - 01:29:02)

Texas Instruments Revision detection unimplemented
No daughter card present
Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img


U-Boot 2011.09 (Apr 01 2013 - 01:42:41)

I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
NAND:  HW ECC Hamming Code selected
No NAND device found!!!
0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Net:   cpsw
Hit any key to stop autoboot:  0

U-Boot#


这是TI官方的配置在我板子上跑的打印信息,实际上这并不是nand驱动的问题,ti的板子上有个eeprom,我们自己的板子没有,所有读不到相应的信息,这个时候我们就选择性的把代码里关于读取eeprom的相关代码注释掉就是了。

文件目录是board/ti/am335x/evm.c

int read_eeprom(void)
{
        /* Check if baseboard eeprom is available */
    if (i2c_probe(I2C_BASE_BOARD_ADDR)) {
        printf("Could not probe the EEPROM; something fundamentally "
            "wrong on the I2C bus.\n");
        return 1;
    }

    /* read the eeprom using i2c */
    if (i2c_read(I2C_BASE_BOARD_ADDR, 0, 2, (uchar *)&header,
                            sizeof(header))) {
        printf("Could not read the EEPROM; something fundamentally"
            " wrong on the I2C bus.\n");
        return 1;
    }

    if (header.magic != 0xEE3355AA) {
        /* read the eeprom using i2c again, but use only a 1 byte address */
        if (i2c_read(I2C_BASE_BOARD_ADDR, 0, 1, (uchar *)&header,
                                sizeof(header))) {
            printf("Could not read the EEPROM; something fundamentally"
                " wrong on the I2C bus.\n");
            return 1;
        }

        if (header.magic != 0xEE3355AA) {
            printf("Incorrect magic number in EEPROM\n");
            return 1;
        }
    }
    return 0;
}

以上是用来读取eeprom的。

我们把707行开始的三句话注释掉:

//    if (read_eeprom()) {
//        printf("read_eeprom() failure. continuing with ddr3\n");
//    }

再把800行开始的两句话注释掉:

//    if (read_eeprom())
//        goto err_out;

一共注释五句话,保存,编译uboot,收工。把编译好的文件放到板子上运行:

U-Boot SPL 2011.09 (Apr 01 2013 - 01:29:02)
Texas Instruments Revision detection unimplemented
No daughter card present
Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img


U-Boot 2011.09 (Apr 01 2013 - 01:57:52)

I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
No daughter card present
Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board
NAND:  HW ECC Hamming Code selected
256 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - bad CRC, using default environment

Net:   cpsw
Hit any key to stop autoboot:  0
SD/MMC found on device 0
reading uEnv.txt


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值