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
f200709a
Commit
f200709a
authored
Jun 26, 2002
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: fixes for I/O mappings on CHRP machines.
parent
83b97532
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
32 deletions
+7
-32
arch/ppc/kernel/pci.c
arch/ppc/kernel/pci.c
+7
-2
arch/ppc/platforms/chrp_setup.c
arch/ppc/platforms/chrp_setup.c
+0
-30
No files found.
arch/ppc/kernel/pci.c
View file @
f200709a
...
...
@@ -923,6 +923,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
struct
device_node
*
dev
,
int
primary
)
{
unsigned
int
*
ranges
,
*
prev
;
unsigned
int
size
;
int
rlen
=
0
;
int
memno
=
0
;
struct
resource
*
res
;
...
...
@@ -963,12 +964,16 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
ranges
=
(
unsigned
int
*
)
get_property
(
dev
,
"ranges"
,
&
rlen
);
while
((
rlen
-=
np
*
sizeof
(
unsigned
int
))
>=
0
)
{
res
=
NULL
;
size
=
ranges
[
na
+
4
];
switch
(
ranges
[
0
]
>>
24
)
{
case
1
:
/* I/O space */
if
(
ranges
[
2
]
!=
0
)
break
;
hose
->
io_base_phys
=
ranges
[
na
+
2
];
hose
->
io_base_virt
=
ioremap
(
ranges
[
na
+
2
],
ranges
[
na
+
4
]);
/* limit I/O space to 16MB */
if
(
size
>
0x01000000
)
size
=
0x01000000
;
hose
->
io_base_virt
=
ioremap
(
ranges
[
na
+
2
],
size
);
if
(
primary
)
isa_io_base
=
(
unsigned
long
)
hose
->
io_base_virt
;
res
=
&
hose
->
io_resource
;
...
...
@@ -997,7 +1002,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
}
if
(
res
!=
NULL
)
{
res
->
name
=
dev
->
full_name
;
res
->
end
=
res
->
start
+
ranges
[
na
+
4
]
-
1
;
res
->
end
=
res
->
start
+
size
-
1
;
res
->
parent
=
NULL
;
res
->
sibling
=
NULL
;
res
->
child
=
NULL
;
...
...
arch/ppc/platforms/chrp_setup.c
View file @
f200709a
...
...
@@ -464,35 +464,6 @@ chrp_init2(void)
#endif
/* CONFIG_VT && (CONFIG_ADB_KEYBOARD || CONFIG_INPUT) */
}
/*
* One of the main thing these mappings are needed for is so that
* xmon can get to the serial port early on. We probably should
* handle the machines with the mpc106 as well as the python (F50)
* and the GG2 (longtrail). Actually we should look in the device
* tree and do the right thing.
*/
static
void
__init
chrp_map_io
(
void
)
{
char
*
name
;
/*
* The code below tends to get removed, please don't take it out.
* The F50 needs this mapping and it you take it out I'll track you
* down and slap your hands. If it causes problems please email me.
* -- Cort <cort@fsmlabs.com>
*/
name
=
get_property
(
find_path_device
(
"/"
),
"name"
,
NULL
);
if
(
name
&&
strncmp
(
name
,
"IBM-70"
,
6
)
==
0
&&
strstr
(
name
,
"-F50"
))
{
io_block_mapping
(
0x80000000
,
0x80000000
,
0x10000000
,
_PAGE_IO
);
io_block_mapping
(
0x90000000
,
0x90000000
,
0x10000000
,
_PAGE_IO
);
return
;
}
else
{
io_block_mapping
(
0xf8000000
,
0xf8000000
,
0x04000000
,
_PAGE_IO
);
}
}
void
__init
chrp_init
(
unsigned
long
r3
,
unsigned
long
r4
,
unsigned
long
r5
,
unsigned
long
r6
,
unsigned
long
r7
)
...
...
@@ -530,7 +501,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
calibrate_decr
=
chrp_calibrate_decr
;
ppc_md
.
find_end_of_memory
=
pmac_find_end_of_memory
;
ppc_md
.
setup_io_mappings
=
chrp_map_io
;
#ifdef CONFIG_VT
/* these are adjusted in chrp_init2 if we have an ADB keyboard */
...
...
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