Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
a15bdeef
Commit
a15bdeef
authored
May 08, 2006
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove use of inter_module_crap in NOR flash chip drivers.
Signed-off-by:
David Woodhouse
<
dwmw2@infradead.org
>
parent
396674e5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
93 deletions
+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
No files found.
drivers/mtd/chips/Kconfig
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment