Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
5e81e88a
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
5e81e88a
编写于
2月 26, 2010
作者:
D
David Woodhouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident()
Signed-off-by:
N
David Woodhouse
<
David.Woodhouse@intel.com
>
上级
9fc51a37
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
30 addition
and
26 deletion
+30
-26
drivers/mtd/nand/atmel_nand.c
drivers/mtd/nand/atmel_nand.c
+1
-1
drivers/mtd/nand/bcm_umi_nand.c
drivers/mtd/nand/bcm_umi_nand.c
+1
-1
drivers/mtd/nand/cafe_nand.c
drivers/mtd/nand/cafe_nand.c
+1
-1
drivers/mtd/nand/davinci_nand.c
drivers/mtd/nand/davinci_nand.c
+1
-1
drivers/mtd/nand/fsl_elbc_nand.c
drivers/mtd/nand/fsl_elbc_nand.c
+1
-1
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/mxc_nand.c
+1
-1
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_base.c
+15
-14
drivers/mtd/nand/s3c2410.c
drivers/mtd/nand/s3c2410.c
+2
-1
drivers/mtd/nand/sh_flctl.c
drivers/mtd/nand/sh_flctl.c
+1
-1
drivers/mtd/nand/sm_common.c
drivers/mtd/nand/sm_common.c
+1
-1
drivers/mtd/nand/socrates_nand.c
drivers/mtd/nand/socrates_nand.c
+1
-1
drivers/mtd/nand/txx9ndfmc.c
drivers/mtd/nand/txx9ndfmc.c
+1
-1
include/linux/mtd/nand.h
include/linux/mtd/nand.h
+3
-1
未找到文件。
drivers/mtd/nand/atmel_nand.c
浏览文件 @
5e81e88a
...
...
@@ -474,7 +474,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
}
/* first scan to find the device and get the page size */
if
(
nand_scan_ident
(
mtd
,
1
))
{
if
(
nand_scan_ident
(
mtd
,
1
,
NULL
))
{
res
=
-
ENXIO
;
goto
err_scan_ident
;
}
...
...
drivers/mtd/nand/bcm_umi_nand.c
浏览文件 @
5e81e88a
...
...
@@ -446,7 +446,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev)
* layout we'll be using.
*/
err
=
nand_scan_ident
(
board_mtd
,
1
);
err
=
nand_scan_ident
(
board_mtd
,
1
,
NULL
);
if
(
err
)
{
printk
(
KERN_ERR
"nand_scan failed: %d
\n
"
,
err
);
iounmap
(
bcm_umi_io_base
);
...
...
drivers/mtd/nand/cafe_nand.c
浏览文件 @
5e81e88a
...
...
@@ -761,7 +761,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
cafe_readl
(
cafe
,
GLOBAL_CTRL
),
cafe_readl
(
cafe
,
GLOBAL_IRQ_MASK
));
/* Scan to find existence of the device */
if
(
nand_scan_ident
(
mtd
,
2
))
{
if
(
nand_scan_ident
(
mtd
,
2
,
NULL
))
{
err
=
-
ENXIO
;
goto
out_irq
;
}
...
...
drivers/mtd/nand/davinci_nand.c
浏览文件 @
5e81e88a
...
...
@@ -690,7 +690,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
spin_unlock_irq
(
&
davinci_nand_lock
);
/* Scan to find existence of the device(s) */
ret
=
nand_scan_ident
(
&
info
->
mtd
,
pdata
->
mask_chipsel
?
2
:
1
);
ret
=
nand_scan_ident
(
&
info
->
mtd
,
pdata
->
mask_chipsel
?
2
:
1
,
NULL
);
if
(
ret
<
0
)
{
dev_dbg
(
&
pdev
->
dev
,
"no NAND chip(s) found
\n
"
);
goto
err_scan
;
...
...
drivers/mtd/nand/fsl_elbc_nand.c
浏览文件 @
5e81e88a
...
...
@@ -891,7 +891,7 @@ static int __devinit fsl_elbc_chip_probe(struct fsl_elbc_ctrl *ctrl,
if
(
ret
)
goto
err
;
ret
=
nand_scan_ident
(
&
priv
->
mtd
,
1
);
ret
=
nand_scan_ident
(
&
priv
->
mtd
,
1
,
NULL
);
if
(
ret
)
goto
err
;
...
...
drivers/mtd/nand/mxc_nand.c
浏览文件 @
5e81e88a
...
...
@@ -819,7 +819,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
}
/* first scan to find the device and get the page size */
if
(
nand_scan_ident
(
mtd
,
1
))
{
if
(
nand_scan_ident
(
mtd
,
1
,
NULL
))
{
err
=
-
ENXIO
;
goto
escan
;
}
...
...
drivers/mtd/nand/nand_base.c
浏览文件 @
5e81e88a
...
...
@@ -2766,10 +2766,10 @@ static void nand_set_defaults(struct nand_chip *chip, int busw)
*/
static
struct
nand_flash_dev
*
nand_get_flash_type
(
struct
mtd_info
*
mtd
,
struct
nand_chip
*
chip
,
int
busw
,
int
*
maf_id
)
int
busw
,
int
*
maf_id
,
struct
nand_flash_dev
*
type
)
{
struct
nand_flash_dev
*
type
=
NULL
;
int
i
,
dev_id
,
maf_idx
;
int
dev_id
,
maf_idx
;
int
tmp_id
,
tmp_manf
;
/* Select the device */
...
...
@@ -2808,15 +2808,14 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
return
ERR_PTR
(
-
ENODEV
);
}
/* Lookup the flash id */
for
(
i
=
0
;
nand_flash_ids
[
i
].
name
!=
NULL
;
i
++
)
{
if
(
dev_id
==
nand_flash_ids
[
i
].
id
)
{
type
=
&
nand_flash_ids
[
i
];
break
;
}
}
if
(
!
type
)
type
=
nand_flash_ids
;
for
(;
type
->
name
!=
NULL
;
type
++
)
if
(
dev_id
==
type
->
id
)
break
;
if
(
!
type
->
name
)
return
ERR_PTR
(
-
ENODEV
);
if
(
!
mtd
->
name
)
...
...
@@ -2926,13 +2925,15 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
* nand_scan_ident - [NAND Interface] Scan for the NAND device
* @mtd: MTD device structure
* @maxchips: Number of chips to scan for
* @table: Alternative NAND ID table
*
* This is the first phase of the normal nand_scan() function. It
* reads the flash ID and sets up MTD fields accordingly.
*
* The mtd->owner field must be set to the module of the caller.
*/
int
nand_scan_ident
(
struct
mtd_info
*
mtd
,
int
maxchips
)
int
nand_scan_ident
(
struct
mtd_info
*
mtd
,
int
maxchips
,
struct
nand_flash_dev
*
table
)
{
int
i
,
busw
,
nand_maf_id
;
struct
nand_chip
*
chip
=
mtd
->
priv
;
...
...
@@ -2944,7 +2945,7 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips)
nand_set_defaults
(
chip
,
busw
);
/* Read the flash type */
type
=
nand_get_flash_type
(
mtd
,
chip
,
busw
,
&
nand_maf_id
);
type
=
nand_get_flash_type
(
mtd
,
chip
,
busw
,
&
nand_maf_id
,
table
);
if
(
IS_ERR
(
type
))
{
if
(
!
(
chip
->
options
&
NAND_SCAN_SILENT_NODEV
))
...
...
@@ -3235,7 +3236,7 @@ int nand_scan(struct mtd_info *mtd, int maxchips)
BUG
();
}
ret
=
nand_scan_ident
(
mtd
,
maxchips
);
ret
=
nand_scan_ident
(
mtd
,
maxchips
,
NULL
);
if
(
!
ret
)
ret
=
nand_scan_tail
(
mtd
);
return
ret
;
...
...
drivers/mtd/nand/s3c2410.c
浏览文件 @
5e81e88a
...
...
@@ -1013,7 +1013,8 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
s3c2410_nand_init_chip
(
info
,
nmtd
,
sets
);
nmtd
->
scan_res
=
nand_scan_ident
(
&
nmtd
->
mtd
,
(
sets
)
?
sets
->
nr_chips
:
1
);
(
sets
)
?
sets
->
nr_chips
:
1
,
NULL
);
if
(
nmtd
->
scan_res
==
0
)
{
s3c2410_nand_update_chip
(
info
,
nmtd
);
...
...
drivers/mtd/nand/sh_flctl.c
浏览文件 @
5e81e88a
...
...
@@ -825,7 +825,7 @@ static int __init flctl_probe(struct platform_device *pdev)
nand
->
select_chip
=
flctl_select_chip
;
nand
->
cmdfunc
=
flctl_cmdfunc
;
ret
=
nand_scan_ident
(
flctl_mtd
,
1
);
ret
=
nand_scan_ident
(
flctl_mtd
,
1
,
NULL
);
if
(
ret
)
goto
err
;
...
...
drivers/mtd/nand/sm_common.c
浏览文件 @
5e81e88a
...
...
@@ -75,7 +75,7 @@ int sm_register_device(struct mtd_info *mtd)
chip
->
options
|=
NAND_SKIP_BBTSCAN
|
NAND_SMARTMEDIA
;
/* Scan for card properties */
ret
=
nand_scan_ident
(
mtd
,
1
);
ret
=
nand_scan_ident
(
mtd
,
1
,
NULL
);
if
(
ret
)
return
ret
;
...
...
drivers/mtd/nand/socrates_nand.c
浏览文件 @
5e81e88a
...
...
@@ -220,7 +220,7 @@ static int __devinit socrates_nand_probe(struct of_device *ofdev,
dev_set_drvdata
(
&
ofdev
->
dev
,
host
);
/* first scan to find the device and get the page size */
if
(
nand_scan_ident
(
mtd
,
1
))
{
if
(
nand_scan_ident
(
mtd
,
1
,
NULL
))
{
res
=
-
ENXIO
;
goto
out
;
}
...
...
drivers/mtd/nand/txx9ndfmc.c
浏览文件 @
5e81e88a
...
...
@@ -274,7 +274,7 @@ static int txx9ndfmc_nand_scan(struct mtd_info *mtd)
struct
nand_chip
*
chip
=
mtd
->
priv
;
int
ret
;
ret
=
nand_scan_ident
(
mtd
,
1
);
ret
=
nand_scan_ident
(
mtd
,
1
,
NULL
);
if
(
!
ret
)
{
if
(
mtd
->
writesize
>=
512
)
{
chip
->
ecc
.
size
=
mtd
->
writesize
;
...
...
include/linux/mtd/nand.h
浏览文件 @
5e81e88a
...
...
@@ -25,11 +25,13 @@
#include <linux/mtd/bbm.h>
struct
mtd_info
;
struct
nand_flash_dev
;
/* Scan and identify a NAND device */
extern
int
nand_scan
(
struct
mtd_info
*
mtd
,
int
max_chips
);
/* Separate phases of nand_scan(), allowing board driver to intervene
* and override command or ECC setup according to flash type */
extern
int
nand_scan_ident
(
struct
mtd_info
*
mtd
,
int
max_chips
);
extern
int
nand_scan_ident
(
struct
mtd_info
*
mtd
,
int
max_chips
,
struct
nand_flash_dev
*
table
);
extern
int
nand_scan_tail
(
struct
mtd_info
*
mtd
);
/* Free resources held by the NAND device */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录