From patchwork Mon Jan 6 07:46:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1218003 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="CepMQmzW"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47rndx1YYGz9sR4 for ; Mon, 6 Jan 2020 18:47:01 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726582AbgAFHrA (ORCPT ); Mon, 6 Jan 2020 02:47:00 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:39747 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbgAFHq7 (ORCPT ); Mon, 6 Jan 2020 02:46:59 -0500 Received: by mail-lf1-f66.google.com with SMTP id y1so35747533lfb.6 for ; Sun, 05 Jan 2020 23:46:57 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=oQoejQubsLFGlgvz23/d0hrQOAzAKQDxGd+MzZ2RoM8=; b=CepMQmzWmOUsI3fJgerXT/Pf3qO4UVAt78aCjEwkphKjHxUItAR/GKhOkfKTbkeL/q z+JdhYUNVNXI5LpfuUEL6Rc5pn8AE9iXCeneeIfl0hy4DqQe0O4btXFGuvK5l+oVPYUD F/N73VI0Gnj2Au6spFpeYz61L4KyJKXLg4VXmY+zbKiYPfC2bZBFTzG/Ma8UAm7plckr dpc0+vUo1TlsjkAdPvB/WeDZLlT5DteZRfZRZ8nPpPfmu/7fCpnd2vmKLfe8shp+cXR5 9EXMmEXR5nm3NmeA3kB2f0tDNwZCV3Xe9C8zNJe6g3G2qrEcxpDosVFAMXoYHh3Ek38S niLg== 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:mime-version:content-transfer-encoding; bh=oQoejQubsLFGlgvz23/d0hrQOAzAKQDxGd+MzZ2RoM8=; b=eriWHZ6sqIpj6WMbXQ+g8DZ90yHskgHVMWyAF01XfNyhxjBH12udX3l5oUihz4/rXs 7f3IFK/JCyxJ+SR+n7IajGIlsezgeBkZkVT30WY3XejxJ7zxOz69WBLy0Fd1MMWpCwwU sol49Fm5m5xWA8C8WtnsI9XSXEcw8VgCqdfJhrc2DeKYgKIAtzqnsYyczpGsXynb5x04 nJyPMmFNfTXa9CRzpY6WtqNiWECBtOzjHOfBUPO179ebZr3932kVJ2H8bXTHcwPc2/qG w0IVayFI4Qk37oAMEx8NneaJ3edvh3OZFRDFng7JPF69pg9TlrlJ5LP6Dtk9V2UiQiLc LzmA== X-Gm-Message-State: APjAAAV2G9/9nn7vKJXC5SO9J52EzoqeT1UEr7vfGRvV1sUcJIaf1O3j +580wZrBFz994MGkdF4dFJNfYqTqMhPQNA== X-Google-Smtp-Source: APXvYqyyXJhCAatKMfVED4GAqp3S+Qtq2lqxZWDv/ytwmXJ8S1051ZnDrlQuhe9mdQ0leA81qsCfjA== X-Received: by 2002:ac2:5549:: with SMTP id l9mr55279170lfk.53.1578296816906; Sun, 05 Jan 2020 23:46:56 -0800 (PST) Received: from localhost.bredbandsbolaget (c-5ac9225c.014-348-6c756e10.bbcust.telenor.se. [92.34.201.90]) by smtp.gmail.com with ESMTPSA id n14sm28625551lfe.5.2020.01.05.23.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2020 23:46:56 -0800 (PST) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" Cc: Arnd Bergmann , Jakub Kicinski , Linus Walleij Subject: [PATCH net-next 3/9 v3] ptp: ixp46x: move adjacent to ethernet driver Date: Mon, 6 Jan 2020 08:46:41 +0100 Message-Id: <20200106074647.23771-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200106074647.23771-1-linus.walleij@linaro.org> References: <20200106074647.23771-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann The ixp46x ptp driver has a somewhat unusual setup, where the ptp driver and the ethernet driver are in different directories but access the same registers that are defined a platform specific header file. Moving everything into drivers/net/ makes it look more like most other ptp drivers and allows compile-testing this driver on other targets. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij --- ChanegLog v2->v3: - Rebased on v5.5-rc1 ChangeLog v1->v2: - Rename patch as "move ADJACENT" which makes more sense --- drivers/net/ethernet/xscale/Kconfig | 14 ++++++++++++++ drivers/net/ethernet/xscale/Makefile | 3 ++- drivers/net/ethernet/xscale/ixp4xx_eth.c | 3 ++- drivers/{ptp => net/ethernet/xscale}/ptp_ixp46x.c | 3 ++- .../net/ethernet/xscale/ptp_ixp46x.h | 0 drivers/ptp/Kconfig | 14 -------------- drivers/ptp/Makefile | 1 - 7 files changed, 20 insertions(+), 18 deletions(-) rename drivers/{ptp => net/ethernet/xscale}/ptp_ixp46x.c (99%) rename arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h => drivers/net/ethernet/xscale/ptp_ixp46x.h (100%) diff --git a/drivers/net/ethernet/xscale/Kconfig b/drivers/net/ethernet/xscale/Kconfig index cd0a8f46e7c6..98aa7b8ddb06 100644 --- a/drivers/net/ethernet/xscale/Kconfig +++ b/drivers/net/ethernet/xscale/Kconfig @@ -27,4 +27,18 @@ config IXP4XX_ETH Say Y here if you want to use built-in Ethernet ports on IXP4xx processor. +config PTP_1588_CLOCK_IXP46X + tristate "Intel IXP46x as PTP clock" + depends on IXP4XX_ETH + depends on PTP_1588_CLOCK + default y + help + This driver adds support for using the IXP46X as a PTP + clock. This clock is only useful if your PTP programs are + getting hardware time stamps on the PTP Ethernet packets + using the SO_TIMESTAMPING API. + + To compile this driver as a module, choose M here: the module + will be called ptp_ixp46x. + endif # NET_VENDOR_XSCALE diff --git a/drivers/net/ethernet/xscale/Makefile b/drivers/net/ethernet/xscale/Makefile index 794a519d07b3..607f91b1e878 100644 --- a/drivers/net/ethernet/xscale/Makefile +++ b/drivers/net/ethernet/xscale/Makefile @@ -3,4 +3,5 @@ # Makefile for the Intel XScale IXP device drivers. # -obj-$(CONFIG_IXP4XX_ETH) += ixp4xx_eth.o +obj-$(CONFIG_IXP4XX_ETH) += ixp4xx_eth.o +obj-$(CONFIG_PTP_1588_CLOCK_IXP46X) += ptp_ixp46x.o diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c index 6fc04ffb22c2..0075ecdb21f4 100644 --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -33,10 +33,11 @@ #include #include #include -#include #include #include +#include "ixp46x_ts.h" + #define DEBUG_DESC 0 #define DEBUG_RX 0 #define DEBUG_TX 0 diff --git a/drivers/ptp/ptp_ixp46x.c b/drivers/net/ethernet/xscale/ptp_ixp46x.c similarity index 99% rename from drivers/ptp/ptp_ixp46x.c rename to drivers/net/ethernet/xscale/ptp_ixp46x.c index 67028484e9a0..9ecc395239e9 100644 --- a/drivers/ptp/ptp_ixp46x.c +++ b/drivers/net/ethernet/xscale/ptp_ixp46x.c @@ -15,7 +15,8 @@ #include #include -#include + +#include "ixp46x_ts.h" #define DRIVER "ptp_ixp46x" #define N_EXT_TS 2 diff --git a/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h b/drivers/net/ethernet/xscale/ptp_ixp46x.h similarity index 100% rename from arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h rename to drivers/net/ethernet/xscale/ptp_ixp46x.h diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig index b45d2b86d8ca..dc3d8ecb4231 100644 --- a/drivers/ptp/Kconfig +++ b/drivers/ptp/Kconfig @@ -56,20 +56,6 @@ config PTP_1588_CLOCK_QORIQ To compile this driver as a module, choose M here: the module will be called ptp-qoriq. -config PTP_1588_CLOCK_IXP46X - tristate "Intel IXP46x as PTP clock" - depends on IXP4XX_ETH - depends on PTP_1588_CLOCK - default y - help - This driver adds support for using the IXP46X as a PTP - clock. This clock is only useful if your PTP programs are - getting hardware time stamps on the PTP Ethernet packets - using the SO_TIMESTAMPING API. - - To compile this driver as a module, choose M here: the module - will be called ptp_ixp46x. - comment "Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks." depends on PHYLIB=n || NETWORK_PHY_TIMESTAMPING=n diff --git a/drivers/ptp/Makefile b/drivers/ptp/Makefile index 69a06f86a450..74dd39f9d967 100644 --- a/drivers/ptp/Makefile +++ b/drivers/ptp/Makefile @@ -6,7 +6,6 @@ ptp-y := ptp_clock.o ptp_chardev.o ptp_sysfs.o obj-$(CONFIG_PTP_1588_CLOCK) += ptp.o obj-$(CONFIG_PTP_1588_CLOCK_DTE) += ptp_dte.o -obj-$(CONFIG_PTP_1588_CLOCK_IXP46X) += ptp_ixp46x.o obj-$(CONFIG_PTP_1588_CLOCK_PCH) += ptp_pch.o obj-$(CONFIG_PTP_1588_CLOCK_KVM) += ptp_kvm.o obj-$(CONFIG_PTP_1588_CLOCK_QORIQ) += ptp-qoriq.o