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
7
Merge Requests
7
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
5cd6425d
Commit
5cd6425d
authored
May 03, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ertm14: fix build (to be reverted before merging)
parent
a81832bc
Pipeline
#4490
passed with stage
in 2 minutes and 20 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
20 deletions
+20
-20
board.c
boards/ertm14/board.c
+11
-8
cmd_ertm14.c
boards/ertm14/cmd_ertm14.c
+4
-3
common-uart-link.c
boards/ertm14/common-uart-link.c
+3
-3
ad7888.c
dev/ad7888.c
+0
-4
ad9910.c
dev/ad9910.c
+1
-1
console.c
dev/console.c
+1
-1
No files found.
boards/ertm14/board.c
View file @
5cd6425d
...
...
@@ -58,6 +58,7 @@
#include "sensors.h"
#include "softpll_ng.h"
#include "storage.h"
#include "net.h"
#include "wrc_ptp.h"
#include <hw/wr_streamers.h>
...
...
@@ -909,7 +910,7 @@ static void dds_state_order(struct ertm14_dds_state *dds, int hton)
static
void
board_state_to_no
(
struct
ertm14_board_state
*
dds
,
int
hton
)
{
struct
ertm14_board_state
r
,
*
result
=
&
r
;
struct
ertm14_board_state
*
result
=
dds
;
int
i
;
uint32_t
(
*
convert
)(
uint32_t
hostlong
)
=
(
hton
?
htonl
:
ntohl
);
...
...
@@ -1082,8 +1083,9 @@ void ertm14_apply_config(struct ertm14_board_state *cfg,
if
(
apply_dds_config
(
&
board
.
dds_ad9910_lo
,
&
cfg
->
lo
,
&
ertm14_current_state
->
lo
,
&
mask
->
lo
,
force_all
)
)
event_post
(
WRC_ERTM14_EVENT_LO_RECONFIGURED
);
if
(
apply_dds_config
(
&
board
.
dds_ad9910_ref
,
&
cfg
->
ref
,
&
ertm14_current_state
->
ref
,
&
mask
->
ref
,
force_all
)
)
if
(
apply_dds_config
(
&
board
.
dds_ad9910_ref
,
&
cfg
->
ref
,
&
ertm14_current_state
->
ref
,
&
mask
->
ref
,
force_all
)
)
{
event_post
(
WRC_ERTM14_EVENT_REF_RECONFIGURED
);
}
for
(
i
=
ERTM14_RF_OUT_MIN_ID
;
i
<=
ERTM14_RF_OUT_MAX_ID
;
i
++
)
{
int
st_lo
=
cfg
->
lo
.
out_state
[
i
]
==
ERTM15_RF_OUT_ON
?
1
:
0
;
...
...
@@ -1139,10 +1141,10 @@ void get_version_info(struct ertm14_version_info *bi)
/* FIXME: no mac2? */
copy_eth_addr
(
bi
->
ertm14_mac1_bytes
,
wrc_endpoint_dev
.
mac_addr
);
/* FIXME: wrpc_sw_version makes no sense here */
strncpy
(
bi
->
wrpc_sw_commit_id
,
stats
.
commit_id
,
sizeof
(
bi
->
wrpc_sw_commit_id
));
strncpy
(
bi
->
wrpc_sw_build_date
,
stats
.
build_date
,
sizeof
(
bi
->
wrpc_sw_build_date
));
strncpy
(
bi
->
wrpc_sw_build_time
,
stats
.
build_time
,
sizeof
(
bi
->
wrpc_sw_build_time
));
strncpy
(
bi
->
wrpc_sw_build_by
,
stats
.
build_by
,
sizeof
(
bi
->
wrpc_sw_build_by
));
strncpy
(
bi
->
wrpc_sw_commit_id
,
build_id
.
commit_id
,
sizeof
(
bi
->
wrpc_sw_commit_id
));
strncpy
(
bi
->
wrpc_sw_build_date
,
build_id
.
build_date
,
sizeof
(
bi
->
wrpc_sw_build_date
));
strncpy
(
bi
->
wrpc_sw_build_time
,
build_id
.
build_time
,
sizeof
(
bi
->
wrpc_sw_build_time
));
strncpy
(
bi
->
wrpc_sw_build_by
,
build_id
.
build_by
,
sizeof
(
bi
->
wrpc_sw_build_by
));
strncpy
(
bi
->
ertm14_firmware_version
,
ertm14_board_info
.
git_tag
,
sizeof
(
bi
->
ertm14_firmware_version
));
...
...
@@ -2492,7 +2494,7 @@ int wrc_board_early_init()
else
board_dbg
(
"Calibration data: %d UTC timestamp
\n
"
,
cd
);
net_rst
();
net_rst
();
int
ll
=
ertm14_low_level_init
();
...
...
@@ -2522,7 +2524,8 @@ static void mmc_show_version_info( const char *brdname, struct ertm14_mmc_state
pp_printf
(
"MMC Build Info for %s:
\n
"
,
brdname
);
pp_printf
(
" - Git build commit : %32s
\n
"
,
st
->
info
.
git_sha
);
pp_printf
(
" - Git build tag : %32s
\n
"
,
st
->
info
.
git_tag
);
pp_printf
(
" - Build date : %d (Unix)
\n
"
,
bswap32
(
st
->
info
.
build_date
)
);
pp_printf
(
" - Build date : %u (Unix)
\n
"
,
(
unsigned
)
bswap32
(
st
->
info
.
build_date
)
);
pp_printf
(
" - Serial Number : %32s
\n
"
,
st
->
info
.
board_serial_number
);
}
...
...
boards/ertm14/cmd_ertm14.c
View file @
5cd6425d
...
...
@@ -42,7 +42,8 @@ static void dump_dds_state( const char *name, struct ertm14_dds_state *cfg )
int
i
;
uint64_t
freq
=
ad9910_ftw_to_frequency
(
cfg
->
ftw
);
pp_printf
(
"%s DDS FTW: 0x%08x (%d Hz)
\n
"
,
name
,
(
uint32_t
)
cfg
->
ftw
,
(
uint32_t
)
freq
);
pp_printf
(
"%s DDS FTW: 0x%08x (%d Hz)
\n
"
,
name
,
(
unsigned
)
cfg
->
ftw
,
(
unsigned
)
freq
);
pp_printf
(
"%s DDS amplitude factor: %d
\n
"
,
name
,
cfg
->
ampl_factor
);
pp_printf
(
"%s DDS measured power: %d.%02d dBm
\n
"
,
name
,
cfg
->
amp_power
/
1000
,
cfg
->
amp_power
%
1000
);
pp_printf
(
"%s outputs:
\n
"
,
name
);
...
...
@@ -63,8 +64,8 @@ static void dump_config( struct ertm14_board_state *cfg )
for
(
i
=
0
;
i
<=
ERTM14_CLKAB_OUT_MAX_ID
;
i
++
)
{
pp_printf
(
" - CLKA%02d: %-20d Hz (%s) CLKB%02d: %-20d Hz (%s)
\n
"
,
i
,
cfg
->
clka_freq_hz
[
i
],
(
cfg
->
clka_enable_mask
&
(
1
<<
i
))
?
"ON "
:
"OFF"
,
i
,
cfg
->
clkb_freq_hz
[
i
],
(
cfg
->
clkb_enable_mask
&
(
1
<<
i
))
?
"ON "
:
"OFF"
);
i
,
(
unsigned
)
cfg
->
clka_freq_hz
[
i
],
(
cfg
->
clka_enable_mask
&
(
1
<<
i
))
?
"ON "
:
"OFF"
,
i
,
(
unsigned
)
cfg
->
clkb_freq_hz
[
i
],
(
cfg
->
clkb_enable_mask
&
(
1
<<
i
))
?
"ON "
:
"OFF"
);
}
}
...
...
boards/ertm14/common-uart-link.c
View file @
5cd6425d
...
...
@@ -119,7 +119,7 @@ if(link->state != LINK_STATE_IDLE && link->extra_verbose)
link
->
check_crc
=
crc_xmodem_update
(
0
,
0x55
);
#ifndef __linux__
if
(
link
->
extra_verbose
)
pp_printf
(
"RxS %d
\n
"
,
timer_get_tics
()
);
pp_printf
(
"RxS %d
\n
"
,
(
unsigned
)
timer_get_tics
()
);
link
->
ts
=
timer_get_tics
();
#endif
...
...
@@ -162,7 +162,7 @@ if(link->state != LINK_STATE_IDLE && link->extra_verbose)
#ifndef __linux__
if
(
link
->
extra_verbose
)
pp_printf
(
"RxPL %d
\n
"
,
timer_get_tics
()
);
pp_printf
(
"RxPL %d
\n
"
,
(
int
)
timer_get_tics
()
);
// link->ts = timer_get_tics();
#endif
...
...
@@ -205,7 +205,7 @@ if(link->state != LINK_STATE_IDLE && link->extra_verbose)
*
pkt
=
&
link
->
rx_packet
;
#ifndef __linux__
if
(
link
->
extra_verbose
)
pp_printf
(
"RxF %d [%d] size %d
\n
"
,
timer_get_tics
(),
timer_get_tics
()
-
link
->
ts
,
link
->
rx_count
);
pp_printf
(
"RxF %d [%d] size %d
\n
"
,
(
int
)
timer_get_tics
(),
(
int
)
timer_get_tics
()
-
link
->
ts
,
link
->
rx_count
);
#endif
return
RX_FSM_GOT_PACKET
;
...
...
dev/ad7888.c
View file @
5cd6425d
...
...
@@ -29,10 +29,6 @@
extern
struct
gpio_device
gpio_aux
;
static
const
struct
gpio_pin
pin_mon_adc_sclk
=
{
&
gpio_aux
,
45
};
static
const
struct
gpio_pin
pin_mon_adc_dout
=
{
&
gpio_aux
,
46
};
static
const
struct
gpio_pin
pin_mon_adc_din
=
{
&
gpio_aux
,
47
};
static
int
first_bit_set_after
(
uint32_t
mask
,
int
n
)
{
int
i
;
...
...
dev/ad9910.c
View file @
5cd6425d
...
...
@@ -147,7 +147,7 @@ void ad9910_enable_external_ioupdate( struct ad9910_device *dev, int enable )
{
uint64_t
cfr2
=
ad9910_read
(
dev
,
1
,
32
);
pp_printf
(
"CFR2 = 0x%08x
\n
"
,
(
u
int32_t
)
cfr2
);
pp_printf
(
"CFR2 = 0x%08x
\n
"
,
(
u
nsigned
)
cfr2
);
if
(
enable
)
cfr2
&=
~
(
1
<<
23
);
...
...
dev/console.c
View file @
5cd6425d
...
...
@@ -193,7 +193,7 @@ static inline int rbuf_get( struct ring_buffer* buf )
if
(
!
buf
->
count
)
return
-
1
;
int
rv
=
buf
->
data
[
buf
->
tail
];
int
rv
=
buf
->
data
[
buf
->
tail
];
buf
->
tail
++
;
if
(
buf
->
tail
>=
buf
->
size
)
...
...
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