主题 : 【分享】mini2440 Norflash驱动移植过程 复制链接 | 浏览器收藏 | 打印
畅游在知识的海洋...
级别: 论坛版主
UID: 33629
精华: 4
发帖: 554
金钱: 3075 两
威望: 615 点
贡献值: 5 点
综合积分: 1188 分
注册时间: 2010-12-03
最后登录: 2015-09-22
楼主  发表于: 2011-11-28 13:44

 【分享】mini2440 Norflash驱动移植过程

我不知道友善linux2.6.32的内核是否支持了mini2440的norflash,我在这里还是亲自的把mini2440的norflash支持上。移植过程分享如下:
            
.添加配置项
1
、修改 drivers/mtd/maps/Kconfig文件,config_EDB7312配置项下添加如下内容:
config
MTD_MINI2440
tristate
"CFI Flash device mapped onMINI2440"
depends
on ARM && MTD_CFI
help
This
enables access to the CFI Flash on the CogentMINI2440 board.
If
you have such a board, say 'Y' here.
2
、修改 drivers/mtd/maps/Makefile文件,obj-$(CONFIG_MTD_EDB7312)+= edb7312.o添加如下内容:
obj-$(CONFIG_MTD_MINI2440)+=
mini2440.o
3
、复制驱动文件mini2440.cdrivers/mtd/maps目录下
.配置编译内核
#
make menuconfig
以下内容必选:
Memory
Technology Devices(MTD)-->
<*>Memory
Technology Device (MTD) support
[*]MTD
partitioning support
   <*>Direct
char device access to MTD devices
   <*>Caching
block device access to MTD devices
RAM/ROM/Flash
chip drivers-->
   <*>Detect
flash chips by Common Flash Interface (CFI) probe
   <*>Support
for Inter/Sharp flash chips
   <*>Supportfor AMD/Fujitsu/Spansion flash chips

   <*>CFI flash device mapped on mini2440
下列内容(flash上架fat16/fat32/ntfs/ext2等文件系统时才需要选上)不要选,否则会出现加载驱动模块时会出现ftl_cs:FTL header not found.
DeviceDrivers ->
  Memory Technology Devices (MTD) ->
      <>FTL (Flash Translation Layer) support
       <> NFTL(NAND Flash Translation Layer) support
       <>INFTL(Inverse NAND Flash Translation Layer) support

.根据edb7312单板的norflash驱动(linux/mtd/maps/edb7312.c)来写mini2440norflash驱动
代码在mini2440.c(带详细注释)
本部分内容设定了隐藏,需要回复后才能看到



[ 此帖被wuweidong在2011-11-28 14:05重新编辑 ]
好好学习,天天鲁管
级别: 新手上路
UID: 7600
精华: 0
发帖: 33
金钱: 165 两
威望: 33 点
贡献值: 0 点
综合积分: 66 分
注册时间: 2009-07-21
最后登录: 2013-06-07
1楼  发表于: 2011-12-02 15:52
顶起来~~