projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff82109
)
net: ethernet: ti: am65-cpts: reset pps genf adj settings on enable
author
Grygorii Strashko
<grygorii.strashko@ti.com>
Thu, 16 Mar 2023 09:52:32 +0000
(15:22 +0530)
committer
Jakub Kicinski
<kuba@kernel.org>
Sat, 18 Mar 2023 05:36:10 +0000
(22:36 -0700)
The CPTS PPS GENf adjustment settings are invalid after it has been
disabled for a while, so reset them.
Fixes: eb9233ce6751 ("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>
drivers/net/ethernet/ti/am65-cpts.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/ti/am65-cpts.c
b/drivers/net/ethernet/ti/am65-cpts.c
index 16ee9c29cb35a5c77bfc186d7903a70519060b7b..8caf85acbb6af1221a6b4a9d35bb99ac3c0645d5 100644
(file)
--- a/
drivers/net/ethernet/ti/am65-cpts.c
+++ b/
drivers/net/ethernet/ti/am65-cpts.c
@@
-636,6
+636,10
@@
static void am65_cpts_perout_enable_hw(struct am65_cpts *cpts,
val = lower_32_bits(cycles);
am65_cpts_write32(cpts, val, genf[req->index].length);
+ am65_cpts_write32(cpts, 0, genf[req->index].control);
+ am65_cpts_write32(cpts, 0, genf[req->index].ppm_hi);
+ am65_cpts_write32(cpts, 0, genf[req->index].ppm_low);
+
cpts->genf_enable |= BIT(req->index);
} else {
am65_cpts_write32(cpts, 0, genf[req->index].length);