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
de156527
Commit
de156527
authored
Oct 31, 2002
by
Alan Cox
Committed by
Linus Torvalds
Oct 31, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kill pcibios in m68k pci code
parent
7dc25f5c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
22 deletions
+12
-22
arch/m68k/kernel/bios32.c
arch/m68k/kernel/bios32.c
+12
-22
No files found.
arch/m68k/kernel/bios32.c
View file @
de156527
...
@@ -95,7 +95,6 @@ struct pci_fixup pcibios_fixups[] =
...
@@ -95,7 +95,6 @@ struct pci_fixup pcibios_fixups[] =
static
void
__init
disable_dev
(
struct
pci_dev
*
dev
)
static
void
__init
disable_dev
(
struct
pci_dev
*
dev
)
{
{
struct
pci_bus
*
bus
;
unsigned
short
cmd
;
unsigned
short
cmd
;
if
(((
dev
->
class
>>
8
==
PCI_CLASS_NOT_DEFINED_VGA
)
||
if
(((
dev
->
class
>>
8
==
PCI_CLASS_NOT_DEFINED_VGA
)
||
...
@@ -103,11 +102,10 @@ static void __init disable_dev(struct pci_dev *dev)
...
@@ -103,11 +102,10 @@ static void __init disable_dev(struct pci_dev *dev)
(
dev
->
class
>>
8
==
PCI_CLASS_DISPLAY_XGA
))
&&
skip_vga
)
(
dev
->
class
>>
8
==
PCI_CLASS_DISPLAY_XGA
))
&&
skip_vga
)
return
;
return
;
bus
=
dev
->
bus
;
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
cmd
);
pcibios_read_config_word
(
bus
->
number
,
dev
->
devfn
,
PCI_COMMAND
,
&
cmd
);
cmd
&=
(
~
PCI_COMMAND_IO
&
~
PCI_COMMAND_MEMORY
&
~
PCI_COMMAND_MASTER
);
cmd
&=
(
~
PCI_COMMAND_IO
&
~
PCI_COMMAND_MEMORY
&
~
PCI_COMMAND_MASTER
);
pci
bios_write_config_word
(
bus
->
number
,
dev
->
devfn
,
PCI_COMMAND
,
cmd
);
pci
_write_config_word
(
dev
,
PCI_COMMAND
,
cmd
);
}
}
/*
/*
...
@@ -122,7 +120,6 @@ static void __init disable_dev(struct pci_dev *dev)
...
@@ -122,7 +120,6 @@ static void __init disable_dev(struct pci_dev *dev)
static
void
__init
layout_dev
(
struct
pci_dev
*
dev
)
static
void
__init
layout_dev
(
struct
pci_dev
*
dev
)
{
{
struct
pci_bus
*
bus
;
unsigned
short
cmd
;
unsigned
short
cmd
;
unsigned
int
base
,
mask
,
size
,
reg
;
unsigned
int
base
,
mask
,
size
,
reg
;
unsigned
int
alignto
;
unsigned
int
alignto
;
...
@@ -137,8 +134,7 @@ static void __init layout_dev(struct pci_dev *dev)
...
@@ -137,8 +134,7 @@ static void __init layout_dev(struct pci_dev *dev)
(
dev
->
class
>>
8
==
PCI_CLASS_DISPLAY_XGA
))
&&
skip_vga
)
(
dev
->
class
>>
8
==
PCI_CLASS_DISPLAY_XGA
))
&&
skip_vga
)
return
;
return
;
bus
=
dev
->
bus
;
pci_read_config_word
(
dev
,
PCI_COMMAND
,
&
cmd
);
pcibios_read_config_word
(
bus
->
number
,
dev
->
devfn
,
PCI_COMMAND
,
&
cmd
);
for
(
reg
=
PCI_BASE_ADDRESS_0
,
i
=
0
;
reg
<=
PCI_BASE_ADDRESS_5
;
reg
+=
4
,
i
++
)
for
(
reg
=
PCI_BASE_ADDRESS_0
,
i
=
0
;
reg
<=
PCI_BASE_ADDRESS_5
;
reg
+=
4
,
i
++
)
{
{
...
@@ -147,9 +143,8 @@ static void __init layout_dev(struct pci_dev *dev)
...
@@ -147,9 +143,8 @@ static void __init layout_dev(struct pci_dev *dev)
* device wants.
* device wants.
*/
*/
pcibios_write_config_dword
(
bus
->
number
,
dev
->
devfn
,
reg
,
pci_write_config_dword
(
dev
,
reg
,
0xffffffff
);
0xffffffff
);
pci_read_config_dword
(
dev
,
reg
,
&
base
);
pcibios_read_config_dword
(
bus
->
number
,
dev
->
devfn
,
reg
,
&
base
);
if
(
!
base
)
if
(
!
base
)
{
{
...
@@ -184,8 +179,7 @@ static void __init layout_dev(struct pci_dev *dev)
...
@@ -184,8 +179,7 @@ static void __init layout_dev(struct pci_dev *dev)
alignto
=
MAX
(
0x040
,
size
)
;
alignto
=
MAX
(
0x040
,
size
)
;
base
=
ALIGN
(
io_base
,
alignto
);
base
=
ALIGN
(
io_base
,
alignto
);
io_base
=
base
+
size
;
io_base
=
base
+
size
;
pcibios_write_config_dword
(
bus
->
number
,
dev
->
devfn
,
pci_write_config_dword
(
dev
,
reg
,
base
|
PCI_BASE_ADDRESS_SPACE_IO
);
reg
,
base
|
PCI_BASE_ADDRESS_SPACE_IO
);
dev
->
resource
[
i
].
start
=
base
;
dev
->
resource
[
i
].
start
=
base
;
dev
->
resource
[
i
].
end
=
dev
->
resource
[
i
].
start
+
size
-
1
;
dev
->
resource
[
i
].
end
=
dev
->
resource
[
i
].
start
+
size
-
1
;
...
@@ -228,8 +222,7 @@ static void __init layout_dev(struct pci_dev *dev)
...
@@ -228,8 +222,7 @@ static void __init layout_dev(struct pci_dev *dev)
alignto
=
MAX
(
0x1000
,
size
)
;
alignto
=
MAX
(
0x1000
,
size
)
;
base
=
ALIGN
(
mem_base
,
alignto
);
base
=
ALIGN
(
mem_base
,
alignto
);
mem_base
=
base
+
size
;
mem_base
=
base
+
size
;
pcibios_write_config_dword
(
bus
->
number
,
dev
->
devfn
,
pci_write_config_dword
(
dev
,
reg
,
base
);
reg
,
base
);
dev
->
resource
[
i
].
start
=
base
;
dev
->
resource
[
i
].
start
=
base
;
dev
->
resource
[
i
].
end
=
dev
->
resource
[
i
].
start
+
size
-
1
;
dev
->
resource
[
i
].
end
=
dev
->
resource
[
i
].
start
+
size
-
1
;
...
@@ -243,8 +236,7 @@ static void __init layout_dev(struct pci_dev *dev)
...
@@ -243,8 +236,7 @@ static void __init layout_dev(struct pci_dev *dev)
*/
*/
reg
+=
4
;
reg
+=
4
;
pcibios_write_config_dword
(
bus
->
number
,
dev
->
devfn
,
pci_write_config_dword
(
dev
,
reg
,
0
);
reg
,
0
);
i
++
;
i
++
;
dev
->
resource
[
i
].
start
=
0
;
dev
->
resource
[
i
].
start
=
0
;
...
@@ -272,17 +264,15 @@ static void __init layout_dev(struct pci_dev *dev)
...
@@ -272,17 +264,15 @@ static void __init layout_dev(struct pci_dev *dev)
cmd
|=
PCI_COMMAND_IO
;
cmd
|=
PCI_COMMAND_IO
;
}
}
pcibios_write_config_word
(
bus
->
number
,
dev
->
devfn
,
PCI_COMMAND
,
pci_write_config_word
(
dev
,
PCI_COMMAND
,
cmd
|
PCI_COMMAND_MASTER
);
cmd
|
PCI_COMMAND_MASTER
);
pcibios_write_config_byte
(
bus
->
number
,
dev
->
devfn
,
PCI_LATENCY_TIMER
,
pci_write_config_byte
(
dev
,
PCI_LATENCY_TIMER
,
(
disable_pci_burst
)
?
0
:
32
);
(
disable_pci_burst
)
?
0
:
32
);
if
(
bus_info
!=
NULL
)
if
(
bus_info
!=
NULL
)
bus_info
->
conf_device
(
bus
->
number
,
dev
->
devfn
);
/* Machine dependent configuration. */
bus_info
->
conf_device
(
dev
);
/* Machine dependent configuration. */
DBG_DEVS
((
"layout_dev: bus %d slot 0x%x VID 0x%x DID 0x%x class 0x%x
\n
"
,
DBG_DEVS
((
"layout_dev: bus %d slot 0x%x VID 0x%x DID 0x%x class 0x%x
\n
"
,
bus
->
number
,
PCI_SLOT
(
dev
->
devfn
),
dev
->
vendor
,
dev
->
device
,
dev
->
class
));
dev
->
bus
->
number
,
PCI_SLOT
(
dev
->
devfn
),
dev
->
vendor
,
dev
->
device
,
dev
->
class
));
}
}
/*
/*
...
...
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