• u-boot-2014.10移植(3)识别NOR Flash


    主要是将我们使用的nor flash 型号添加到jedec_table中
      File : drivers/mtd/jedec_flash.c

    jz2440    :MX29LV160DB       2M  id= 0x2249, MX29LV160B 宏需要自己添加

    #define MX29LV160B      0x2249

    mini2440  :SST29LV1601 (AM29LV160DB)   35sectors   id = 0x2249

    // for jz2440
                    {
                        .mfr_id        = MT_MANUFACT,
                        .dev_id        = MX29LV160B,
                        .name        = "MXIC MX29LV160B",
                        .uaddr        = {
                            [0] = MTD_UADDR_0x0AAA_0x0555,  /* x8 */
                            [1] = MTD_UADDR_0x0555_0x02AA,  /* x16 */
                        },
                        .DevSize    = SIZE_2MiB,
                        .CmdSet        = P_ID_AMD_STD,
                        .NumEraseRegions= 4,
                        .regions    = {
                        ERASEINFO(0x04000,1),
                        ERASEINFO(0x02000,2),
                        ERASEINFO(0x08000,1),
                        ERASEINFO(0x10000,31)
                        }
                    },
    // for mini2440
                    {
                        .mfr_id        = AMD_MANUFACT,
                        .dev_id        = AM29LV160DB,
                        .name        = "AMD AM29LV160DB",
                        .uaddr        = {
                            [0] = MTD_UADDR_0x0AAA_0x0555,  /* x8 */
                            [1] = MTD_UADDR_0x0555_0x02AA   /* x16 */
                        },
                        .DevSize    = SIZE_2MiB,
                        .CmdSet        = P_ID_AMD_STD,
                        .NumEraseRegions= 4,
                        .regions    = {
                            ERASEINFO(0x04000,1),
                            ERASEINFO(0x02000,2),
                            ERASEINFO(0x08000,1),
                            ERASEINFO(0x10000,31)
                        }
                    }, 

    在smdk2440.h里面把#define CONFIG_SYS_MAX_FLASH_SECT (19)   改成35
      
      再次编译并烧写:

    U-Boot 2014.10 (Nov 01 2018 - 11:32:28)
    
            CPUID: 32440001
            FCLK:      400 MHz
            HCLK:      100 MHz
            PCLK:       50 MHz
            DRAM:  64 MiB
            WARNING: Caches not enabled
            Flash: 2 MiB
            *** Warning - bad CRC, using default environment
            
            In:    serial
            Out:   serial
            Err:   serial
            Net:   CS8900-0
            Error: CS8900-0 address not set.
            
            Warning: Your board does not use generic board. Please read
            doc/README.generic-board and take action. Boards not
            upgraded by the late 2014 may break or be removed.

    可知, nor flash已经被正确识别,可以在smdk2440.h里面定义DEBUG宏看出更详细信息。
      
      去掉最后那个Warning, 在common/main.c  里面main_loop里面:

    #ifndef CONFIG_SYS_GENERIC_BOARD
                puts("Warning: Your board does not use generic board. Please read
    ");
                puts("doc/README.generic-board and take action. Boards not
    ");
                puts("upgraded by the late 2014 may break or be removed.
    ");
            #endif
  • 相关阅读:
    Jquery学习系列-制作Menu
    关于javascript里的parseInt() 与 parseFloaat() 文本转换为数字
    javascript简述
    【代码片段】HTML5基本结构及常用默认模版
    赋值运算符
    【代码片段】jQuery实现页面滚动时层智能浮动定位Fixed Floating Elements
    【代码片段】formLogin
    算数运算符
    关于javascript里的toFixed()方法格式化数字
    关于javascript里的setTimerout()设定时间
  • 原文地址:https://www.cnblogs.com/hulig7/p/9902094.html
Copyright © 2020-2023  润新知