Skip to content

Commit 3dacc5b

Browse files
grygoriySkuba-moo
authored andcommitted
net: ethernet: ti: am65-cpts: reset pps genf adj settings on enable
The CPTS PPS GENf adjustment settings are invalid after it has been disabled for a while, so reset them. Fixes: eb9233c ("net: ethernet: ti: am65-cpts: adjust pps following ptp changes") Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://lore.kernel.org/r/20230316095232.2002680-1-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent ff82109 commit 3dacc5b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/ti/am65-cpts.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,10 @@ static void am65_cpts_perout_enable_hw(struct am65_cpts *cpts,
636636
val = lower_32_bits(cycles);
637637
am65_cpts_write32(cpts, val, genf[req->index].length);
638638

639+
am65_cpts_write32(cpts, 0, genf[req->index].control);
640+
am65_cpts_write32(cpts, 0, genf[req->index].ppm_hi);
641+
am65_cpts_write32(cpts, 0, genf[req->index].ppm_low);
642+
639643
cpts->genf_enable |= BIT(req->index);
640644
} else {
641645
am65_cpts_write32(cpts, 0, genf[req->index].length);

0 commit comments

Comments
 (0)