Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp2094105imm; Fri, 6 Jul 2018 11:45:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcNY8MrUzHc8sjRJ5p0/p1sP4S1jSNORbrOFjgpE4y3Yiv+GPV8uT+sJZxlVauuQex3lA7Q X-Received: by 2002:a17:902:15a8:: with SMTP id m37-v6mr11375539pla.219.1530902755490; Fri, 06 Jul 2018 11:45:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530902755; cv=none; d=google.com; s=arc-20160816; b=lzNeOwa+oq7KIf/EteU+zsUJoqur036cZq7BKnZaPnuwshkMypjLHEBuZMhoCaIKXK uvWkesG+t48torYO/cC/LA7x0u/mZcpPrE9STW/K+GK/1p0iKj+A2YiMISa7fsOnY28O kSR20Q5W20a0u9cWuZJsGE1vUwrbpFpvFhVlMRAaZDqrd97iwinCpGD8od0H04IHG5CW DDLSIWDZN9AUOjPRwpXJGaZjqQvNUftX37kxLo0Uqu4SqTMReacfXGwluVUGVL91c1um v/2FF+hIuBwOkfda10ci371CljKmp1mUqMSOarRSTI6O5aGAIAEMEqBbYp/FpPjh6VEx 7aZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=s2bgLLlhLyHW7qceKFyXMqYp88Ub3JuO1EFI33PSEf0=; b=Dmxot/+XqfLh6BP/UhFu4oxIK3ON2SQd8ZdFdFp7dFzV6k3wrKCBYJ93EZYi0CtXm9 D4yzXDXgkeuVJVGYiA5IJbyZHX0b+ey5zKMshRrK8TWIqfU7QwJWxoLCnIGt6aP2FZMa VGHNF3hBELZCfWVkplk6TUMItZXF3HnYZ+JSODnpGgLm9dKBl3F+a0mKRf/vi/xnROwS /d7LFEmXTWmng7lPOZ1PlPA358O6hi27+adBSYruDfAdQ67ZAO6670PjLI3cCNhCmkoe 4dYoCLf8cN/94At2YVKi+feh7j1BEyrxquWzqDVwSORmHt2/locY/EB7IsI1xuzq3qq9 hRUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ffOgNZ+4; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2-v6si8596284plp.233.2018.07.06.11.45.41; Fri, 06 Jul 2018 11:45:55 -0700 (PDT) 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=@linaro.org header.s=google header.b=ffOgNZ+4; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934658AbeGFSpD (ORCPT + 99 others); Fri, 6 Jul 2018 14:45:03 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:45373 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934538AbeGFSoy (ORCPT ); Fri, 6 Jul 2018 14:44:54 -0400 Received: by mail-lj1-f193.google.com with SMTP id q5-v6so9817719ljh.12 for ; Fri, 06 Jul 2018 11:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=s2bgLLlhLyHW7qceKFyXMqYp88Ub3JuO1EFI33PSEf0=; b=ffOgNZ+4CcKQLlIQi5vrnKhm0RQx7pWZzI+lXynpsJ22Vip4ab2RfIQCYcGdW38eKZ xypiHwWAx+xTSFaTjOgtxbQ6kexCHhHQTB76bkkkyXr+vFn7k6+mViuFyidSDqj2enZl tPy2m6ezcg3PqYc6EVoOtBmRlFyP4LOhQAdlg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=s2bgLLlhLyHW7qceKFyXMqYp88Ub3JuO1EFI33PSEf0=; b=qe1a2ytCsHkD370YAwt7UkwddxYgPn0/ZJW6tcnC8tSAItAiiqHNd6DLeewoU0vrd4 JiYzDru7CjyHKO4K3AdivubAdSUAbAOSjM9rhiJKyQIasaINlNxcSRXsclw1UKGA1wcn jEyP/jJhMIhli1RAgKGH4MioJH9+majtXHHp9ktHj/PwvNjk22QbeJLa1MR0Zw8/ERfz 13BL3PEmbbsS7lJmwe6YQJKGobhsRWHcn7d0qVUBBRwD3Qg97lDMnppE64w6jIh+qoH6 nnfpOn1faJ5UviI1hBXaXCS+HNbBXPzYoMQJiIYhYI1Wkus4C69HZWztzIgS+ptd38zb 0OqA== X-Gm-Message-State: APt69E3uXC7DK6tW1yLqDm9o9GskyrxI3W3A/r2cO8ZlfVZaK/sKKdrf F9tQotOJsHoRKS7yqHRyaiwIKI18rvE= X-Received: by 2002:a2e:7c12:: with SMTP id x18-v6mr6958879ljc.71.1530902692874; Fri, 06 Jul 2018 11:44:52 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id h65-v6sm2312063lfb.22.2018.07.06.11.44.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jul 2018 11:44:52 -0700 (PDT) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com, davem@davemloft.net Cc: linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH 2/2] net: ethernet: ti: cpsw: allow PTP 224.0.0.107 to be timestamped Date: Fri, 6 Jul 2018 21:44:45 +0300 Message-Id: <20180706184445.29111-3-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706184445.29111-1-ivan.khoronzhuk@linaro.org> References: <20180706184445.29111-1-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tested on AM572x with cpsw v1.15 for PTP sync and delay_req messages. It doesn't work on cpsw v1.12, so added only for cpsw v > 1.15. Command for testing: ptp4l -P -4 -H -i eth0 -l 6 -m -q -p /dev/ptp0 -f ptp.cfg where ptp.cfg: [global] tx_timestamp_timeout 20 Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index f355e65323f3..00761fe59848 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -257,6 +257,7 @@ struct cpsw_ss_regs { #define VLAN_LTYPE2_EN BIT(21) /* VLAN LTYPE 2 enable */ #define VLAN_LTYPE1_EN BIT(20) /* VLAN LTYPE 1 enable */ #define DSCP_PRI_EN BIT(16) /* DSCP Priority Enable */ +#define TS_107 BIT(15) /* Tyme Sync Dest IP Address 107 */ #define TS_320 BIT(14) /* Time Sync Dest Port 320 enable */ #define TS_319 BIT(13) /* Time Sync Dest Port 319 enable */ #define TS_132 BIT(12) /* Time Sync Dest IP Addr 132 enable */ @@ -281,7 +282,7 @@ struct cpsw_ss_regs { #define CTRL_V3_TS_BITS \ - (TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\ + (TS_107 | TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\ TS_TTL_NONZERO | TS_ANNEX_F_EN | TS_ANNEX_D_EN |\ TS_LTYPE1_EN) -- 2.17.1