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
3ea2c092
Commit
3ea2c092
authored
Nov 17, 2011
by
Manohar Vanga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simulation: fix critical bugs. works now :)
Signed-off-by:
Manohar Vanga
<
manohar.vanga@cern.ch
>
parent
f5c56bcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
fake_wb_bus.c
simulation/fake_wb_bus.c
+7
-4
wishbone.c
simulation/wishbone.c
+3
-3
No files found.
simulation/fake_wb_bus.c
View file @
3ea2c092
...
...
@@ -43,7 +43,7 @@ void *fake_read_cfg(wb_addr_t addr, void *buf, size_t len)
{
if
(
wb_fw
->
size
<
addr
+
len
)
return
NULL
;
memcpy
(
buf
,
&
wb_fw
[
addr
],
len
);
memcpy
(
buf
,
&
wb_fw
->
data
[
addr
],
len
);
return
buf
;
}
...
...
@@ -90,8 +90,6 @@ bus_register_fail:
static
void
fake_wbbus_release
(
struct
device
*
dev
)
{
wb_unregister_bus
(
&
fake_wb_bus
);
release_firmware
(
wb_fw
);
}
static
struct
device
fake_wbbus_device
=
{
...
...
@@ -111,12 +109,17 @@ static int __init fake_wb_bus_init(void)
"Wishbone bus
\n
"
);
return
ret
;
}
fake_wbbus_probe
(
&
fake_wbbus_device
);
if
((
ret
=
fake_wbbus_probe
(
&
fake_wbbus_device
))
<
0
)
{
device_unregister
(
&
fake_wbbus_device
);
return
ret
;
}
return
0
;
}
static
void
__exit
fake_wb_bus_exit
(
void
)
{
wb_unregister_bus
(
&
fake_wb_bus
);
release_firmware
(
wb_fw
);
device_unregister
(
&
fake_wbbus_device
);
}
...
...
simulation/wishbone.c
View file @
3ea2c092
...
...
@@ -126,7 +126,7 @@ static struct wb_device *wb_get_next_device(struct wb_bus *bus, wb_addr_t wb_ptr
struct
sdwb_wbd
wbd
;
struct
wb_device
*
wbdev
;
memcpy_from_wb
(
bus
,
wb_ptr
,
(
void
*
)
&
wbd
,
wb_read_cfg
(
bus
,
wb_ptr
,
(
void
*
)
&
wbd
,
sizeof
(
struct
sdwb_wbd
));
if
(
wbd
.
wbd_magic
!=
SDWB_WBD_MAGIC
)
...
...
@@ -151,7 +151,7 @@ int wb_scan_bus(struct wb_bus *bus)
struct
wb_device
*
wbdev
;
struct
wb_device
*
next
;
memcpy_from_wb
(
bus
,
bus
->
sdwb_header_base
,
(
void
*
)
&
head
,
wb_read_cfg
(
bus
,
bus
->
sdwb_header_base
,
(
void
*
)
&
head
,
sizeof
(
struct
sdwb_head
));
/* verify our header using the magic field */
...
...
@@ -161,7 +161,7 @@ int wb_scan_bus(struct wb_bus *bus)
return
-
ENODEV
;
}
memcpy_from_wb
(
bus
,
head
.
wbid_address
,
(
void
*
)
&
wbid
,
wb_read_cfg
(
bus
,
head
.
wbid_address
,
(
void
*
)
&
wbid
,
sizeof
(
struct
sdwb_wbid
));
pr_info
(
KBUILD_MODNAME
": found sdwb bistream: 0x%llx
\n
"
,
wbid
.
bstream_type
);
...
...
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