Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
baac05a4
Commit
baac05a4
authored
Mar 21, 2003
by
Alan Cox
Committed by
Linus Torvalds
Mar 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] clean up ht6560 legacy ide driver
parent
e054ca91
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
72 deletions
+57
-72
drivers/ide/legacy/ht6560b.c
drivers/ide/legacy/ht6560b.c
+57
-72
No files found.
drivers/ide/legacy/ht6560b.c
View file @
baac05a4
...
@@ -312,42 +312,7 @@ static void tune_ht6560b (ide_drive_t *drive, u8 pio)
...
@@ -312,42 +312,7 @@ static void tune_ht6560b (ide_drive_t *drive, u8 pio)
#endif
#endif
}
}
void
__init
probe_ht6560b
(
void
)
void
ht6560b_release
(
void
)
{
int
t
;
request_region
(
HT_CONFIG_PORT
,
1
,
ide_hwifs
[
0
].
name
);
ide_hwifs
[
0
].
chipset
=
ide_ht6560b
;
ide_hwifs
[
1
].
chipset
=
ide_ht6560b
;
ide_hwifs
[
0
].
selectproc
=
&
ht6560b_selectproc
;
ide_hwifs
[
1
].
selectproc
=
&
ht6560b_selectproc
;
ide_hwifs
[
0
].
tuneproc
=
&
tune_ht6560b
;
ide_hwifs
[
1
].
tuneproc
=
&
tune_ht6560b
;
ide_hwifs
[
0
].
serialized
=
1
;
/* is this needed? */
ide_hwifs
[
1
].
serialized
=
1
;
/* is this needed? */
ide_hwifs
[
0
].
mate
=
&
ide_hwifs
[
1
];
ide_hwifs
[
1
].
mate
=
&
ide_hwifs
[
0
];
ide_hwifs
[
1
].
channel
=
1
;
/*
* Setting default configurations for drives
*/
t
=
(
HT_CONFIG_DEFAULT
<<
8
);
t
|=
HT_TIMING_DEFAULT
;
ide_hwifs
[
0
].
drives
[
0
].
drive_data
=
t
;
ide_hwifs
[
0
].
drives
[
1
].
drive_data
=
t
;
t
|=
(
HT_SECONDARY_IF
<<
8
);
ide_hwifs
[
1
].
drives
[
0
].
drive_data
=
t
;
ide_hwifs
[
1
].
drives
[
1
].
drive_data
=
t
;
#ifndef HWIF_PROBE_CLASSIC_METHOD
probe_hwif_init
(
&
ide_hwifs
[
0
]);
probe_hwif_init
(
&
ide_hwifs
[
1
]);
#endif
/* HWIF_PROBE_CLASSIC_METHOD */
}
void
__init
ht6560b_release
(
void
)
{
{
if
(
ide_hwifs
[
0
].
chipset
!=
ide_ht6560b
&&
if
(
ide_hwifs
[
0
].
chipset
!=
ide_ht6560b
&&
ide_hwifs
[
1
].
chipset
!=
ide_ht6560b
)
ide_hwifs
[
1
].
chipset
!=
ide_ht6560b
)
...
@@ -371,36 +336,11 @@ void __init ht6560b_release (void)
...
@@ -371,36 +336,11 @@ void __init ht6560b_release (void)
release_region
(
HT_CONFIG_PORT
,
1
);
release_region
(
HT_CONFIG_PORT
,
1
);
}
}
#ifndef MODULE
/*
* init_ht6560b:
*
* called by ide.c when parsing command line
*/
void
__init
init_ht6560b
(
void
)
{
if
(
check_region
(
HT_CONFIG_PORT
,
1
))
{
printk
(
KERN_NOTICE
"%s: HT_CONFIG_PORT not found
\n
"
,
__FUNCTION__
);
return
;
}
if
(
!
try_to_init_ht6560b
())
{
printk
(
KERN_NOTICE
"%s: HBA not found
\n
"
,
__FUNCTION__
);
return
;
}
probe_ht6560b
();
}
#else
MODULE_AUTHOR
(
"See Local File"
);
MODULE_DESCRIPTION
(
"HT-6560B EIDE-controller support"
);
MODULE_LICENSE
(
"GPL"
);
int
__init
ht6560b_mod_init
(
void
)
int
__init
ht6560b_mod_init
(
void
)
{
{
if
(
check_region
(
HT_CONFIG_PORT
,
1
))
{
int
t
;
if
(
!
request_region
(
HT_CONFIG_PORT
,
1
,
ide_hwifs
[
0
].
name
))
{
printk
(
KERN_NOTICE
"%s: HT_CONFIG_PORT not found
\n
"
,
printk
(
KERN_NOTICE
"%s: HT_CONFIG_PORT not found
\n
"
,
__FUNCTION__
);
__FUNCTION__
);
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -408,23 +348,68 @@ int __init ht6560b_mod_init(void)
...
@@ -408,23 +348,68 @@ int __init ht6560b_mod_init(void)
if
(
!
try_to_init_ht6560b
())
{
if
(
!
try_to_init_ht6560b
())
{
printk
(
KERN_NOTICE
"%s: HBA not found
\n
"
,
__FUNCTION__
);
printk
(
KERN_NOTICE
"%s: HBA not found
\n
"
,
__FUNCTION__
);
return
-
ENODEV
;
goto
release_region
;
}
}
probe_ht6560b
();
ide_hwifs
[
0
].
chipset
=
ide_ht6560b
;
ide_hwifs
[
1
].
chipset
=
ide_ht6560b
;
ide_hwifs
[
0
].
selectproc
=
&
ht6560b_selectproc
;
ide_hwifs
[
1
].
selectproc
=
&
ht6560b_selectproc
;
ide_hwifs
[
0
].
tuneproc
=
&
tune_ht6560b
;
ide_hwifs
[
1
].
tuneproc
=
&
tune_ht6560b
;
ide_hwifs
[
0
].
serialized
=
1
;
/* is this needed? */
ide_hwifs
[
1
].
serialized
=
1
;
/* is this needed? */
ide_hwifs
[
0
].
mate
=
&
ide_hwifs
[
1
];
ide_hwifs
[
1
].
mate
=
&
ide_hwifs
[
0
];
ide_hwifs
[
1
].
channel
=
1
;
/*
* Setting default configurations for drives
*/
t
=
(
HT_CONFIG_DEFAULT
<<
8
);
t
|=
HT_TIMING_DEFAULT
;
ide_hwifs
[
0
].
drives
[
0
].
drive_data
=
t
;
ide_hwifs
[
0
].
drives
[
1
].
drive_data
=
t
;
t
|=
(
HT_SECONDARY_IF
<<
8
);
ide_hwifs
[
1
].
drives
[
0
].
drive_data
=
t
;
ide_hwifs
[
1
].
drives
[
1
].
drive_data
=
t
;
probe_hwif_init
(
&
ide_hwifs
[
0
]);
probe_hwif_init
(
&
ide_hwifs
[
1
]);
#ifdef MODULE
if
(
ide_hwifs
[
0
].
chipset
!=
ide_ht6560b
&&
if
(
ide_hwifs
[
0
].
chipset
!=
ide_ht6560b
&&
ide_hwifs
[
1
].
chipset
!=
ide_ht6560b
)
{
ide_hwifs
[
1
].
chipset
!=
ide_ht6560b
)
{
ht6560b_release
();
ht6560b_release
();
return
-
ENODEV
;
return
-
ENODEV
;
}
}
#endif
return
0
;
return
0
;
release_region:
release_region
(
HT_CONFIG_PORT
,
1
);
return
-
ENODEV
;
}
}
module_init
(
ht6560b_mod_init
);
MODULE_AUTHOR
(
"See Local File"
);
MODULE_DESCRIPTION
(
"HT-6560B EIDE-controller support"
);
MODULE_LICENSE
(
"GPL"
);
#ifdef MODULE
void
__init
ht6560b_mod_exit
(
void
)
void
__init
ht6560b_mod_exit
(
void
)
{
{
ht6560b_release
();
ht6560b_release
();
}
}
module_init
(
ht6560b_mod_init
);
module_exit
(
ht6560b_mod_exit
);
module_exit
(
ht6560b_mod_exit
);
#else
/*
* called by ide.c when parsing command line
*/
void
__init
init_ht6560b
(
void
)
{
ht6560b_mod_init
();
/* ignore return value */
}
#endif
#endif
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