mbox series

[v3,net-next,0/7] ptp: ptp_clockmatrix: Fix output 1 PPS alignment.

Message ID 1613540538-23792-1-git-send-email-vincent.cheng.xh@renesas.com (mailing list archive)
Headers show
Series ptp: ptp_clockmatrix: Fix output 1 PPS alignment. | expand

Message

Vincent Cheng Feb. 17, 2021, 5:42 a.m. UTC
From: Vincent Cheng <vincent.cheng.xh@renesas.com>

This series fixes a race condition that may result in the output clock
not aligned to internal 1 PPS clock.

Part of device initialization is to align the rising edge of output
clocks to the internal rising edge of the 1 PPS clock.  If the system
APLL and DPLL are not locked when this alignment occurs, the alignment
fails and a fixed offset between the internal 1 PPS clock and the
output clock occurs.

If a clock is dynamically enabled after power-up, the output clock
also needs to be aligned to the internal 1 PPS clock.

v3:
Suggested by: Jakub Kicinski <kuba@kernel.org>
- Remove unnecessary 'err' variable
- Increase msleep()/loop accuracy by using jiffies in while()
- No empty lines between variables
- No empty lines between call and the if
- parenthesis around a == b are unnecessary
- Inconsistent \n usage in dev_()
- Remove unnecessary empty line
- Leave string format in place so static code checkers can
  validate arguments

v2:
Suggested by: Richard Cochran <richardcochran@gmail.com>
- Added const to "char * fmt"
- Break unrelated header change into separate patch

Vincent Cheng (7):
  ptp: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.
  ptp: ptp_clockmatrix: Add alignment of 1 PPS to idtcm_perout_enable.
  ptp: ptp_clockmatrix: Remove unused header declarations.
  ptp: ptp_clockmatrix: Clean-up dev_*() messages.
  ptp: ptp_clockmatrix: Coding style - tighten vertical spacing.
  ptp: ptp_clockmatrix: Simplify code - remove unnecessary `err`
    variable.
  ptp: ptp_clockmatrix: clean-up - parenthesis around a == b are
    unnecessary

 drivers/ptp/idt8a340_reg.h    |  10 ++
 drivers/ptp/ptp_clockmatrix.c | 313 ++++++++++++++++++------------------------
 drivers/ptp/ptp_clockmatrix.h |  17 ++-
 3 files changed, 162 insertions(+), 178 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 17, 2021, 10 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Wed, 17 Feb 2021 00:42:11 -0500 you wrote:
> From: Vincent Cheng <vincent.cheng.xh@renesas.com>
> 
> This series fixes a race condition that may result in the output clock
> not aligned to internal 1 PPS clock.
> 
> Part of device initialization is to align the rising edge of output
> clocks to the internal rising edge of the 1 PPS clock.  If the system
> APLL and DPLL are not locked when this alignment occurs, the alignment
> fails and a fixed offset between the internal 1 PPS clock and the
> output clock occurs.
> 
> [...]

Here is the summary with links:
  - [v3,net-next,1/7] ptp: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.
    https://git.kernel.org/netdev/net-next/c/797d3186544f
  - [v3,net-next,2/7] ptp: ptp_clockmatrix: Add alignment of 1 PPS to idtcm_perout_enable.
    https://git.kernel.org/netdev/net-next/c/e8b4d8b542b1
  - [v3,net-next,3/7] ptp: ptp_clockmatrix: Remove unused header declarations.
    https://git.kernel.org/netdev/net-next/c/10c270cf25bd
  - [v3,net-next,4/7] ptp: ptp_clockmatrix: Clean-up dev_*() messages.
    https://git.kernel.org/netdev/net-next/c/1c49d3e94778
  - [v3,net-next,5/7] ptp: ptp_clockmatrix: Coding style - tighten vertical spacing.
    https://git.kernel.org/netdev/net-next/c/fcfd37573a09
  - [v3,net-next,6/7] ptp: ptp_clockmatrix: Simplify code - remove unnecessary `err` variable.
    https://git.kernel.org/netdev/net-next/c/fde3b3a7069e
  - [v3,net-next,7/7] ptp: ptp_clockmatrix: clean-up - parenthesis around a == b are unnecessary
    https://git.kernel.org/netdev/net-next/c/77fdb168a3e2

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html