From patchwork Thu May 16 09:59:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangbo Lu X-Patchwork-Id: 1100441 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="oLi3RECu"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 454Rhw5JMZz9s6w for ; Thu, 16 May 2019 19:59:12 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727147AbfEPJ7I (ORCPT ); Thu, 16 May 2019 05:59:08 -0400 Received: from mail-eopbgr70071.outbound.protection.outlook.com ([40.107.7.71]:5201 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726363AbfEPJ7I (ORCPT ); Thu, 16 May 2019 05:59:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cQye0XYGDhY/V2eNEpm+XUPUaowSGWduKigo6cr4DVE=; b=oLi3RECuuykNEG7GrQNE8dfq672wfCjFT9mm+urW3oXwBtMTL5htgclT4CVmcDDbiusz/R30nrYsdhfyiEphh+KKMBcfch9B901JfaQwLN7vkOcuRaWMdEicfH+vbmSK/xIPtNJawz+rY3eldfcakvn0UgF6xvXweQ135Ym+BX8= Received: from VI1PR0401MB2237.eurprd04.prod.outlook.com (10.169.132.138) by VI1PR0401MB2637.eurprd04.prod.outlook.com (10.168.61.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1878.24; Thu, 16 May 2019 09:59:04 +0000 Received: from VI1PR0401MB2237.eurprd04.prod.outlook.com ([fe80::b091:6395:e853:5986]) by VI1PR0401MB2237.eurprd04.prod.outlook.com ([fe80::b091:6395:e853:5986%3]) with mapi id 15.20.1900.010; Thu, 16 May 2019 09:59:04 +0000 From: "Y.b. Lu" To: "netdev@vger.kernel.org" , Richard Cochran , David Miller , Claudiu Manoil , Shawn Guo , Rob Herring CC: "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "Y.b. Lu" Subject: [PATCH 0/3] ENETC: support hardware timestamping Thread-Topic: [PATCH 0/3] ENETC: support hardware timestamping Thread-Index: AQHVC83+OKxQcRjJ5kqAZ0JrDGOFvA== Date: Thu, 16 May 2019 09:59:04 +0000 Message-ID: <20190516100028.48256-1-yangbo.lu@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR0302CA0017.apcprd03.prod.outlook.com (2603:1096:202::27) To VI1PR0401MB2237.eurprd04.prod.outlook.com (2603:10a6:800:27::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yangbo.lu@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 86b880af-a1be-4ed7-bbf8-08d6d9e520a6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR0401MB2637; x-ms-traffictypediagnostic: VI1PR0401MB2637: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 0039C6E5C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39860400002)(136003)(366004)(346002)(189003)(199004)(52116002)(7736002)(3846002)(6116002)(14454004)(8936002)(81166006)(305945005)(81156014)(8676002)(36756003)(5660300002)(316002)(2616005)(476003)(6486002)(68736007)(6512007)(6436002)(486006)(25786009)(66066001)(66476007)(1076003)(66446008)(66556008)(64756008)(2906002)(386003)(6506007)(71190400001)(71200400001)(256004)(86362001)(4326008)(186003)(53936002)(50226002)(99286004)(110136005)(54906003)(66946007)(26005)(102836004)(478600001)(2501003)(73956011); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2637; H:VI1PR0401MB2237.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: JB4b/oQQo4TS1EChMl+ObEXbjX7Z18ddJ+oWSZCh9DQmZO633ORHyryCYIP5XLgom9AwDV41IRJ8YD8U09vbN1sMPLq/XbRo2/3cqXGu8fYB+YwVI83CRoSXZoKMsEyXQwla12S46bE7mrOrcpLyvYuPEI/WvLHj9DywSgcXnn/D7cgkZQDK08rLtj6pKmMGABXkITtVMU63G2l7EgDWXGl0RSXZenF2slLRX1npgF3MrCQSswVKHIKSeyy9+I6RN90exAKZSE5NToBzPXUo20fPZ8+mgSMygUNFf+D/rDRdmvsAfT781vQ6/H/rMPcG/8hycAyegeRqyhpVj8DKwOC7pJs1RyZFVJAv+TJSnpZxJlReFFkXNyK2tkyLnLzi+SOem9s6Rbp0NubQmwOcluMkt+MG+PBL1zsGiCqSv4A= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86b880af-a1be-4ed7-bbf8-08d6d9e520a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 May 2019 09:59:04.3364 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2637 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch-set is to support hardware timestamping for ENETC and also to add 1588 timer device tree node for ls1028a. Because ENETC RX BD ring dynamic allocation hasn't been supported and it's too expensive to use extended RX BDs if timestamping isn't used, we have to use a Kconfig option to enable/disable timestamping for now. This Kconfig option will be removed once RX BD ring dynamic allocation is implemented. Yangbo Lu (3): enetc: add hardware timestamping support enetc: add get_ts_info interface for ethtool arm64: dts: fsl: ls1028a: add ENETC 1588 timer node .../arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 5 + drivers/net/ethernet/freescale/enetc/Kconfig | 11 ++ drivers/net/ethernet/freescale/enetc/enetc.c | 156 +++++++++++++++++- drivers/net/ethernet/freescale/enetc/enetc.h | 14 +- .../ethernet/freescale/enetc/enetc_ethtool.c | 31 ++++ .../net/ethernet/freescale/enetc/enetc_hw.h | 13 ++ .../net/ethernet/freescale/enetc/enetc_pf.c | 1 + .../net/ethernet/freescale/enetc/enetc_ptp.c | 5 + .../net/ethernet/freescale/enetc/enetc_vf.c | 1 + 9 files changed, 231 insertions(+), 6 deletions(-)