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: 10512395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4CA36603D7 for ; Fri, 6 Jul 2018 18:45:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40565287A2 for ; Fri, 6 Jul 2018 18:45:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32E98287AA; Fri, 6 Jul 2018 18:45:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B816287A2 for ; Fri, 6 Jul 2018 18:45:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934598AbeGFSpC (ORCPT ); Fri, 6 Jul 2018 14:45:02 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41849 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934537AbeGFSoy (ORCPT ); Fri, 6 Jul 2018 14:44:54 -0400 Received: by mail-lj1-f195.google.com with SMTP id y17-v6so5034311ljy.8 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=kpU6N1Ihw73TuxkAKrGXHVYmMd5FNa9lLO2OQm5w66gxA0cNMc6gFmFRzm6bBWUvPt DzFP8pwYct3T0onrdMw2JB2oWbEiOmaeJE9LjNV2Uob2WP4uHJ2qsXe9ArycZnoSXwkz 7Mkx0AkAGAYYPA1gMVQXAAeYrSbnQ3oZTAIE0fnEI7rQWzoXV8fjgNfsh8N6ErgxdhZO N/oX2gQhq4twuQzTEEZFjedulAhwj7WhkCO46gr2kH2IQE3xnjd9/JtG7Ocu6ZIcR7Rj GcFE55O6Ht4J1t9fyYtGQ2HHNs+UxPe9zqtpfZzlc7+7l78hDfp8CSFqMF9m3a7DHRp9 MVFw== X-Gm-Message-State: APt69E0xD1LNi5Hu+20u6mNor6YdxFGOcmDW/9IyN5OKqisKJJZ97VMh JPayk0HJnxK9gQXm1MIJR6S6dg== X-Google-Smtp-Source: AAOMgpf1dh/wn/j2v5HqnhAVCxHzENwv+DBvgOXZNvo01YWhQLi5P+b9s52BLGaW2MUDvyF25Kux1Q== 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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)