Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mock-turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
mock-turtle
Commits
c7c932da
Commit
c7c932da
authored
Jul 04, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: minor code improvement
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
e8ffc831
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
mockturtle-core.c
software/kernel/mockturtle-core.c
+2
-6
No files found.
software/kernel/mockturtle-core.c
View file @
c7c932da
...
...
@@ -228,14 +228,10 @@ static long trtl_ioctl_io(struct trtl_dev *trtl, void __user *uarg)
if
(
io
.
addr
>=
trtl
->
cfgrom
.
smem_size
*
4
)
return
-
EINVAL
;
if
(
io
.
is_input
)
{
/* read */
addr
=
trtl
->
base_smem
+
io
.
addr
;
}
else
{
addr
=
trtl
->
base_smem
+
io
.
addr
;
if
(
!
io
.
is_input
)
{
trtl_iowrite
(
trtl
,
io
.
mod
,
trtl
->
base_csr
+
MT_CPU_CSR_REG_SMEM_OP
);
/* write */
addr
=
trtl
->
base_smem
+
io
.
addr
;
trtl_iowrite
(
trtl
,
io
.
value
,
addr
);
}
...
...
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