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
bd42440a
Commit
bd42440a
authored
Mar 21, 2003
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: Make a ppc32 version of pcibios_resource_to_bus, which adds
an offset where needed.
parent
d99c48c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
arch/ppc/kernel/pci.c
arch/ppc/kernel/pci.c
+18
-1
include/asm-ppc/pci.h
include/asm-ppc/pci.h
+4
-3
No files found.
arch/ppc/kernel/pci.c
View file @
bd42440a
...
...
@@ -176,6 +176,21 @@ pcibios_fixup_cardbus(struct pci_dev* dev)
}
#endif
/* CONFIG_ALL_PPC */
void
pcibios_resource_to_bus
(
struct
pci_dev
*
dev
,
struct
pci_bus_region
*
region
,
struct
resource
*
res
)
{
unsigned
long
offset
=
0
;
struct
pci_controller
*
hose
=
dev
->
sysdata
;
if
(
hose
&&
res
->
flags
&
IORESOURCE_IO
)
offset
=
(
unsigned
long
)
hose
->
io_base_virt
-
isa_io_base
;
else
if
(
hose
&&
res
->
flags
&
IORESOURCE_MEM
)
offset
=
hose
->
pci_mem_offset
;
region
->
start
=
res
->
start
-
offset
;
region
->
end
=
res
->
end
-
offset
;
}
/*
* We need to avoid collisions with `mirrored' VGA ports
* and other strange ISA hardware, so we always want the
...
...
@@ -579,9 +594,11 @@ pcibios_assign_resources(void)
*/
if
((
r
->
flags
&
IORESOURCE_UNSET
)
&&
r
->
end
&&
(
!
ppc_md
.
pcibios_enable_device_hook
||
!
ppc_md
.
pcibios_enable_device_hook
(
dev
,
1
)))
!
ppc_md
.
pcibios_enable_device_hook
(
dev
,
1
)))
{
r
->
flags
&=
~
IORESOURCE_UNSET
;
pci_assign_resource
(
dev
,
idx
);
}
}
#if 0 /* don't assign ROMs */
r = &dev->resource[PCI_ROM_RESOURCE];
...
...
include/asm-ppc/pci.h
View file @
bd42440a
...
...
@@ -271,9 +271,10 @@ int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
#define HAVE_PCI_MMAP 1
#endif
/* __KERNEL__ */
extern
void
pcibios_resource_to_bus
(
struct
pci_dev
*
dev
,
struct
pci_bus_region
*
region
,
struct
resource
*
res
);
/* generic pci stuff */
#include <asm-generic/pci.h>
#endif
/* __KERNEL__ */
#endif
/* __PPC_PCI_H */
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