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
Kirill Smelkov
linux
Commits
b618f1aa
Commit
b618f1aa
authored
Jun 09, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PCI: remove pci_present() from drivers/char/sx.c
parent
7329dae1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
55 deletions
+55
-55
drivers/char/sx.c
drivers/char/sx.c
+55
-55
No files found.
drivers/char/sx.c
View file @
b618f1aa
...
@@ -2460,69 +2460,68 @@ static int __init sx_init(void)
...
@@ -2460,69 +2460,68 @@ static int __init sx_init(void)
}
}
#ifdef CONFIG_PCI
#ifdef CONFIG_PCI
if
(
pci_present
())
{
#ifndef TWO_ZERO
#ifndef TWO_ZERO
while
((
pdev
=
pci_find_device
(
PCI_VENDOR_ID_SPECIALIX
,
while
((
pdev
=
pci_find_device
(
PCI_VENDOR_ID_SPECIALIX
,
PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8
,
PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8
,
pdev
)))
{
pdev
)))
{
if
(
pci_enable_device
(
pdev
))
if
(
pci_enable_device
(
pdev
))
continue
;
continue
;
#else
#else
for
(
i
=
0
;
i
<
SX_NBOARDS
;
i
++
)
{
for
(
i
=
0
;
i
<
SX_NBOARDS
;
i
++
)
{
if
(
pcibios_find_device
(
PCI_VENDOR_ID_SPECIALIX
,
if
(
pcibios_find_device
(
PCI_VENDOR_ID_SPECIALIX
,
PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8
,
i
,
PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8
,
i
,
&
pci_bus
,
&
pci_fun
))
break
;
&
pci_bus
,
&
pci_fun
))
break
;
#endif
#endif
/* Specialix has a whole bunch of cards with
/* Specialix has a whole bunch of cards with
0x2000 as the device ID. They say its because
0x2000 as the device ID. They say its because
the standard requires it. Stupid standard. */
the standard requires it. Stupid standard. */
/* It seems that reading a word doesn't work reliably on 2.0.
/* It seems that reading a word doesn't work reliably on 2.0.
Also, reading a non-aligned dword doesn't work. So we read the
Also, reading a non-aligned dword doesn't work. So we read the
whole dword at 0x2c and extract the word at 0x2e (SUBSYSTEM_ID)
whole dword at 0x2c and extract the word at 0x2e (SUBSYSTEM_ID)
ourselves */
ourselves */
/* I don't know why the define doesn't work, constant 0x2c does --REW */
/* I don't know why the define doesn't work, constant 0x2c does --REW */
pci_read_config_dword
(
pdev
,
0x2c
,
&
tint
);
pci_read_config_dword
(
pdev
,
0x2c
,
&
tint
);
tshort
=
(
tint
>>
16
)
&
0xffff
;
tshort
=
(
tint
>>
16
)
&
0xffff
;
sx_dprintk
(
SX_DEBUG_PROBE
,
"Got a specialix card: %x.
\n
"
,
tint
);
sx_dprintk
(
SX_DEBUG_PROBE
,
"Got a specialix card: %x.
\n
"
,
tint
);
/* sx_dprintk (SX_DEBUG_PROBE, "pdev = %d/%d (%x)\n", pdev, tint); */
/* sx_dprintk (SX_DEBUG_PROBE, "pdev = %d/%d (%x)\n", pdev, tint); */
if
((
tshort
!=
0x0200
)
&&
(
tshort
!=
0x0300
))
{
if
((
tshort
!=
0x0200
)
&&
(
tshort
!=
0x0300
))
{
sx_dprintk
(
SX_DEBUG_PROBE
,
"But it's not an SX card (%d)...
\n
"
,
sx_dprintk
(
SX_DEBUG_PROBE
,
"But it's not an SX card (%d)...
\n
"
,
tshort
);
tshort
);
continue
;
continue
;
}
}
board
=
&
boards
[
found
];
board
=
&
boards
[
found
];
board
->
flags
&=
~
SX_BOARD_TYPE
;
board
->
flags
&=
~
SX_BOARD_TYPE
;
board
->
flags
|=
(
tshort
==
0x200
)
?
SX_PCI_BOARD
:
board
->
flags
|=
(
tshort
==
0x200
)
?
SX_PCI_BOARD
:
SX_CFPCI_BOARD
;
SX_CFPCI_BOARD
;
/* CF boards use base address 3.... */
/* CF boards use base address 3.... */
if
(
IS_CF_BOARD
(
board
))
if
(
IS_CF_BOARD
(
board
))
board
->
hw_base
=
pci_resource_start
(
pdev
,
3
);
board
->
hw_base
=
pci_resource_start
(
pdev
,
3
);
else
else
board
->
hw_base
=
pci_resource_start
(
pdev
,
2
);
board
->
hw_base
=
pci_resource_start
(
pdev
,
2
);
board
->
base2
=
board
->
base2
=
board
->
base
=
(
ulong
)
ioremap
(
board
->
hw_base
,
WINDOW_LEN
(
board
));
board
->
base
=
(
ulong
)
ioremap
(
board
->
hw_base
,
WINDOW_LEN
(
board
));
if
(
!
board
->
base
)
{
if
(
!
board
->
base
)
{
printk
(
KERN_ERR
"ioremap failed
\n
"
);
printk
(
KERN_ERR
"ioremap failed
\n
"
);
/* XXX handle error */
/* XXX handle error */
}
}
/* Most of the stuff on the CF board is offset by
/* Most of the stuff on the CF board is offset by
0x18000 .... */
0x18000 .... */
if
(
IS_CF_BOARD
(
board
))
board
->
base
+=
0x18000
;
if
(
IS_CF_BOARD
(
board
))
board
->
base
+=
0x18000
;
board
->
irq
=
pdev
->
irq
;
board
->
irq
=
pdev
->
irq
;
sx_dprintk
(
SX_DEBUG_PROBE
,
"Got a specialix card: %x/%lx(%d) %x.
\n
"
,
sx_dprintk
(
SX_DEBUG_PROBE
,
"Got a specialix card: %x/%lx(%d) %x.
\n
"
,
tint
,
boards
[
found
].
base
,
board
->
irq
,
board
->
flags
);
tint
,
boards
[
found
].
base
,
board
->
irq
,
board
->
flags
);
if
(
probe_sx
(
board
))
{
if
(
probe_sx
(
board
))
{
found
++
;
found
++
;
fix_sx_pci
(
pdev
,
board
);
fix_sx_pci
(
pdev
,
board
);
}
else
}
else
iounmap
((
char
*
)
(
board
->
base
));
iounmap
((
char
*
)
(
board
->
base
));
}
}
}
#endif
#endif
...
@@ -2649,3 +2648,4 @@ static void __exit sx_exit (void)
...
@@ -2649,3 +2648,4 @@ static void __exit sx_exit (void)
module_init
(
sx_init
);
module_init
(
sx_init
);
module_exit
(
sx_exit
);
module_exit
(
sx_exit
);
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