Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3287160pxu; Tue, 8 Dec 2020 08:12:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxf4qaJgYPL78gGmwCfRgdnpWyHwCs+kr60vfefb2ByqxAqvur+Mgbr4pIsCfwWHFlY8nDt X-Received: by 2002:a17:906:4058:: with SMTP id y24mr23093215ejj.245.1607443923924; Tue, 08 Dec 2020 08:12:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607443923; cv=none; d=google.com; s=arc-20160816; b=ArvjlRDr+P/8lgRI+NxHXRT2sg9NdKozRkvEwU/AW7f05W+tPLaMqBQcDeQMCs6sqe uq0cCuS8VKPcmKoSLkgqtKLkFuGe1T2m0677Bm8gDGACRjMV3W02VHd4UQU7efPvt1Wp 3SGvJiykQO4CCs0iOirWvKVgSs2Xkcz0eZxa1AeVSJXoH0fS5kOvOgTOfo71zg/rPO3q IfOQd+s4RfKtvDOeH7E4yVBsgJHVtlAtbJg/ILZYYfkcrZqASVGLnM558GEk0+hUifjC IGEd27H1qNGnhkQJNVhpndHjMmZzjLu+scFuZ9YNfu3O5bbn0pcNQmM8BvG25qszsCMf gkJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=L7aNGZimhTIBKJdvHEJe+zIlTtx5UAIqyR7m/PatItI=; b=g8Z2E8P5TY4tkS16QhoGWgEjSy/viLZxDBNba2cdgKdIKWo1wIqYbDrba3uTdn6YpY 0Sd4fzjz5biHczqv+J27Qn7sozs7pTHkTcNethXH2zzHrRB0c0S3GL2I0Cy5a9e5xs0e 0kzzLCh1YWUyTYZpEFTW7irzQ3NkBDgdWBabptt0ezQILQbVFlQ9jmWecBLQKNz3tuQ+ Iuqvi+XWTNZxv8txEljCSf/V1UaCpuAoemDEZyBAFTbw3ydng7RjKf2GSIqYFLvXqGgn +4qokpOxoMb6iqmSLPPWsKVCf75nvqqywmhsYSYor7u+clcTvmtmm6aa0807l/DN5hOy Umkg== 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 d64si10574507edd.257.2020.12.08.08.11.38; Tue, 08 Dec 2020 08:12:03 -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 S1730391AbgLHQG1 (ORCPT + 99 others); Tue, 8 Dec 2020 11:06:27 -0500 Received: from pbmsgap01.intersil.com ([192.157.179.201]:55312 "EHLO pbmsgap01.intersil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730302AbgLHQG1 (ORCPT ); Tue, 8 Dec 2020 11:06:27 -0500 Received: from pps.filterd (pbmsgap01.intersil.com [127.0.0.1]) by pbmsgap01.intersil.com (8.16.0.42/8.16.0.42) with SMTP id 0B8FgVKh003837; Tue, 8 Dec 2020 10:42:31 -0500 Received: from pbmxdp01.intersil.corp (pbmxdp01.pb.intersil.com [132.158.200.222]) by pbmsgap01.intersil.com with ESMTP id 3586m79gkj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 08 Dec 2020 10:42:31 -0500 Received: from pbmxdp01.intersil.corp (132.158.200.222) 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; Tue, 8 Dec 2020 10:42:29 -0500 Received: from localhost (132.158.202.109) by pbmxdp01.intersil.corp (132.158.200.222) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Tue, 8 Dec 2020 10:42:29 -0500 From: To: CC: , , Min Li Subject: [PATCH net-next 2/4] ptp: clockmatrix: remove 5 second delay before entering write phase mode Date: Tue, 8 Dec 2020 10:41:55 -0500 Message-ID: <1607442117-13661-2-git-send-email-min.li.xe@renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1607442117-13661-1-git-send-email-min.li.xe@renesas.com> References: <1607442117-13661-1-git-send-email-min.li.xe@renesas.com> 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.343,18.0.737 definitions=2020-12-08_11:2020-12-08,2020-12-08 signatures=0 X-Proofpoint-Spam-Details: rule=junk_notspam policy=junk score=0 spamscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 suspectscore=4 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012080096 X-Proofpoint-Spam-Reason: mlx Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Min Li Remove write phase mode 5 second setup delay, not needed. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 22 ---------------------- drivers/ptp/ptp_clockmatrix.h | 1 - 2 files changed, 23 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c index 0ccda22..7a660bc 100644 --- a/drivers/ptp/ptp_clockmatrix.c +++ b/drivers/ptp/ptp_clockmatrix.c @@ -70,16 +70,6 @@ static int contains_full_configuration(const struct firmware *fw) return (count >= full_count); } -static long set_write_phase_ready(struct ptp_clock_info *ptp) -{ - struct idtcm_channel *channel = - container_of(ptp, struct idtcm_channel, caps); - - channel->write_phase_ready = 1; - - return 0; -} - static int char_array_to_timespec(u8 *buf, u8 count, struct timespec64 *ts) @@ -1339,16 +1329,8 @@ static int _idtcm_adjphase(struct idtcm_channel *channel, s32 delta_ns) if (err) return err; - - channel->write_phase_ready = 0; - - ptp_schedule_worker(channel->ptp_clock, - msecs_to_jiffies(WR_PHASE_SETUP_MS)); } - if (!channel->write_phase_ready) - delta_ns = 0; - offset_ps = (s64)delta_ns * 1000; /* @@ -1928,7 +1910,6 @@ static const struct ptp_clock_info idtcm_caps_v487 = { .gettime64 = &idtcm_gettime, .settime64 = &idtcm_settime_v487, .enable = &idtcm_enable, - .do_aux_work = &set_write_phase_ready, }; static const struct ptp_clock_info idtcm_caps = { @@ -1941,7 +1922,6 @@ static const struct ptp_clock_info idtcm_caps = { .gettime64 = &idtcm_gettime, .settime64 = &idtcm_settime, .enable = &idtcm_enable, - .do_aux_work = &set_write_phase_ready, }; static int configure_channel_pll(struct idtcm_channel *channel) @@ -2111,8 +2091,6 @@ static int idtcm_enable_channel(struct idtcm *idtcm, u32 index) if (!channel->ptp_clock) return -ENOTSUPP; - channel->write_phase_ready = 0; - dev_info(&idtcm->client->dev, "PLL%d registered as ptp%d\n", index, channel->ptp_clock->index); diff --git a/drivers/ptp/ptp_clockmatrix.h b/drivers/ptp/ptp_clockmatrix.h index 713e41a..dd3436e 100644 --- a/drivers/ptp/ptp_clockmatrix.h +++ b/drivers/ptp/ptp_clockmatrix.h @@ -125,7 +125,6 @@ struct idtcm_channel { enum pll_mode pll_mode; u8 pll; u16 output_mask; - int write_phase_ready; }; struct idtcm { -- 2.7.4