Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FPGA Configuration Space
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FPGA Configuration Space
Commits
b2006bff
Commit
b2006bff
authored
May 09, 2012
by
Wesley W. Terpstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In PCIe, we only need barriers after non-posted operations.
parent
404772f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
pcie_wb.c
driver/pcie_wb.c
+10
-7
No files found.
driver/pcie_wb.c
View file @
b2006bff
...
...
@@ -168,21 +168,24 @@ static wb_data_t wb_read(struct wishbone* wb, wb_addr_t addr)
static
wb_data_t
wb_read_cfg
(
struct
wishbone
*
wb
,
wb_addr_t
addr
)
{
wb_data_t
out
;
struct
pcie_wb_dev
*
dev
;
unsigned
char
*
control
;
dev
=
container_of
(
wb
,
struct
pcie_wb_dev
,
wb
);
control
=
dev
->
pci_res
[
0
].
addr
;
rmb
();
// has to be executed before reading
switch
(
addr
)
{
case
0
:
return
ioread32
(
control
+
ERROR_FLAG_HIGH
)
;
case
4
:
return
ioread32
(
control
+
ERROR_FLAG_LOW
)
;
case
8
:
return
0
;
// ioread32(control + SDWB_ADDRESS_HIGH)
;
case
12
:
return
0x300000
;
// ioread32(control + SDWB_ADDRESS_LOW)
;
default:
return
0
;
case
0
:
out
=
ioread32
(
control
+
ERROR_FLAG_HIGH
);
break
;
case
4
:
out
=
ioread32
(
control
+
ERROR_FLAG_LOW
);
break
;
case
8
:
out
=
ioread32
(
control
+
SDWB_ADDRESS_HIGH
);
break
;
case
12
:
out
=
ioread32
(
control
+
SDWB_ADDRESS_LOW
);
break
;
default:
out
=
0
;
break
;
}
mb
();
/* ensure serial ordering of non-posted operations for wishbone */
return
out
;
}
static
const
struct
wishbone_operations
wb_ops
=
{
...
...
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