您的位置:首页 > 其它

u-boot移植(五)添加norflash支持

2011-12-25 20:34 260 查看
添加nor flash移植

开发板使用的是spansion的s29al016m芯片,数据手册和amd的AM29LV160芯片相同,所以添加对am28al160的支持

a) include/configs/mini2440.h文件,

修改1:选择AMD_LV160芯片

#define CONFIG_AMD_LV160DB 1 /* uncomment this if you have a LV400 flash */

#if 0

#define CONFIG_AMD_LV400 1 /* uncomment this if you have a LV800 flash */

#define CONFIG_AMD_LV800 1 /* uncomment this if you have a LV800 flash */

#endif

修改2:配置AM_LV160相关参数

#ifdef CONFIG_AMD_LV160DB

#define PHYS_FLASH_SIZE 0x00200000 /* 512KB */

#define CONFIG_SYS_MAX_FLASH_SECT (35) /* max number of sectors on one chip */

#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x1F0000) /* addr of environment */

#endif

b) board/Samsung/mini2440/flash.c文件

修改1:

74 #elif defined(CONFIG_AMD_LV160DB)

75 (AMD_MANUFACT & FLASH_VENDMASK) |

76 (AMD_ID_LV160DB & FLASH_TYPEMASK);

修改2:

144 case (AMD_ID_LV160DB & FLASH_TYPEMASK):

145 printf ("1x Amd29LV160DB (16Mbit)\n");

146 break;

c) include/flash.h文件

修改1:213行,修改如下

212 #define AMD_ID_LV160DT 0x22C422C4 /* 29LV160T ID (16 M, top boot sector) */

213 #define AMD_ID_LV160DB 0x22492249 /* 29LV160B ID (16 M, bottom boot sect) */
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: