Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
83
Issues
83
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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
White Rabbit Switch - Software
Commits
519a8ecd
Commit
519a8ecd
authored
Sep 03, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/tools/lm32-loader.c: fix comments (no change)
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
9e31590c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
lm32-loader.c
userspace/tools/lm32-loader.c
+1
-4
No files found.
userspace/tools/lm32-loader.c
View file @
519a8ecd
...
...
@@ -84,20 +84,19 @@ void copy_lm32(uint32_t *buf, int buf_nwords, uint32_t base_addr)
printf
(
"OK.
\n
"
);
}
/* being a lazy bastard, I fork a process to avoid free, munmap etc */
int
load_lm32_child
(
char
*
fname
)
{
uint32_t
*
buf
;
FILE
*
f
;
int
fdmem
;
/* /dev/mem for mmap of both gpio and spi1 */
if
((
fdmem
=
open
(
"/dev/mem"
,
O_RDWR
|
O_SYNC
))
<
0
)
{
fprintf
(
stderr
,
"%s: /dev/mem: %s
\n
"
,
__func__
,
strerror
(
errno
));
exit
(
1
);
}
/* map a whole page (4kB, but we called getpagesize to know it) */
base_fpga
=
mmap
(
0
,
SIZE_FPGA
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fdmem
,
BASE_FPGA
);
...
...
@@ -128,8 +127,6 @@ int load_lm32_child(char *fname)
copy_lm32
(
buf
,
(
size
+
3
)
/
4
,
0
);
rst_lm32
(
0
);
// mbn_stats(mb_handle);
return
0
;
}
...
...
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