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
b38781e5
Commit
b38781e5
authored
Mar 20, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On sparc64, handle assigning ROM and non-standard resources
properly.
parent
1c065a68
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
3 deletions
+36
-3
arch/sparc64/kernel/pci_psycho.c
arch/sparc64/kernel/pci_psycho.c
+12
-1
arch/sparc64/kernel/pci_sabre.c
arch/sparc64/kernel/pci_sabre.c
+12
-1
arch/sparc64/kernel/pci_schizo.c
arch/sparc64/kernel/pci_schizo.c
+12
-1
No files found.
arch/sparc64/kernel/pci_psycho.c
View file @
b38781e5
...
...
@@ -1101,7 +1101,14 @@ static void __init psycho_base_address_update(struct pci_dev *pdev, int resource
int
where
,
size
,
is_64bit
;
res
=
&
pdev
->
resource
[
resource
];
if
(
resource
<
6
)
{
where
=
PCI_BASE_ADDRESS_0
+
(
resource
*
4
);
}
else
if
(
resource
==
PCI_ROM_RESOURCE
)
{
where
=
pdev
->
rom_base_reg
;
}
else
{
/* Somebody might have asked allocation of a non-standard resource */
return
;
}
is_64bit
=
0
;
if
(
res
->
flags
&
IORESOURCE_IO
)
...
...
@@ -1117,6 +1124,10 @@ static void __init psycho_base_address_update(struct pci_dev *pdev, int resource
pci_read_config_dword
(
pdev
,
where
,
&
reg
);
reg
=
((
reg
&
size
)
|
(((
u32
)(
res
->
start
-
root
->
start
))
&
~
size
));
if
(
resource
==
PCI_ROM_RESOURCE
)
{
reg
|=
PCI_ROM_ADDRESS_ENABLE
;
res
->
flags
|=
PCI_ROM_ADDRESS_ENABLE
;
}
pci_write_config_dword
(
pdev
,
where
,
reg
);
/* This knows that the upper 32-bits of the address
...
...
arch/sparc64/kernel/pci_sabre.c
View file @
b38781e5
...
...
@@ -1067,7 +1067,14 @@ static void __init sabre_base_address_update(struct pci_dev *pdev, int resource)
int
where
,
size
,
is_64bit
;
res
=
&
pdev
->
resource
[
resource
];
if
(
resource
<
6
)
{
where
=
PCI_BASE_ADDRESS_0
+
(
resource
*
4
);
}
else
if
(
resource
==
PCI_ROM_RESOURCE
)
{
where
=
pdev
->
rom_base_reg
;
}
else
{
/* Somebody might have asked allocation of a non-standard resource */
return
;
}
is_64bit
=
0
;
if
(
res
->
flags
&
IORESOURCE_IO
)
...
...
@@ -1083,6 +1090,10 @@ static void __init sabre_base_address_update(struct pci_dev *pdev, int resource)
pci_read_config_dword
(
pdev
,
where
,
&
reg
);
reg
=
((
reg
&
size
)
|
(((
u32
)(
res
->
start
-
base
))
&
~
size
));
if
(
resource
==
PCI_ROM_RESOURCE
)
{
reg
|=
PCI_ROM_ADDRESS_ENABLE
;
res
->
flags
|=
PCI_ROM_ADDRESS_ENABLE
;
}
pci_write_config_dword
(
pdev
,
where
,
reg
);
/* This knows that the upper 32-bits of the address
...
...
arch/sparc64/kernel/pci_schizo.c
View file @
b38781e5
...
...
@@ -1426,7 +1426,14 @@ static void __init schizo_base_address_update(struct pci_dev *pdev, int resource
int
where
,
size
,
is_64bit
;
res
=
&
pdev
->
resource
[
resource
];
if
(
resource
<
6
)
{
where
=
PCI_BASE_ADDRESS_0
+
(
resource
*
4
);
}
else
if
(
resource
==
PCI_ROM_RESOURCE
)
{
where
=
pdev
->
rom_base_reg
;
}
else
{
/* Somebody might have asked allocation of a non-standard resource */
return
;
}
is_64bit
=
0
;
if
(
res
->
flags
&
IORESOURCE_IO
)
...
...
@@ -1442,6 +1449,10 @@ static void __init schizo_base_address_update(struct pci_dev *pdev, int resource
pci_read_config_dword
(
pdev
,
where
,
&
reg
);
reg
=
((
reg
&
size
)
|
(((
u32
)(
res
->
start
-
root
->
start
))
&
~
size
));
if
(
resource
==
PCI_ROM_RESOURCE
)
{
reg
|=
PCI_ROM_ADDRESS_ENABLE
;
res
->
flags
|=
PCI_ROM_ADDRESS_ENABLE
;
}
pci_write_config_dword
(
pdev
,
where
,
reg
);
/* This knows that the upper 32-bits of the address
...
...
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