Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
783ed81f
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
783ed81f
编写于
6月 14, 2006
作者:
A
Artem B. Bityutskiy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MTD] assume mtd->writesize is 1 for NOR flashes
Signed-off-by: Artem B. Bityitskiy
上级
f9068876
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
13 addition
and
3 deletion
+13
-3
drivers/mtd/chips/amd_flash.c
drivers/mtd/chips/amd_flash.c
+1
-0
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/cfi_cmdset_0002.c
+1
-0
drivers/mtd/chips/sharp.c
drivers/mtd/chips/sharp.c
+1
-0
drivers/mtd/devices/lart.c
drivers/mtd/devices/lart.c
+1
-0
drivers/mtd/devices/m25p80.c
drivers/mtd/devices/m25p80.c
+1
-0
drivers/mtd/devices/mtdram.c
drivers/mtd/devices/mtdram.c
+1
-0
drivers/mtd/mtdcore.c
drivers/mtd/mtdcore.c
+1
-0
include/linux/mtd/mtd.h
include/linux/mtd/mtd.h
+6
-3
未找到文件。
drivers/mtd/chips/amd_flash.c
浏览文件 @
783ed81f
...
...
@@ -730,6 +730,7 @@ static struct mtd_info *amd_flash_probe(struct map_info *map)
offset
+=
dev_size
;
}
mtd
->
type
=
MTD_NORFLASH
;
mtd
->
writesize
=
1
;
mtd
->
flags
=
MTD_CAP_NORFLASH
;
mtd
->
name
=
map
->
name
;
mtd
->
erase
=
amd_flash_erase
;
...
...
drivers/mtd/chips/cfi_cmdset_0002.c
浏览文件 @
783ed81f
...
...
@@ -236,6 +236,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
mtd
->
resume
=
cfi_amdstd_resume
;
mtd
->
flags
=
MTD_CAP_NORFLASH
;
mtd
->
name
=
map
->
name
;
mtd
->
writesize
=
1
;
if
(
cfi
->
cfi_mode
==
CFI_MODE_CFI
){
unsigned
char
bootloc
;
...
...
drivers/mtd/chips/sharp.c
浏览文件 @
783ed81f
...
...
@@ -140,6 +140,7 @@ static struct mtd_info *sharp_probe(struct map_info *map)
mtd
->
suspend
=
sharp_suspend
;
mtd
->
resume
=
sharp_resume
;
mtd
->
flags
=
MTD_CAP_NORFLASH
;
mtd
->
writesize
=
1
;
mtd
->
name
=
map
->
name
;
memset
(
sharp
,
0
,
sizeof
(
*
sharp
));
...
...
drivers/mtd/devices/lart.c
浏览文件 @
783ed81f
...
...
@@ -635,6 +635,7 @@ int __init lart_flash_init (void)
printk
(
"%s: This looks like a LART board to me.
\n
"
,
module_name
);
mtd
.
name
=
module_name
;
mtd
.
type
=
MTD_NORFLASH
;
mtd
.
writesize
=
1
;
mtd
.
flags
=
MTD_CAP_NORFLASH
;
mtd
.
size
=
FLASH_BLOCKSIZE_PARAM
*
FLASH_NUMBLOCKS_16m_PARAM
+
FLASH_BLOCKSIZE_MAIN
*
FLASH_NUMBLOCKS_16m_MAIN
;
mtd
.
erasesize
=
FLASH_BLOCKSIZE_MAIN
;
...
...
drivers/mtd/devices/m25p80.c
浏览文件 @
783ed81f
...
...
@@ -465,6 +465,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
flash
->
mtd
.
name
=
spi
->
dev
.
bus_id
;
flash
->
mtd
.
type
=
MTD_NORFLASH
;
flash
->
mtd
.
writesize
=
1
;
flash
->
mtd
.
flags
=
MTD_CAP_NORFLASH
;
flash
->
mtd
.
size
=
info
->
sector_size
*
info
->
n_sectors
;
flash
->
mtd
.
erasesize
=
info
->
sector_size
;
...
...
drivers/mtd/devices/mtdram.c
浏览文件 @
783ed81f
...
...
@@ -106,6 +106,7 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,
mtd
->
type
=
MTD_GENERIC_TYPE
;
mtd
->
flags
=
MTD_CAP_RAM
;
mtd
->
size
=
size
;
mtd
->
writesize
=
1
;
mtd
->
erasesize
=
MTDRAM_ERASE_SIZE
;
mtd
->
priv
=
mapped_address
;
...
...
drivers/mtd/mtdcore.c
浏览文件 @
783ed81f
...
...
@@ -47,6 +47,7 @@ int add_mtd_device(struct mtd_info *mtd)
{
int
i
;
BUG_ON
(
mtd
->
writesize
==
0
);
mutex_lock
(
&
mtd_table_mutex
);
for
(
i
=
0
;
i
<
MAX_MTD_DEVICES
;
i
++
)
...
...
include/linux/mtd/mtd.h
浏览文件 @
783ed81f
...
...
@@ -110,9 +110,12 @@ struct mtd_info {
* information below if they desire
*/
u_int32_t
erasesize
;
/* Smallest availlable size for writing to the device. For NAND,
* this is the page size, for some NOR chips, the size of ECC
* covered blocks.
/* Minimal writable flash unit size. In case of NOR flash it is 1 (even
* though individual bits can be cleared), in case of NAND flash it is
* one NAND page (or half, or one-fourths of it), in case of ECC-ed NOR
* it is of ECC block size, etc. It is illegal to have writesize = 0.
* Any driver registering a struct mtd_info must ensure a writesize of
* 1 or larger.
*/
u_int32_t
writesize
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录