Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3995067pxb; Tue, 17 Nov 2020 08:42:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxm2sDwAB3CK7jU2hKknf+8NIvVmVtwGNXAWiEoRnD7fmmMCMyX7V8k5l9uz3kTPPulTk2Z X-Received: by 2002:a17:906:1804:: with SMTP id v4mr20235524eje.201.1605631364097; Tue, 17 Nov 2020 08:42:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605631364; cv=none; d=google.com; s=arc-20160816; b=eopnOTRQBIavizBs70ZO/pkxTU/LJZbdiXo4GNYagWxu8dpoV4AT4V82jqbq0cyVeh 6u+y48m7UqyzV/h7XzqGrs+6YLJlDPvfdhLvj5dGMGfuWfxAn8azMXefR9RlNxnRZnai hoMg9J/AqsLulZxTI/OsWt1VHogbLTubi1ly6n34zw2ysUJ6+Pa9aOUltBw1to3fmWp1 XdgW+WM2ALYkZqqJXsMhybjwEF1o3PH7kGjFte2+ZIgI7dzc1aAKEHo84yDkq6x2H/dI JoLlTpF2qndoztdYj2v+zJYhwZREK2S1+961KJ6A6dbJObj0nKYDxyyCUBJlj6qDTcb7 2D9A== 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=H6zyl+VXw0K3czyhlLTWPsuY+iAtkc3RPGbHn8kaBRs=; b=m9lb+YlDnxP79ND8ONhNU9oEFYN6MlnvpfuU8j7VawSsXPkRvM7/FDCTM8t4LOXbfL 2Bs3QuUT8d5YYCMgQKcZr9/0CxVu4/rZw/thXFB0DGx1XApUfk/6H/LWkIw7cYmjN4vs tQUeuCjUswhfULUmgh6sRs8bTnkAYXVt4b5M+pvOcJAB3vsZzntd2SiR7S63N1L3XCmo TH8NHerN0OhNQdIngFwxO8VkGLX4gViph0cPokBrLzsT9lCDJNvz8YFwkgibCgNcbEIB aCwWB8g84vCsDUSn9Uhd1Hgk75By1L+KoSN+hwt5Z+3KmChUNF3UR5fV6z6JHa593vev TCrQ== 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 ce6si14207892ejb.133.2020.11.17.08.42.17; Tue, 17 Nov 2020 08:42:44 -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 S1727533AbgKQQjj (ORCPT + 99 others); Tue, 17 Nov 2020 11:39:39 -0500 Received: from pbmsgap01.intersil.com ([192.157.179.201]:44142 "EHLO pbmsgap01.intersil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbgKQQjj (ORCPT ); Tue, 17 Nov 2020 11:39:39 -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 0AHFrdgJ028277; Tue, 17 Nov 2020 11:06:33 -0500 Received: from pbmxdp01.intersil.corp (pbmxdp01.pb.intersil.com [132.158.200.222]) by pbmsgap01.intersil.com with ESMTP id 34tbn59bc6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 17 Nov 2020 11:06:33 -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; Tue, 17 Nov 2020 11:06:31 -0500 Received: from localhost (132.158.202.109) by pbmxdp03.intersil.corp (132.158.200.224) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Tue, 17 Nov 2020 11:06:31 -0500 From: To: CC: , , Min Li Subject: [PATCH v2 net-next 3/5] ptp: clockmatrix: remove 5 second delay before entering write phase mode Date: Tue, 17 Nov 2020 11:06:00 -0500 Message-ID: <1605629162-31876-4-git-send-email-min.li.xe@renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1605629162-31876-1-git-send-email-min.li.xe@renesas.com> References: <1605629162-31876-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.312,18.0.737 definitions=2020-11-17_04:2020-11-17,2020-11-17 signatures=0 X-Proofpoint-Spam-Details: rule=junk_notspam policy=junk score=0 adultscore=0 malwarescore=0 bulkscore=0 spamscore=0 mlxlogscore=999 suspectscore=4 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011170115 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 6a3d02b..c06df61 100644 --- a/drivers/ptp/ptp_clockmatrix.c +++ b/drivers/ptp/ptp_clockmatrix.c @@ -72,16 +72,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) @@ -1382,16 +1372,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; /* @@ -1971,7 +1953,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 = { @@ -1984,7 +1965,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) @@ -2154,8 +2134,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