Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zt-flink
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Moritz Lammerich
zt-flink
Commits
9013ad4c
Verified
Commit
9013ad4c
authored
7 months ago
by
Moritz Lammerich
Browse files
Options
Downloads
Patches
Plain Diff
fix address math issues
parent
9f570bcf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
axi.c
+1
-1
1 addition, 1 deletion
axi.c
bus.c
+7
-2
7 additions, 2 deletions
bus.c
with
8 additions
and
3 deletions
axi.c
+
1
−
1
View file @
9013ad4c
...
...
@@ -52,7 +52,7 @@ zt_flink_axi_read_register(uint32_t address, void* private_data)
static
void
zt_flink_axi_write_register
(
uint32_t
address
,
uint32_t
value
,
void
*
private_data
)
{
uint
32
_t
*
base
=
(
uint
32
_t
*
)
private_data
;
uint
8
_t
*
base
=
(
uint
8
_t
*
)
private_data
;
iowrite32
(
value
,
base
+
address
);
}
...
...
This diff is collapsed.
Click to expand it.
bus.c
+
7
−
2
View file @
9013ad4c
...
...
@@ -227,12 +227,17 @@ EXPORT_SYMBOL(zt_flink_controller_register);
uint32_t
zt_flink_read_register
(
struct
zt_flink_device
*
device
,
uint32_t
address
)
{
return
device
->
controller
->
read_register
(
device
->
start
+
address
,
device
->
controller
->
private_data
);
uint32_t
offset
=
device
->
start
+
address
;
uint32_t
value
=
device
->
controller
->
read_register
(
offset
,
device
->
controller
->
private_data
);
dev_info
(
&
device
->
dev
,
"read 0x%x at 0x%x"
,
value
,
offset
);
return
value
;
}
EXPORT_SYMBOL
(
zt_flink_read_register
);
void
zt_flink_write_register
(
struct
zt_flink_device
*
device
,
uint32_t
address
,
uint32_t
value
)
{
device
->
controller
->
write_register
(
device
->
start
+
address
,
value
,
device
->
controller
->
private_data
);
uint32_t
offset
=
device
->
start
+
address
;
dev_info
(
&
device
->
dev
,
"writing 0x%x at 0x%x"
,
value
,
offset
);
device
->
controller
->
write_register
(
offset
,
value
,
device
->
controller
->
private_data
);
}
EXPORT_SYMBOL
(
zt_flink_write_register
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment