Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2032695ybv; Sun, 23 Feb 2020 21:10:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwmNz663WXhlxgCIcmDPz40jUDrqZPbWUfWfhfa6ARsUWuRu9Qv7ItcFV4uT+brDneCnojW X-Received: by 2002:a05:6830:1f0c:: with SMTP id u12mr37975547otg.253.1582521042508; Sun, 23 Feb 2020 21:10:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582521042; cv=none; d=google.com; s=arc-20160816; b=Uf9Nr2ztGuxhVB4l4vu6s6yE9FNoaFTThIDzd05x4a/4sC6bCWWywCfvpiMdXIYdyH BlmUOl3B140mvKFGIv/QqgkJIlAD+oFs9exjO9EB9N7NXHRnwOEq8PuLTA+fJjRnH5R/ w57NUDZhz2bM/hhKkQUOWjv8cGDkI+Q/s5RvTsys6haI/EyIEFMK3slaI2yMQtbDjLwI 0CFNsZwC2gkurf2HgL4gQNuyo0Yyh7otwe/mEaL/YnXteMjNyTL6VqgWk2ik71WNa+Nh T+/XhTb4QoGiUyVul+reJ7tZMY8z76lSWFySbeDyBIxrz3YopMVlkGVSoM7geiQo+DGb 20kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Pw+D2a+3OphgFS87lvewjCiL6zcqZD5p3bEKHdKJQPY=; b=wHWUUNr5tUmjDauGAUi/XtEYT1jsjhAloKaYoggLw609xHwInrmygsw6x4VJjPuCKI yk5EYXhaFAMbzp3xEtAObWA8wAoUJsMdTeJf3OXpe2zT4Tid0hRTGlaer/IMNUEpSt64 Jx0RtwSg/7geRfaa8RZcGrxrdGIheHtlwDnhpIoltAzhF7HTFZ+n5RS6Qyb5cbd6WYpZ any+R3KCWQjymi7ElZy1aWbBUAvWHNhHqV5DXBtsitC6SeHrZcmaXf1QNFYMyj2tuKN6 MuL/CF5g+1eUnyIXf/o6jhmaOL6KgjI4TySNCdcz4LHXJbYlpzACmFkLOXDvRm7wjT8B OHvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BGFsWs+V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u123si4830358oif.84.2020.02.23.21.10.30; Sun, 23 Feb 2020 21:10:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BGFsWs+V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727242AbgBXFJE (ORCPT + 99 others); Mon, 24 Feb 2020 00:09:04 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:44680 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbgBXFJD (ORCPT ); Mon, 24 Feb 2020 00:09:03 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 01O58rcf043304; Sun, 23 Feb 2020 23:08:53 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1582520933; bh=Pw+D2a+3OphgFS87lvewjCiL6zcqZD5p3bEKHdKJQPY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=BGFsWs+Vf5TCmMo+FWtOa9Qwa/bfmLzFs8GLypVP1OoZSlxq0b/WY4TZ35uud2uIv kEXpnyt5VeqNGuQARTkdzn6HhT0JXO6lnCq6KMXeGZI1ZGwXpdwWpS/ojkd1XqHcBz URVEXzBcu4aKPZXBji+RVOrSmtlCiA78tsWXCffw= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 01O58rSA072847 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 23 Feb 2020 23:08:53 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Sun, 23 Feb 2020 23:08:52 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Sun, 23 Feb 2020 23:08:52 -0600 Received: from uda0131933.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 01O58g4p113272; Sun, 23 Feb 2020 23:08:49 -0600 From: Lokesh Vutla To: Tony Lindgren , Daniel Lezcano , Thomas Gleixner CC: Linux OMAP Mailing List , , , Sekhar Nori , Tero Kristo , Lokesh Vutla Subject: [PATCH 2/2] clocksource: timer-ti-dm: Do not update counter on updating the period Date: Mon, 24 Feb 2020 10:37:53 +0530 Message-ID: <20200224050753.17784-3-lokeshvutla@ti.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200224050753.17784-1-lokeshvutla@ti.com> References: <20200224050753.17784-1-lokeshvutla@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Write to trigger register(OMAP_TIMER_TRIGGER_REG) will load the value in Load register(OMAP_TIMER_LOAD_REG) into Counter register (OMAP_TIMER_COUNTER_REG). omap_dm_timer_set_load() writes into trigger register every time load register is updated. When timer is configured in pwm mode, this causes disruption in current pwm cycle, which is not expected especially when pwm is used as PPS signal for synchronized PTP clocks. So do not write into trigger register on updating the period. Signed-off-by: Lokesh Vutla --- drivers/clocksource/timer-ti-dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index 40742715ed21..62b145ef3bb8 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -574,7 +574,6 @@ static int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); - omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); /* Save the context */ timer->context.tclr = l; timer->context.tldr = load; -- 2.23.0