Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
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
Software for White Rabbit PTP Core
Commits
f7dc881c
Commit
f7dc881c
authored
Feb 09, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrs files: trivial: fix missing return statements
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
6d5af797
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
ad9516.c
dev/ad9516.c
+4
-1
rt_ipc.c
ipc/rt_ipc.c
+8
-4
No files found.
dev/ad9516.c
View file @
f7dc881c
...
...
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <wrc.h>
#include "board.h"
#include "syscon.h"
...
...
@@ -185,7 +186,7 @@ int ad9516_set_output_divider(int output, int ratio, int phase_offset)
ad9516_write_reg
(
0x232
,
0x0
);
ad9516_write_reg
(
0x232
,
0x1
);
ad9516_write_reg
(
0x232
,
0x0
);
return
0
;
}
int
ad9516_set_vco_divider
(
int
ratio
)
/* Sets the VCO divider (2..6) or 0 to enable static output */
...
...
@@ -195,6 +196,7 @@ int ad9516_set_vco_divider(int ratio) /* Sets the VCO divider (2..6) or 0 to ena
else
ad9516_write_reg
(
0x1e0
,
(
ratio
-
2
));
ad9516_write_reg
(
0x232
,
0x1
);
return
0
;
}
void
ad9516_sync_outputs
()
...
...
@@ -271,4 +273,5 @@ int rts_debug_command(int command, int value)
}
break
;
}
return
0
;
}
ipc/rt_ipc.c
View file @
f7dc881c
...
...
@@ -10,6 +10,7 @@
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <wrc.h>
#include "minipc.h"
...
...
@@ -95,7 +96,7 @@ int rts_lock_channel(int channel, int priority)
return
0
;
}
int
rts_init
()
void
rts_init
()
{
clear_state
();
}
...
...
@@ -177,6 +178,7 @@ static int rts_set_mode_func(const struct minipc_pd *pd, uint32_t *args, void *r
{
pstate
.
ipc_count
++
;
*
(
int
*
)
ret
=
rts_set_mode
(
args
[
0
]);
return
0
;
}
...
...
@@ -184,12 +186,14 @@ static int rts_lock_channel_func(const struct minipc_pd *pd, uint32_t *args, voi
{
pstate
.
ipc_count
++
;
*
(
int
*
)
ret
=
rts_lock_channel
(
args
[
0
],
(
int
)
args
[
1
]);
return
0
;
}
static
int
rts_adjust_phase_func
(
const
struct
minipc_pd
*
pd
,
uint32_t
*
args
,
void
*
ret
)
{
pstate
.
ipc_count
++
;
*
(
int
*
)
ret
=
rts_adjust_phase
((
int
)
args
[
0
],
(
int
)
args
[
1
]);
return
0
;
}
static
int
rts_enable_ptracker_func
(
const
struct
minipc_pd
*
pd
,
uint32_t
*
args
,
void
*
ret
)
...
...
@@ -197,23 +201,23 @@ static int rts_enable_ptracker_func(const struct minipc_pd *pd, uint32_t *args,
pstate
.
ipc_count
++
;
spll_enable_ptracker
((
int
)
args
[
0
],
(
int
)
args
[
1
]);
*
(
int
*
)
ret
=
0
;
return
0
;
}
static
int
rts_debug_command_func
(
const
struct
minipc_pd
*
pd
,
uint32_t
*
args
,
void
*
ret
)
{
pstate
.
ipc_count
++
;
*
(
int
*
)
ret
=
rts_debug_command
((
int
)
args
[
0
],
(
int
)
args
[
1
]);
return
0
;
}
/* The mailbox is mapped at 0x7000 in the linker script */
static
__attribute__
((
section
(
".mbox"
)))
_mailbox
[
1024
];
static
struct
minipc_ch
*
server
;
int
rtipc_init
()
{
/* The mailbox is mapped at 0x7000 in the linker script */
server
=
minipc_server_create
(
"mem:7000"
,
0
);
if
(
!
server
)
return
1
;
...
...
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