Chinaunix首页 | 论坛 | 博客
  • 博客访问: 147277
  • 博文数量: 44
  • 博客积分: 2085
  • 博客等级: 大尉
  • 技术积分: 455
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-31 11:03
文章分类

全部博文(44)

文章存档

2013年(3)

2011年(8)

2010年(11)

2009年(22)

我的朋友

分类: 嵌入式

2009-07-31 12:14:15

Flash 型号:S29AL016D90TFI001

016是flash 的大小 16M bit, D90 是指flash 的速度。

 

Get the Flash Erase Block Size.

In boot:

  EVM # flinfo
   Bank # 1: MY AMD 29LV256M (256 Mbit)
     Size: 16 MB in 256 Sectors
     Sector Start Addresses:
       02000000        02010000        02020000   (RO) 02030000   (RO) 02040000
       02050000        02060000        02070000        02080000        02090000
       . .
       02FA0000        02FB0000        02FC0000        02FD0000        02FE0000
       02FF0000

You can calculate the erase size in Bytes by either:

1.(size/sectors) * 1024 * 1024 = (16/256) * 1024 * 1024 = 65536 bytes (0x10000)

NOTE that size and sectors are obtained from the "Size:" line in the flinfo output

2.Observing the difference between two adjacent sectors. i.e.

0x2010000 - 0x2000000 = 0x10000

 

In linux:

target$ cat /proc/mtd
   dev:    size   erasesize  name
   mtd0: 00020000 00010000 "bootloader"
   mtd1: 00020000 00010000 "params"
   mtd2: 00400000 00010000 "kernel"
   mtd3: 00bc0000 00010000 "filesystem"

The above output displays the erase block size for the various partitions in the erasesize field. For this example the erase block size woulde be 0x10000.

 

开发板增加了一片 flash , 现在有两片flash 所以要修改 boot .

# vi package/devs/flash/arm/w90n740/current/src/arm_w90n740_flash.c

    #define CYGNUM_FLASH_INTERLEAVE  (1)       ---flash的片数

改为  #define CYGNUM_FLASH_INTERLEAVE  (2)

该文件的其它宏:

#define CYGNUM_FLASH_BASE       (0xff000000u)          ---基地址
#define CYGNUM_FLASH_WIDTH      (16)                    
---位宽

阅读(7230) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:硬连接(ln)和符号连接(ln -s)

给主人留下些什么吧!~~