From patchwork Fri Jul 6 18:44:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 141343 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3424639ljj; Fri, 6 Jul 2018 11:45:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcnO6Khvr+xU+AtizY+8XChLGHHboNGPMdIVmZC1NFm1IpEHuJvWm/1NZSBpjO/9+yhrmut X-Received: by 2002:a17:902:a716:: with SMTP id w22-v6mr11236552plq.271.1530902705236; Fri, 06 Jul 2018 11:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530902705; cv=none; d=google.com; s=arc-20160816; b=0pVUUr9msCsdLdHZcLXG2yPNhLMnFJFAB3DmGJhj9MQ1KekG5MTXBq3A8gNiabIBdK TrQpMOl2MGD+SlNQcquYyvGk4SEKOp6Bg2V9dOV9u6/JSVVNkimYvdBdOdGp/8o8FbLF X2ZxTNvP1eWuwe5PUg1C8Ar3JoMcVu+6UeqZe4ESOYfOyp1H2sXD3fgeZAugL+jzLE8N 30B6lkqHZPF/ZHlG0lu8s7vU6U8ESA7fr8vQXvrkjaDhVFVd/pJJ6r+ZhY+YNbTU36uP QfCyqa7RGQ235aEkizOS/zY6AHwrT3My4VVu4R9tDXhAkgEIXojK1lPlKhnPltOeoB8b BAWQ== 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 d30-v6si8621722pla.110.2018.07.06.11.45.04; Fri, 06 Jul 2018 11:45:05 -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 S934667AbeGFSpD (ORCPT + 31 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(-) -- 2.17.1 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)