diff mbox series

[net-next] net: ethernet: ti: am65-cpts: reset pps genf adj settings on enable

Message ID 20230316095232.2002680-1-s-vadapalli@ti.com (mailing list archive)
State Accepted
Commit 3dacc5bb81472905a7f4f9879cb95477c22dc359
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ethernet: ti: am65-cpts: reset pps genf adj settings on enable | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers fail 1 blamed authors not CCed: grygorii.strashko@ti.com; 1 maintainers not CCed: grygorii.strashko@ti.com
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Siddharth Vadapalli March 16, 2023, 9:52 a.m. UTC
From: Grygorii Strashko <grygorii.strashko@ti.com>

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>
---
 drivers/net/ethernet/ti/am65-cpts.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Roger Quadros March 17, 2023, 11:27 a.m. UTC | #1
On 16/03/2023 11:52, Siddharth Vadapalli wrote:
> From: Grygorii Strashko <grygorii.strashko@ti.com>
> 
> 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>
Michal Swiatkowski March 17, 2023, 12:30 p.m. UTC | #2
On Fri, Mar 17, 2023 at 01:27:36PM +0200, Roger Quadros wrote:
> 
> 
> On 16/03/2023 11:52, Siddharth Vadapalli wrote:
> > From: Grygorii Strashko <grygorii.strashko@ti.com>
> > 
> > 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>

Small nit for the future: should be [PATCH net] instead of net-next when
You sending fixes.

Looks fine, thanks
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
patchwork-bot+netdevbpf@kernel.org March 18, 2023, 5:50 a.m. UTC | #3
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 16 Mar 2023 15:22:32 +0530 you wrote:
> From: Grygorii Strashko <grygorii.strashko@ti.com>
> 
> 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>
> 
> [...]

Here is the summary with links:
  - [net-next] net: ethernet: ti: am65-cpts: reset pps genf adj settings on enable
    https://git.kernel.org/netdev/net/c/3dacc5bb8147

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ti/am65-cpts.c b/drivers/net/ethernet/ti/am65-cpts.c
index 16ee9c29cb35..8caf85acbb6a 100644
--- 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);