Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3466608pxb; Fri, 12 Feb 2021 21:41:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJydW6+VSHv8NI75ZZY3zFwNuJbLUnpATnFLEwB3gMezbz1Sshq3UU3+DuFTjB964ppodDYa X-Received: by 2002:a17:906:1118:: with SMTP id h24mr6239215eja.145.1613194882075; Fri, 12 Feb 2021 21:41:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613194882; cv=none; d=google.com; s=arc-20160816; b=lFISYN0GhIQ/kJq9p5icAUCfa/+nixV5tKwRbAtBelbK0DKAgUYos8b60GzA8cNkrI 7HZWEoAsdg1Z87HqxhKln6hRKIZDU0bPWERBpQMPusMjeGUu5LFyRljUCWd5Zrx2D5Gz nL6i1yOJo79EuTYZOpqraUxhQU21LC7zjUgRA1Yjj5D5hflVeXKfYKfHeKCOd+cd9vsV lQKUnru6/Mep/h66sewk5y3FmdJ6Zom+90BU9zE5rF4X5//zmZ7oLOJZ996AinDNuXgQ 0y3XF4cscCSFGYMiZYaLADA89+NlLWa0MS9Cprw87TzqS6p8RdS0r75X8u7Cq6paaR0y tepw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=axnVgajx2N5p9xfOsYJWC/s560wxA92wo/WeKKlGe78=; b=nxR8R5D7SKeES3Dbw++sLjV517FgdojV1kN+/HzJoFao5n92eXiK5sCnwvRvUtG9Mx r12e2cZ/k5XZZrsjPU2GbKBqsF7lbWVOPpsHAqx51IlGZD746e84U5XpfqAcelJLlE2p QQgeWF1VKp233+ZzZ0OGEruKdQdAjXlrIFCqvHBKySdHK4p5DB1PBaIXoB0cKhYUY7UW iilwRuT6lYr0wi76vlhBlgyMEYvqD4OUKQKf8pwgkDXQV/OruwFnSiePjCUhrein8ZXu 0XyrS/lY9o0HBzmNj5vrQstECaMr0TNd12cRAieCtzrfNPp+F7Gr5w1OyKVNOLbjnDr7 wHSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si7387215ejb.442.2021.02.12.21.40.58; Fri, 12 Feb 2021 21:41:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230498AbhBMFgo (ORCPT + 99 others); Sat, 13 Feb 2021 00:36:44 -0500 Received: from pbmsgap02.intersil.com ([192.157.179.202]:51246 "EHLO pbmsgap02.intersil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbhBMFgn (ORCPT ); Sat, 13 Feb 2021 00:36:43 -0500 Received: from pps.filterd (pbmsgap02.intersil.com [127.0.0.1]) by pbmsgap02.intersil.com (8.16.0.42/8.16.0.42) with SMTP id 11D52i4r025400; Sat, 13 Feb 2021 00:06:23 -0500 Received: from pbmxdp01.intersil.corp (pbmxdp01.pb.intersil.com [132.158.200.222]) by pbmsgap02.intersil.com with ESMTP id 36ntxd0ath-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 13 Feb 2021 00:06:22 -0500 Received: from pbmxdp03.intersil.corp (132.158.200.224) by pbmxdp01.intersil.corp (132.158.200.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1979.3; Sat, 13 Feb 2021 00:06:21 -0500 Received: from localhost (132.158.202.108) by pbmxdp03.intersil.corp (132.158.200.224) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Sat, 13 Feb 2021 00:06:21 -0500 From: To: CC: , , Vincent Cheng Subject: [PATCH v2 net-next 0/3] ptp: ptp_clockmatrix: Fix output 1 PPS alignment. Date: Sat, 13 Feb 2021 00:06:03 -0500 Message-ID: <1613192766-14010-1-git-send-email-vincent.cheng.xh@renesas.com> X-Mailer: git-send-email 2.7.4 X-TM-AS-MML: disable MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.737 definitions=2021-02-13_01:2021-02-12,2021-02-12 signatures=0 X-Proofpoint-Spam-Details: rule=junk_notspam policy=junk score=0 mlxlogscore=849 mlxscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102130041 X-Proofpoint-Spam-Reason: mlx Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vincent Cheng 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. v2: Suggested by: Richard Cochran - Added const to "char * fmt" - Break unrelated header change into separate patch Vincent Cheng (3): 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. drivers/ptp/idt8a340_reg.h | 10 +++++ drivers/ptp/ptp_clockmatrix.c | 92 ++++++++++++++++++++++++++++++++++++++++--- drivers/ptp/ptp_clockmatrix.h | 17 +++++++- 3 files changed, 112 insertions(+), 7 deletions(-) -- 2.7.4