Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
90e260c8
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
90e260c8
编写于
5月 19, 2005
作者:
T
Thomas Gleixner
提交者:
Thomas Gleixner
5月 23, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MTD] NAND: Honour autoplacement schemes supplied by the caller
Signed-off-by:
N
Thomas Gleixner
<
tglx@linutronix.de
>
上级
a69dde91
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
3 deletion
+10
-3
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_base.c
+8
-2
include/mtd/mtd-abi.h
include/mtd/mtd-abi.h
+2
-1
未找到文件。
drivers/mtd/nand/nand_base.c
浏览文件 @
90e260c8
...
...
@@ -59,7 +59,7 @@
* The AG-AND chips have nice features for speed improvement,
* which are not supported yet. Read / program 4 pages in one go.
*
* $Id: nand_base.c,v 1.14
2 2005/04/11 14:16:07 lavinen
Exp $
* $Id: nand_base.c,v 1.14
3 2005/05/19 16:10:22 gleixner
Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
...
...
@@ -1195,7 +1195,8 @@ int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
}
/* get oob area, if we have no oob buffer from fs-driver */
if
(
!
oob_buf
||
oobsel
->
useecc
==
MTD_NANDECC_AUTOPLACE
)
if
(
!
oob_buf
||
oobsel
->
useecc
==
MTD_NANDECC_AUTOPLACE
||
oobsel
->
useecc
==
MTD_NANDECC_AUTOPL_USR
)
oob_data
=
&
this
->
data_buf
[
end
];
eccsteps
=
this
->
eccsteps
;
...
...
@@ -1284,6 +1285,7 @@ int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
/* without autoplace. Legacy mode used by YAFFS1 */
switch
(
oobsel
->
useecc
)
{
case
MTD_NANDECC_AUTOPLACE
:
case
MTD_NANDECC_AUTOPL_USR
:
/* Walk through the autoplace chunks */
for
(
i
=
0
;
oobsel
->
oobfree
[
i
][
1
];
i
++
)
{
int
from
=
oobsel
->
oobfree
[
i
][
0
];
...
...
@@ -1645,6 +1647,8 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
oobsel
=
this
->
autooob
;
autoplace
=
1
;
}
if
(
oobsel
->
useecc
==
MTD_NANDECC_AUTOPL_USR
)
autoplace
=
1
;
/* Setup variables and oob buffer */
totalpages
=
len
>>
this
->
page_shift
;
...
...
@@ -1919,6 +1923,8 @@ static int nand_writev_ecc (struct mtd_info *mtd, const struct kvec *vecs, unsig
oobsel
=
this
->
autooob
;
autoplace
=
1
;
}
if
(
oobsel
->
useecc
==
MTD_NANDECC_AUTOPL_USR
)
autoplace
=
1
;
/* Setup start page */
page
=
(
int
)
(
to
>>
this
->
page_shift
);
...
...
include/mtd/mtd-abi.h
浏览文件 @
90e260c8
/*
* $Id: mtd-abi.h,v 1.1
0 2005/02/09 09:17:42 pavlov
Exp $
* $Id: mtd-abi.h,v 1.1
1 2005/05/19 16:08:58 gleixner
Exp $
*
* Portions of MTD ABI definition which are shared by kernel and user space
*/
...
...
@@ -61,6 +61,7 @@ struct mtd_oob_buf {
#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode)
#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme
#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read)
#define MTD_NANDECC_AUTOPL_USR 4 // Use the given autoplacement scheme rather than using the default
/* OTP mode selection */
#define MTD_OTP_OFF 0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录