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
3bb2aab2
Commit
3bb2aab2
authored
Oct 26, 2003
by
Kumar Gala
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linux.bkbits.net/linux-2.5
into blarg.somerset.sps.mot.com:/local0/bk/linux-2.5
parents
edf12049
aad989e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
arch/ppc/syslib/indirect_pci.c
arch/ppc/syslib/indirect_pci.c
+14
-6
No files found.
arch/ppc/syslib/indirect_pci.c
View file @
3bb2aab2
...
@@ -21,6 +21,12 @@
...
@@ -21,6 +21,12 @@
#include <asm/pci-bridge.h>
#include <asm/pci-bridge.h>
#include <asm/machdep.h>
#include <asm/machdep.h>
#ifdef CONFIG_PPC_INDIRECT_PCI_BE
#define PCI_CFG_OUT out_be32
#else
#define PCI_CFG_OUT out_le32
#endif
static
int
static
int
indirect_read_config
(
struct
pci_bus
*
bus
,
unsigned
int
devfn
,
int
offset
,
indirect_read_config
(
struct
pci_bus
*
bus
,
unsigned
int
devfn
,
int
offset
,
int
len
,
u32
*
val
)
int
len
,
u32
*
val
)
...
@@ -37,9 +43,10 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
...
@@ -37,9 +43,10 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
if
(
bus
->
number
!=
hose
->
first_busno
)
if
(
bus
->
number
!=
hose
->
first_busno
)
cfg_type
=
1
;
cfg_type
=
1
;
out_be32
(
hose
->
cfg_addr
,
PCI_CFG_OUT
(
hose
->
cfg_addr
,
(((
offset
&
0xfc
)
|
cfg_type
)
<<
24
)
|
(
devfn
<<
16
)
(
0x80000000
|
((
dev
->
bus
->
number
-
hose
->
bus_offset
)
<<
16
)
|
((
bus
->
number
-
hose
->
bus_offset
)
<<
8
)
|
0x80
);
|
(
dev
->
devfn
<<
8
)
|
((
offset
&
0xfc
)
|
cfg_type
)));
/*
/*
* Note: the caller has already checked that offset is
* Note: the caller has already checked that offset is
* suitably aligned and that len is 1, 2 or 4.
* suitably aligned and that len is 1, 2 or 4.
...
@@ -75,9 +82,10 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
...
@@ -75,9 +82,10 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
if
(
bus
->
number
!=
hose
->
first_busno
)
if
(
bus
->
number
!=
hose
->
first_busno
)
cfg_type
=
1
;
cfg_type
=
1
;
out_be32
(
hose
->
cfg_addr
,
PCI_CFG_OUT
(
hose
->
cfg_addr
,
(((
offset
&
0xfc
)
|
cfg_type
)
<<
24
)
|
(
devfn
<<
16
)
(
0x80000000
|
((
dev
->
bus
->
number
-
hose
->
bus_offset
)
<<
16
)
|
((
bus
->
number
-
hose
->
bus_offset
)
<<
8
)
|
0x80
);
|
(
dev
->
devfn
<<
8
)
|
((
offset
&
0xfc
)
|
cfg_type
)));
/*
/*
* Note: the caller has already checked that offset is
* Note: the caller has already checked that offset is
* suitably aligned and that len is 1, 2 or 4.
* suitably aligned and that len is 1, 2 or 4.
...
...
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