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
e7e885d3
Commit
e7e885d3
authored
Mar 06, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: move pSeries specific fixup_bus out of generic code
parent
7e279f2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
52 deletions
+4
-52
arch/ppc64/kernel/chrp_setup.c
arch/ppc64/kernel/chrp_setup.c
+2
-0
arch/ppc64/kernel/pci.c
arch/ppc64/kernel/pci.c
+2
-52
No files found.
arch/ppc64/kernel/chrp_setup.c
View file @
e7e885d3
...
...
@@ -72,6 +72,7 @@ extern void init_ras_IRQ(void);
extern
void
find_and_init_phbs
(
void
);
extern
void
pSeries_pcibios_fixup
(
void
);
extern
void
pSeries_pcibios_fixup_bus
(
struct
pci_bus
*
bus
);
extern
void
iSeries_pcibios_fixup
(
void
);
extern
void
pSeries_get_rtc_time
(
struct
rtc_time
*
rtc_time
);
...
...
@@ -245,6 +246,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
#ifndef CONFIG_PPC_ISERIES
ppc_md
.
pcibios_fixup
=
pSeries_pcibios_fixup
;
ppc_md
.
pcibios_fixup_bus
=
pSeries_pcibios_fixup_bus
;
#else
ppc_md
.
pcibios_fixup
=
NULL
;
// ppc_md.pcibios_fixup = iSeries_pcibios_fixup;
...
...
arch/ppc64/kernel/pci.c
View file @
e7e885d3
...
...
@@ -49,7 +49,6 @@ static void fixup_windbond_82c105(struct pci_dev* dev);
void
fixup_resources
(
struct
pci_dev
*
dev
);
void
iSeries_pcibios_init
(
void
);
void
pSeries_pcibios_init
(
void
);
struct
pci_controller
*
hose_head
;
struct
pci_controller
**
hose_tail
=
&
hose_head
;
...
...
@@ -410,9 +409,7 @@ pcibios_init(void)
struct
pci_bus
*
bus
;
int
next_busno
;
#ifndef CONFIG_PPC_ISERIES
pSeries_pcibios_init
();
#else
#ifdef CONFIG_PPC_ISERIES
iSeries_pcibios_init
();
#endif
...
...
@@ -467,54 +464,7 @@ subsys_initcall(pcibios_init);
void
__init
pcibios_fixup_bus
(
struct
pci_bus
*
bus
)
{
#ifndef CONFIG_PPC_ISERIES
struct
pci_controller
*
phb
=
PCI_GET_PHB_PTR
(
bus
);
struct
resource
*
res
;
int
i
;
if
(
bus
->
parent
==
NULL
)
{
/* This is a host bridge - fill in its resources */
phb
->
bus
=
bus
;
bus
->
resource
[
0
]
=
res
=
&
phb
->
io_resource
;
if
(
!
res
->
flags
)
BUG
();
/* No I/O resource for this PHB? */
for
(
i
=
0
;
i
<
3
;
++
i
)
{
res
=
&
phb
->
mem_resources
[
i
];
if
(
!
res
->
flags
)
{
if
(
i
==
0
)
BUG
();
/* No memory resource for this PHB? */
}
bus
->
resource
[
i
+
1
]
=
res
;
}
}
else
{
/* This is a subordinate bridge */
pci_read_bridge_bases
(
bus
);
for
(
i
=
0
;
i
<
4
;
++
i
)
{
if
((
res
=
bus
->
resource
[
i
])
==
NULL
)
continue
;
if
(
!
res
->
flags
)
continue
;
if
(
res
==
pci_find_parent_resource
(
bus
->
self
,
res
))
{
/* Transparent resource -- don't try to "fix" it. */
continue
;
}
if
(
res
->
flags
&
IORESOURCE_IO
)
{
unsigned
long
offset
=
(
unsigned
long
)
phb
->
io_base_virt
-
pci_io_base
;
res
->
start
+=
offset
;
res
->
end
+=
offset
;
}
else
if
(
phb
->
pci_mem_offset
&&
(
res
->
flags
&
IORESOURCE_MEM
))
{
if
(
res
->
start
<
phb
->
pci_mem_offset
)
{
res
->
start
+=
phb
->
pci_mem_offset
;
res
->
end
+=
phb
->
pci_mem_offset
;
}
}
}
}
#endif
if
(
ppc_md
.
pcibios_fixup_bus
)
if
(
ppc_md
.
pcibios_fixup_bus
)
ppc_md
.
pcibios_fixup_bus
(
bus
);
}
...
...
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