Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a15bdeef
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a15bdeef
编写于
5月 08, 2006
作者:
D
David Woodhouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove use of inter_module_crap in NOR flash chip drivers.
Signed-off-by:
N
David Woodhouse
<
dwmw2@infradead.org
>
上级
396674e5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
20 addition
and
93 deletion
+20
-93
drivers/mtd/chips/Kconfig
drivers/mtd/chips/Kconfig
+0
-1
drivers/mtd/chips/Makefile
drivers/mtd/chips/Makefile
+0
-7
drivers/mtd/chips/amd_flash.c
drivers/mtd/chips/amd_flash.c
+0
-7
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0001.c
+7
-29
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/cfi_cmdset_0002.c
+1
-20
drivers/mtd/chips/cfi_cmdset_0020.c
drivers/mtd/chips/cfi_cmdset_0020.c
+0
-16
drivers/mtd/chips/gen_probe.c
drivers/mtd/chips/gen_probe.c
+12
-13
未找到文件。
drivers/mtd/chips/Kconfig
浏览文件 @
a15bdeef
...
...
@@ -30,7 +30,6 @@ config MTD_JEDECPROBE
config MTD_GEN_PROBE
tristate
select OBSOLETE_INTERMODULE
config MTD_CFI_ADV_OPTIONS
bool "Flash chip driver advanced configuration options"
...
...
drivers/mtd/chips/Makefile
浏览文件 @
a15bdeef
...
...
@@ -3,13 +3,6 @@
#
# $Id: Makefile.common,v 1.5 2005/11/07 11:14:22 gleixner Exp $
# *** BIG UGLY NOTE ***
#
# The removal of get_module_symbol() and replacement with
# inter_module_register() et al has introduced a link order dependency
# here where previously there was none. We now have to ensure that
# the CFI command set drivers are linked before gen_probe.o
obj-$(CONFIG_MTD)
+=
chipreg.o
obj-$(CONFIG_MTD_AMDSTD)
+=
amd_flash.o
obj-$(CONFIG_MTD_CFI)
+=
cfi_probe.o
...
...
drivers/mtd/chips/amd_flash.c
浏览文件 @
a15bdeef
...
...
@@ -97,7 +97,6 @@ struct amd_flash_private {
int
interleave
;
int
numchips
;
unsigned
long
chipshift
;
// const char *im_name;
struct
flchip
chips
[
0
];
};
...
...
@@ -131,12 +130,6 @@ static struct mtd_chip_driver amd_flash_chipdrv = {
.
module
=
THIS_MODULE
};
static
const
char
im_name
[]
=
"amd_flash"
;
static
inline
__u32
wide_read
(
struct
map_info
*
map
,
__u32
addr
)
{
if
(
map
->
buswidth
==
1
)
{
...
...
drivers/mtd/chips/cfi_cmdset_0001.c
浏览文件 @
a15bdeef
...
...
@@ -331,13 +331,6 @@ read_pri_intelext(struct map_info *map, __u16 adr)
return
extp
;
}
/* This routine is made available to other mtd code via
* inter_module_register. It must only be accessed through
* inter_module_get which will bump the use count of this module. The
* addresses passed back in cfi are valid as long as the use count of
* this module is non-zero, i.e. between inter_module_get and
* inter_module_put. Keith Owens <kaos@ocs.com.au> 29 Oct 2000.
*/
struct
mtd_info
*
cfi_cmdset_0001
(
struct
map_info
*
map
,
int
primary
)
{
struct
cfi_private
*
cfi
=
map
->
fldrv_priv
;
...
...
@@ -415,6 +408,11 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
return
cfi_intelext_setup
(
mtd
);
}
struct
mtd_info
*
cfi_cmdset_0003
(
struct
map_info
*
map
,
int
primary
)
__attribute__
((
alias
(
"cfi_cmdset_0001"
)));
struct
mtd_info
*
cfi_cmdset_0200
(
struct
map_info
*
map
,
int
primary
)
__attribute__
((
alias
(
"cfi_cmdset_0001"
)));
EXPORT_SYMBOL_GPL
(
cfi_cmdset_0001
);
EXPORT_SYMBOL_GPL
(
cfi_cmdset_0003
);
EXPORT_SYMBOL_GPL
(
cfi_cmdset_0200
);
static
struct
mtd_info
*
cfi_intelext_setup
(
struct
mtd_info
*
mtd
)
{
...
...
@@ -2445,28 +2443,8 @@ static void cfi_intelext_destroy(struct mtd_info *mtd)
kfree
(
mtd
->
eraseregions
);
}
static
char
im_name_0001
[]
=
"cfi_cmdset_0001"
;
static
char
im_name_0003
[]
=
"cfi_cmdset_0003"
;
static
char
im_name_0200
[]
=
"cfi_cmdset_0200"
;
static
int
__init
cfi_intelext_init
(
void
)
{
inter_module_register
(
im_name_0001
,
THIS_MODULE
,
&
cfi_cmdset_0001
);
inter_module_register
(
im_name_0003
,
THIS_MODULE
,
&
cfi_cmdset_0001
);
inter_module_register
(
im_name_0200
,
THIS_MODULE
,
&
cfi_cmdset_0001
);
return
0
;
}
static
void
__exit
cfi_intelext_exit
(
void
)
{
inter_module_unregister
(
im_name_0001
);
inter_module_unregister
(
im_name_0003
);
inter_module_unregister
(
im_name_0200
);
}
module_init
(
cfi_intelext_init
);
module_exit
(
cfi_intelext_exit
);
MODULE_LICENSE
(
"GPL"
);
MODULE_AUTHOR
(
"David Woodhouse <dwmw2@infradead.org> et al."
);
MODULE_DESCRIPTION
(
"MTD chip driver for Intel/Sharp flash chips"
);
MODULE_ALIAS
(
"cfi_cmdset_0003"
);
MODULE_ALIAS
(
"cfi_cmdset_0200"
);
drivers/mtd/chips/cfi_cmdset_0002.c
浏览文件 @
a15bdeef
...
...
@@ -326,7 +326,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
return
cfi_amdstd_setup
(
mtd
);
}
EXPORT_SYMBOL
(
cfi_cmdset_0002
);
static
struct
mtd_info
*
cfi_amdstd_setup
(
struct
mtd_info
*
mtd
)
{
...
...
@@ -1758,25 +1758,6 @@ static void cfi_amdstd_destroy(struct mtd_info *mtd)
kfree
(
mtd
->
eraseregions
);
}
static
char
im_name
[]
=
"cfi_cmdset_0002"
;
static
int
__init
cfi_amdstd_init
(
void
)
{
inter_module_register
(
im_name
,
THIS_MODULE
,
&
cfi_cmdset_0002
);
return
0
;
}
static
void
__exit
cfi_amdstd_exit
(
void
)
{
inter_module_unregister
(
im_name
);
}
module_init
(
cfi_amdstd_init
);
module_exit
(
cfi_amdstd_exit
);
MODULE_LICENSE
(
"GPL"
);
MODULE_AUTHOR
(
"Crossnet Co. <info@crossnet.co.jp> et al."
);
MODULE_DESCRIPTION
(
"MTD chip driver for AMD/Fujitsu flash chips"
);
drivers/mtd/chips/cfi_cmdset_0020.c
浏览文件 @
a15bdeef
...
...
@@ -1410,20 +1410,4 @@ static void cfi_staa_destroy(struct mtd_info *mtd)
kfree
(
cfi
);
}
static
char
im_name
[]
=
"cfi_cmdset_0020"
;
static
int
__init
cfi_staa_init
(
void
)
{
inter_module_register
(
im_name
,
THIS_MODULE
,
&
cfi_cmdset_0020
);
return
0
;
}
static
void
__exit
cfi_staa_exit
(
void
)
{
inter_module_unregister
(
im_name
);
}
module_init
(
cfi_staa_init
);
module_exit
(
cfi_staa_exit
);
MODULE_LICENSE
(
"GPL"
);
drivers/mtd/chips/gen_probe.c
浏览文件 @
a15bdeef
...
...
@@ -194,25 +194,28 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map,
{
struct
cfi_private
*
cfi
=
map
->
fldrv_priv
;
__u16
type
=
primary
?
cfi
->
cfiq
->
P_ID
:
cfi
->
cfiq
->
A_ID
;
#if
defined(CONFIG_MODULES) && defined(HAVE_INTER_MODULE)
#if
def CONFIG_MODULES
char
probename
[
32
];
cfi_cmdset_fn_t
*
probe_function
;
sprintf
(
probename
,
"cfi_cmdset_%4.4X"
,
type
);
probe_function
=
inter_module_get_request
(
probename
,
probename
);
probe_function
=
(
void
*
)
symbol_get
(
probename
);
if
(
!
probe_function
)
{
request_module
(
probename
);
probe_function
=
(
void
*
)
symbol_get
(
probename
);
}
if
(
probe_function
)
{
struct
mtd_info
*
mtd
;
mtd
=
(
*
probe_function
)(
map
,
primary
);
/* If it was happy, it'll have increased its own use count */
inter_module_put
(
probename
);
symbol_put_addr
(
probe_function
);
return
mtd
;
}
#endif
printk
(
KERN_NOTICE
"Support for command set %04X not present
\n
"
,
type
);
printk
(
KERN_NOTICE
"Support for command set %04X not present
\n
"
,
type
);
return
NULL
;
}
...
...
@@ -226,12 +229,8 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary)
return
NULL
;
switch
(
type
){
/* Urgh. Ifdefs. The version with weak symbols was
* _much_ nicer. Shame it didn't seem to work on
* anything but x86, really.
* But we can't rely in inter_module_get() because
* that'd mean we depend on link order.
*/
/* We need these for the !CONFIG_MODULES case,
because symbol_get() doesn't work there */
#ifdef CONFIG_MTD_CFI_INTELEXT
case
0x0001
:
case
0x0003
:
...
...
@@ -246,9 +245,9 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary)
case
0x0020
:
return
cfi_cmdset_0020
(
map
,
primary
);
#endif
default:
return
cfi_cmdset_unknown
(
map
,
primary
);
}
return
cfi_cmdset_unknown
(
map
,
primary
);
}
MODULE_LICENSE
(
"GPL"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录