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
709eb0f9
Commit
709eb0f9
authored
Oct 03, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: move pci_device_to_OF_node so radeonfb can get at it
parent
7641031c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
arch/ppc64/kernel/pci.h
arch/ppc64/kernel/pci.h
+0
-17
include/asm-ppc64/pci-bridge.h
include/asm-ppc64/pci-bridge.h
+18
-0
No files found.
arch/ppc64/kernel/pci.h
View file @
709eb0f9
...
...
@@ -64,23 +64,6 @@ void iSeries_pcibios_init_early(void);
void
pSeries_pcibios_init_early
(
void
);
void
pSeries_pcibios_init
(
void
);
/* Get a device_node from a pci_dev. This code must be fast except in the case
* where the sysdata is incorrect and needs to be fixed up (hopefully just once)
*/
static
inline
struct
device_node
*
pci_device_to_OF_node
(
struct
pci_dev
*
dev
)
{
struct
device_node
*
dn
=
(
struct
device_node
*
)(
dev
->
sysdata
);
if
(
dn
->
devfn
==
dev
->
devfn
&&
dn
->
busno
==
dev
->
bus
->
number
)
return
dn
;
/* fast path. sysdata is good */
else
return
fetch_dev_dn
(
dev
);
}
/* Use this macro after the PCI bus walk for max performance when it
* is known that sysdata is correct.
*/
#define PCI_GET_DN(dev) ((struct device_node *)((dev)->sysdata))
/*******************************************************************
* Platform configuration flags.. (Live in pci.c)
*******************************************************************/
...
...
include/asm-ppc64/pci-bridge.h
View file @
709eb0f9
...
...
@@ -79,5 +79,23 @@ struct pci_controller {
int
pci_device_loc
(
struct
device_node
*
dev
,
unsigned
char
*
bus_ptr
,
unsigned
char
*
devfn_ptr
);
struct
device_node
*
fetch_dev_dn
(
struct
pci_dev
*
dev
);
/* Get a device_node from a pci_dev. This code must be fast except in the case
* where the sysdata is incorrect and needs to be fixed up (hopefully just once)
*/
static
inline
struct
device_node
*
pci_device_to_OF_node
(
struct
pci_dev
*
dev
)
{
struct
device_node
*
dn
=
(
struct
device_node
*
)(
dev
->
sysdata
);
if
(
dn
->
devfn
==
dev
->
devfn
&&
dn
->
busno
==
dev
->
bus
->
number
)
return
dn
;
/* fast path. sysdata is good */
else
return
fetch_dev_dn
(
dev
);
}
/* Use this macro after the PCI bus walk for max performance when it
* is known that sysdata is correct.
*/
#define PCI_GET_DN(dev) ((struct device_node *)((dev)->sysdata))
#endif
#endif
/* __KERNEL__ */
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