From patchwork Fri Jun 14 10:40:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangbo Lu X-Patchwork-Id: 10994997 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8654213AF for ; Fri, 14 Jun 2019 10:39:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70F4826E76 for ; Fri, 14 Jun 2019 10:39:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6565D281C3; Fri, 14 Jun 2019 10:39:29 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70E072848B for ; Fri, 14 Jun 2019 10:39:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=dsA9ikcyHxc8XK2ZAc001UQNxM1Z0Iag5rNl5o7NHAY=; b=tTa yVemPPJN2bbuzfwgZuXCq669MLC3h1e2VYpWfA75qn22Ce3HAy2cb9r+2FTC9sc4y2gL+Pp7JromJ Nm9SgIOXlG7Irhl9s38fCFfMVBl8zMJy2PI66W9xiqY7SWkzL6u1hw6YKtokD3ohOCJv2o6MIa2d1 XKxpqQcLQvWNkN6RVgJhDVmDXXatkDDjwZT59V8sZoxq4H27dKMM6TBrje4/JFhuHAThEoYqHlPFC o0HM3KDHNLUhS1X3Jp2J/JnQ2/8kaIjQXMJARLgwSsUhl6JXagxTtxN1G4Ygqvumf5ywzgPzBzcp5 dHoNK4Z5XliEzP0PurWepzVqutGjtYg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbjc7-0005dH-PQ; Fri, 14 Jun 2019 10:39:19 +0000 Received: from inva021.nxp.com ([92.121.34.21]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbjc1-0005Za-Sw for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2019 10:39:15 +0000 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 31CED200E7D; Fri, 14 Jun 2019 12:39:10 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A81A12003DA; Fri, 14 Jun 2019 12:39:05 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 386C7402CA; Fri, 14 Jun 2019 18:39:00 +0800 (SGT) From: Yangbo Lu To: netdev@vger.kernel.org, "David S . Miller" , Richard Cochran , Rob Herring , Shawn Guo , Andrew Lunn Subject: [v2, 0/6] Reuse ptp_qoriq driver for dpaa2-ptp Date: Fri, 14 Jun 2019 18:40:49 +0800 Message-Id: <20190614104055.43998-1-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190614_033914_072649_FF451DF2 X-CRM114-Status: UNSURE ( 7.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Yangbo Lu MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Although dpaa2-ptp.c driver is a fsl_mc_driver which is using MC APIs for register accessing, it's same IP block with eTSEC/DPAA/ENETC 1588 timer. This patch-set is to convert to reuse ptp_qoriq driver by using register ioremap and dropping related MC APIs. However the interrupts could only be handled by MC which fires MSIs to ARM cores. So the interrupt enabling and handling still rely on MC APIs. MC APIs for interrupt and PPS event support are also added by this patch-set. --- Changes for v2: - Allowed to compile with COMPILE_TEST. Yangbo Lu (6): ptp: add QorIQ PTP support for DPAA2 dpaa2-ptp: reuse ptp_qoriq driver dt-binding: ptp_qoriq: support DPAA2 PTP compatible arm64: dts: fsl: add ptp timer node for dpaa2 platforms dpaa2-ptp: add interrupt support MAINTAINERS: maintain DPAA2 PTP driver in QorIQ PTP entry .../devicetree/bindings/ptp/ptp-qoriq.txt | 3 +- MAINTAINERS | 9 +- arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 8 + arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 8 + arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 8 + drivers/net/ethernet/freescale/dpaa2/Kconfig | 3 +- drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 242 +++++++++++---------- drivers/net/ethernet/freescale/dpaa2/dprtc-cmd.h | 48 +++- drivers/net/ethernet/freescale/dpaa2/dprtc.c | 191 ++++++++++++---- drivers/net/ethernet/freescale/dpaa2/dprtc.h | 62 ++++-- drivers/ptp/Kconfig | 2 +- 11 files changed, 386 insertions(+), 198 deletions(-)