Skip to content

Commit 6e57f93

Browse files
Min LiNipaLocal
authored andcommitted
ptp: clockmatrix: Fix u8 -> u16, DPLL_WF_TIMER and DPLL_WP_TIMER are 2-byte registers
Signed-off-by: Min Li <min.li.xe@renesas.com> Signed-off-by: NipaLocal <nipa@local>
1 parent b125118 commit 6e57f93

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/ptp/ptp_clockmatrix.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,18 +1396,18 @@ static int idtcm_set_pll_mode(struct idtcm_channel *channel,
13961396
struct idtcm *idtcm = channel->idtcm;
13971397
int err;
13981398
u8 dpll_mode;
1399-
u8 timeout = 0;
1399+
u8 buf[2] = {0};
14001400

14011401
/* Setup WF/WP timer for phase pull-in to work correctly */
14021402
err = idtcm_write(idtcm, channel->dpll_n, DPLL_WF_TIMER,
1403-
&timeout, sizeof(timeout));
1403+
buf, sizeof(buf));
14041404
if (err)
14051405
return err;
14061406

14071407
if (mode == PLL_MODE_WRITE_PHASE)
1408-
timeout = 160;
1408+
buf[0] = 160;
14091409
err = idtcm_write(idtcm, channel->dpll_n, DPLL_WP_TIMER,
1410-
&timeout, sizeof(timeout));
1410+
buf, sizeof(buf));
14111411
if (err)
14121412
return err;
14131413

0 commit comments

Comments
 (0)