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
b5438582
Commit
b5438582
authored
Aug 07, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] SMTC: Fix crash on bootup with idebus= command line argument.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
de4b2147
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
51 deletions
+25
-51
include/asm-mips/mach-generic/ide.h
include/asm-mips/mach-generic/ide.h
+25
-51
No files found.
include/asm-mips/mach-generic/ide.h
View file @
b5438582
...
...
@@ -29,68 +29,42 @@
#define IDE_ARCH_OBSOLETE_DEFAULTS
static
__inline__
int
ide_probe_legacy
(
void
)
{
#ifdef CONFIG_PCI
struct
pci_dev
*
dev
;
if
((
dev
=
pci_get_class
(
PCI_CLASS_BRIDGE_EISA
<<
8
,
NULL
))
!=
NULL
||
(
dev
=
pci_get_class
(
PCI_CLASS_BRIDGE_ISA
<<
8
,
NULL
))
!=
NULL
)
{
pci_dev_put
(
dev
);
return
1
;
}
return
0
;
#elif defined(CONFIG_EISA) || defined(CONFIG_ISA)
return
1
;
#else
return
0
;
#endif
}
static
__inline__
int
ide_default_irq
(
unsigned
long
base
)
{
if
(
ide_probe_legacy
())
switch
(
base
)
{
case
0x1f0
:
return
14
;
case
0x170
:
return
15
;
case
0x1e8
:
return
11
;
case
0x168
:
return
10
;
case
0x1e0
:
return
8
;
case
0x160
:
return
12
;
case
0x1f0
:
return
14
;
case
0x170
:
return
15
;
case
0x1e8
:
return
11
;
case
0x168
:
return
10
;
case
0x1e0
:
return
8
;
case
0x160
:
return
12
;
default:
return
0
;
}
else
return
0
;
}
static
__inline__
unsigned
long
ide_default_io_base
(
int
index
)
{
if
(
ide_probe_legacy
())
/*
* If PCI is present then it is not safe to poke around
* the other legacy IDE ports. Only 0x1f0 and 0x170 are
* defined compatibility mode ports for PCI. A user can
* override this using ide= but we must default safe.
*/
if
(
no_pci_devices
())
{
switch
(
index
)
{
case
0
:
return
0x1f0
;
case
1
:
return
0x170
;
case
2
:
return
0x1e8
;
case
3
:
return
0x168
;
case
4
:
return
0x1e0
;
case
5
:
return
0x160
;
case
2
:
return
0x1e8
;
case
3
:
return
0x168
;
case
4
:
return
0x1e0
;
case
5
:
return
0x160
;
}
}
switch
(
index
)
{
case
0
:
return
0x1f0
;
case
1
:
return
0x170
;
default:
return
0
;
}
else
return
0
;
}
#define IDE_ARCH_OBSOLETE_INIT
...
...
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