Received: by 10.223.164.202 with SMTP id h10csp932481wrb; Fri, 17 Nov 2017 11:01:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ7CHrHLKRxjB4DUaaWR7SpwNijCbGFt9JlWNLB7Vd+Gykvt0l+AtNltPKSTfJSZADUES/H X-Received: by 10.84.132.35 with SMTP id 32mr6038463ple.225.1510945298536; Fri, 17 Nov 2017 11:01:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510945298; cv=none; d=google.com; s=arc-20160816; b=tFQK2e47gZs6FatHtXBiG1uWxMah7QIz5a+sUFShm+/K2/g/jpGo8mgm9Lw0eBA/rQ BarsgGGtDQZl2lPxS/oVK2/2XC+5OTQm4MgMXgGAUiEIC3/cQ8WUUarGSyXAZEBfyPUW ucPZscC889GUsqghP8RPZicz+kxSs8i4eNAJt8prgds9kKvlVVV2Z5bv5bsFItqPWYGO YkIdSCVIfKWd7nQXEgtcOjXnSfT1RatdYQAlZSNo4NxDSkStDh8FdjjpwoM2QLHEzlFw yj/Hz8egrXr84TL3oVk4gK4xYUZLT3ReOXL+ZDP0Z+uAqdcaLMcjs59mjAZRkig+J+Hv 4jEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=v8G3C0Pw5+dKXG+CibiMMtPJTLQekANrGSzt9Ict2FI=; b=vOLPXBYbpHTC/IIZZuKYCEfcQ95eOHhezVsKfag7Ft3TlIBbmsog8GhH/dz5gXkgaX 6/2lkOwyEAQ1qzlT/FizjMThOi74aldprdFIEbixgaPIU15XngaCK01Aj/6AOXB3dQUc KbcQbNh1AE4G1YMsjHWjO1IetwvQMm3pWg7j44d3WqSOdHFmpAMwlvGwCIznIiB3uz2K Y2pTsocx+dNqm1S2bC5NtgoqiIg9nXXqHVcfoW6ljqSQof6nve3TeJNMUvpgYSN7lIJW OZg2QxsStaVpUyc+BLu3HyEWq73eaFx2TIbds4zclekvc/TieHAtb9QpMrL0KXCJTdTV 5yHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=E7KEHlRg; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si3213438ple.62.2017.11.17.11.01.24; Fri, 17 Nov 2017 11:01:38 -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=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=E7KEHlRg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933536AbdKQNtt (ORCPT + 92 others); Fri, 17 Nov 2017 08:49:49 -0500 Received: from mail-by2nam03on0049.outbound.protection.outlook.com ([104.47.42.49]:64176 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756886AbdKQNtk (ORCPT ); Fri, 17 Nov 2017 08:49:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=v8G3C0Pw5+dKXG+CibiMMtPJTLQekANrGSzt9Ict2FI=; b=E7KEHlRgSBJSeulnus67pwOFZO52xHco6f2+efcBm6EXy5nbWR8R8RQ1xLRr/eO2yXvjXBhIp9KcOotl6gfsQQ9Ujm5FmBnl9EDw0u80BTvqAHtizDhnEBmefJr/O4ZJhIzfbIe9soi+v4zS9B5/ZevdrzXMB/e8+IhUzleOeRA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Aleksey.Makarov@cavium.com; Received: from localhost.localdomain (46.242.12.6) by BN3PR07MB2481.namprd07.prod.outlook.com (10.167.4.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Fri, 17 Nov 2017 13:49:34 +0000 From: Aleksey Makarov To: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Goutham, Sunil" , Radoslaw Biernacki , Aleksey Makarov , Robert Richter , David Daney Subject: [PATCH net-next v2 0/2] net: thunderx: add support for PTP clock Date: Fri, 17 Nov 2017 16:49:05 +0300 Message-Id: <20171117134909.8954-1-aleksey.makarov@cavium.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [46.242.12.6] X-ClientProxiedBy: AM5PR0701CA0062.eurprd07.prod.outlook.com (10.169.145.152) To BN3PR07MB2481.namprd07.prod.outlook.com (10.167.4.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a099688b-951c-4436-c282-08d52dc20a9c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603258);SRVR:BN3PR07MB2481; X-Microsoft-Exchange-Diagnostics: 1;BN3PR07MB2481;3:NXoNEhFkc6b0zCz7hyHXHxrzl/kEUuS8ltfMrcriZSymfPcgUYgwSTslVDqwK9QoyGb2dybOr9tcSMaoLyokroOt9tL1W1471dy1TCxno8AVx1WGhtoE/iZb/RT3U6b2DlLuH1KMg7neGulysXzXx+16xqmSpD4RqMsRIam/M7w1jtVaAwNLFSqrKTXxaqz/s1eYA9o9UEoV9W41ZLl+EfkH0htF4z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UrRmjzK5yquqtW1KUQSdfS5P6bJg4lTJPWLGefDltSufNrjN4ebcBiOP8ez7HLjHduaq4pbKXZ8xQoaPbOS/8qmzXO09gi0B5g106KkPn+aJG4RiwR/nbwl2OEJV+xvGtH+8sHFDe6W;4:2v0aa/dczvHQwJidt6x2BqdtSWEyVk4WuSl37PciV3RbZ4ooghcbEGDywqeezXDj9mQx/jGamgaRqNMvxWClw9yzR6zxhROMrNpaq5EcCg0xAeWK3KdGK1OpFv2E1MQY1P+3fb7S6fKtBKb3+WQ9aINE77pLervv40uRgE1aF6iS+M46qmpXzc64FdZjrgyzqwf3caKXPY3lirFcTCCPcNyG2xnyQR7+z7G8hAU4pLWguiPO0ZLNLY7tjVqQTf5zQ7aDB0uEGvBRIPEusy8JAbb3jJTsTLmpb27R7C9fxYClh04MAeZiTs5u9MAsfKLo X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42068640409301); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3231022)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6041248)(20161123564025)(20161123558100)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN3PR07MB2481;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN3PR07MB2481; X-Forefront-PRVS: 049486C505 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(6009001)(346002)(376002)(189002)(199003)(105586002)(2361001)(48376002)(106356001)(47776003)(2351001)(189998001)(8936002)(50986999)(5003940100001)(97736004)(107886003)(66066001)(101416001)(6506006)(478600001)(316002)(54906003)(16586007)(25786009)(1076002)(72206003)(6486002)(966005)(50466002)(16526018)(33646002)(6116002)(3846002)(36756003)(50226002)(8676002)(7736002)(6512007)(6306002)(6916009)(2906002)(6666003)(5660300001)(305945005)(86362001)(4326008)(53936002)(81156014)(81166006)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR07MB2481;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR07MB2481;23:PMzxPTJY036WbhCQJF8SwYG2l22HfNNozxSTcwqfs?= =?us-ascii?Q?0fuKmqTN8kYwWawZu955gzuPyTMx4ibaxnorzGkV1Gfajxp8gqqjCdN7xmLy?= =?us-ascii?Q?XYYz/UDAkigPmvXMuNPlcr4YOw18qHyiIWXamAdrzdt60TAMvw6pYVyscEN6?= =?us-ascii?Q?tSrkzl/afowRUge+JcAPiaIGx58vEw0/IcmDE/tRQ6S3X5pANUxkQJaaIcef?= =?us-ascii?Q?8DQYLhDgDXkzFnwZHqDGaluQx9GybaGNNlgbKIbEEqzEp1JFckuN83EN0bQY?= =?us-ascii?Q?a/47el+CYEHAHI13hU/v2fKNCEoDfkMtbX3Q15vFQnmgeztbfLav1hqHJEW/?= =?us-ascii?Q?CZCJgQUOIa2BfmWMV24ZQchybJtoH+ogm2WknneJrYZM2dSEniDm6gwjF7O7?= =?us-ascii?Q?P/66slAGo1Mkio6n0J2USKg9FFJJsM0RA6ARxiW2uqcQNFhgkNuVdABeHWnz?= =?us-ascii?Q?1DtnpDYOyxchXTxgncjzXx1mP5yxNyRNtiaXDvCEuPwyvpi1KHW1WRQy2mAf?= =?us-ascii?Q?0VJRo/96RcJbTTIqfK4Tm9yEigDK2Ngx6cnsuIVsOGnaqiXVqY7njoEv3bub?= =?us-ascii?Q?pQ+s7/z4TzhPNwYV+2evQngiyU9xeSCYfGxNKHb9OQka5QyOl1V3Xlia8rRV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3fq2MQNd72PlVCrDKgK0n3G5kgivJv+07Y=;5:Smc9UfEJlHhOGX3CNJ0eCPmCGjMcEvSzImXG6kkkP2MReF/PYHLOyDEs1HaAGKnZkYYCo6pinlQ1Wn7IyCH6NMpXMDTEhfscXj6SaYipBH1hM/k8G6f7BkPgHqsggMLxebz6qrjTHSTcnDzeMjIWTeJ5SXXHotqtEu1vaWNpln8=;24:vRVgYInP3I1id/zIk/G5ebZTpcKCTUjim1167gVmXKliw/t88Ti5v3FLeAb1VNSHYbZdEyX+VN0mWTRou6yK2WZzokAKkNpe9kTjcGNMbqg=;7:NFfiTDjEBZdbVP99gKowuDVp25ZrrLDT1KuMdetsy+ee665bwL4PbS79ztq+G5LuOfIvlSVaYZNpkb+ifVLTdXtGiYf3sqrQiIKihuwsLc3MNcHrCiGmrwXvTXrWVJo/nt76DBCCon9ONBU1EjDPiD7qEM54nXOtKb2Lx3LMcrYMkUJ8hslOMmsuVrws1Oe2VGkD20OGpSYNqyFOzfpR6syjFn0zFcU7TjyiPwufWc/UwLpQPWjKkmtp0BaTgw/N SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2017 13:49:34.2588 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a099688b-951c-4436-c282-08d52dc20a9c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2481 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds support for IEEE 1588 Precision Time Protocol to Cavium ethernet driver. The first patch adds support for the Precision Time Protocol Clocks and Timestamping coprocessor (PTP) found on Cavium processors. It registers a new PTP clock in the PTP core and provides functions to use the counter in BGX, TNS, GTI, and NIC blocks. The second patch introduces support for the PTP protocol to the Cavium ThunderX ethernet driver. v2: - use readq()/writeq() in place of cavium_ptp_reg_read()/cavium_ptp_reg_write(), don't use readq_relaxed()/writeq_relaxed() (David Daney) v1: https://lkml.kernel.org/r/20171107190704.15458-1-aleksey.makarov@cavium.com Radoslaw Biernacki (1): net: add support for Cavium PTP coprocessor Sunil Goutham (1): net: thunderx: add timestamping support drivers/net/ethernet/cavium/Kconfig | 14 + drivers/net/ethernet/cavium/Makefile | 1 + drivers/net/ethernet/cavium/common/Makefile | 1 + drivers/net/ethernet/cavium/common/cavium_ptp.c | 334 +++++++++++++++++++++ drivers/net/ethernet/cavium/common/cavium_ptp.h | 78 +++++ drivers/net/ethernet/cavium/thunder/nic.h | 15 + drivers/net/ethernet/cavium/thunder/nic_main.c | 58 +++- drivers/net/ethernet/cavium/thunder/nic_reg.h | 1 + .../net/ethernet/cavium/thunder/nicvf_ethtool.c | 29 +- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 173 ++++++++++- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 26 ++ drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 29 ++ drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 4 + 13 files changed, 757 insertions(+), 6 deletions(-) create mode 100644 drivers/net/ethernet/cavium/common/Makefile create mode 100644 drivers/net/ethernet/cavium/common/cavium_ptp.c create mode 100644 drivers/net/ethernet/cavium/common/cavium_ptp.h -- 2.15.0 From 1584345710833360995@xxx Fri Nov 17 20:16:52 +0000 2017 X-GM-THRID: 1582329517159592645 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread