From patchwork Fri Nov 1 13:02:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 178307 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp456733ill; Fri, 1 Nov 2019 06:02:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsFHHX44tsUeLxcg+PLTQqCciJq9Le15QXpJBzOOx9ao9EUeP/YeBEXKFe8sFARFbVfW6D X-Received: by 2002:a17:906:4f14:: with SMTP id t20mr9290943eju.239.1572613360544; Fri, 01 Nov 2019 06:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572613360; cv=none; d=google.com; s=arc-20160816; b=T65mgtBa4U5bi6nKGKGOyXcg52jf1G1bLue4PqaM6Du9Jb16Yi2Wi7l5wgCIrRlPPD S9OM//IHKDGoy0Xg1QjDA6VaEucabHY87wMlhvGvxsoZr94lENib7OqHln7tefPJbBxb u5iIyYURzGPvl3xqOI9YeZ9x/62wyMgautpEN1d8VHBR2IgSxtuf5CxReXO8lMsH7O4U HOTy+DipIW+0rc275Hbnmp+D7orUqwcow7dtWSNFx/c8pTqabxM22CUKEJ7PJzpdmJao XZSa9Qy4LrJekaapoiyUWSs2LYljY9s82sA73qxRTBZEuw010pSlPHN0AAi1YignYo87 tlHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Zz54zMJzggbWtIcnHgqBfeiMxFI1JgscU3OQIDKBU2Q=; b=OQNT7C/y1OJ/UGCLj2qRTtEj/3bRUt/shcbepT9Q8quFTGW/iaBtFA7LdCmEe5PgjH mmdbwTaCkR4cs12zZlrambXevyS2L8qM0uMQrJk8xLLay0snMe2qVm0YAkNnLMl6BdCD gXcuqG7xf5o/q5IMGy3dzP3HFbuMwspSFuiU2iptDUYcsMgrKLpf5TSBYWWRXGjBVaWb GGIwivuoaMaW0dJlBWp+RIC3xS97YE+omdvnYMQHMGy+gNsXwG6SaXpBS4GJDH54/PAL JUqbELq/xgQk7AKgTBBTgb5pvFtgRlxUrUc1OlR86qJrTlGcrAQfBRJ5jTcZjnfcyJcU 85CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gU7SZg+h; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si281981edi.445.2019.11.01.06.02.40; Fri, 01 Nov 2019 06:02:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=@linaro.org header.s=google header.b=gU7SZg+h; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727128AbfKANCj (ORCPT + 9 others); Fri, 1 Nov 2019 09:02:39 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:40606 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbfKANCi (ORCPT ); Fri, 1 Nov 2019 09:02:38 -0400 Received: by mail-lf1-f65.google.com with SMTP id f4so7177103lfk.7 for ; Fri, 01 Nov 2019 06:02:37 -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 :mime-version:content-transfer-encoding; bh=Zz54zMJzggbWtIcnHgqBfeiMxFI1JgscU3OQIDKBU2Q=; b=gU7SZg+hT4fbYGkXl4l+zlp+12ZhsELfK+kRJCSPlLvZB7DwienEQLWzrimmix17kG IhHpeg4SRKpoV9/kVzvRVXT/4SssYhk9BjFOxjP+66TvLJFAnXxJ5xdKLkGGRZl6oBVj Ddw51wZg9RSjS6GGatqLSgCpgwHAQ2GMNmkbzl7gDBOcVcTzByVYhzYX/51HHtLPwswt CwlEGgN3sJ88eekzAdCwq1mfbJylDojH4qh8xm98Ka6d3/xfEP1+kwDpg0vH0kUcxNQR sfxrY3lhGOtfFfoDmPoj1w2tRYNc826QXxIrLMYqdPs4oO+M5nIJQB10uxdb7NyVhfEX UMrA== 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=Zz54zMJzggbWtIcnHgqBfeiMxFI1JgscU3OQIDKBU2Q=; b=VToecUfhXc2pJ8vOtIY33uE3Sxg9us3X9DgGvSS5DLBfE2cRoQOLRGVhRAgDfXryBN gJz+y0dXIPOeSrT9yHrJDycvDya0nIhDQMNVsg2tKNgYh61I6njuLVKG2q68Hb/Zo3Ba 3+0owHqieqMzedfjobNZ0+FgZEte973kG/wYEKCR7/5+vxM4DhlUwZm7aDbbnGfZVnz/ lnY3FyQNI2+NkUdo/O3WjIk0nM7vqLQqEFLx6HZ5YHyYNq6XaL6a1oBAlFMKtGT65m/x Y6Ibgb6H7MHJvmKFnJIeO32vjabT2Xxv6r9owh0/sfRzVvx3xu3syvgyRYTOBJmUp2GZ D55A== X-Gm-Message-State: APjAAAWPQjZX/9NewcdHWBjpo12gAV4EeRaSf9fSFv/8ervpEitGmRd8 643Jwn3depZw6PYu/phyGB6odIUGiJff7Q== X-Received: by 2002:ac2:4184:: with SMTP id z4mr7340781lfh.46.1572613355925; Fri, 01 Nov 2019 06:02:35 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-79c8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.200.121]) by smtp.gmail.com with ESMTPSA id c3sm2516749lfi.32.2019.11.01.06.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 06:02:34 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" Cc: Arnd Bergmann , Jakub Kicinski , Linus Walleij Subject: [PATCH net-next 03/10 v2] ptp: ixp46x: move adjacent to ethernet driver Date: Fri, 1 Nov 2019 14:02:17 +0100 Message-Id: <20191101130224.7964-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191101130224.7964-1-linus.walleij@linaro.org> References: <20191101130224.7964-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 --- 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%) -- 2.21.0 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 960961fb0d7c..0209e0ef082d 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 677d1d178a3e..8ac3513f61c9 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