From patchwork Sun Aug 1 00:27:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 490130 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:1185:0:0:0:0 with SMTP id f5csp671919jas; Sat, 31 Jul 2021 17:32:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyVEOuAGGxzXWQFGc0cp1+t1fawCVgffdC7HH16HiywTDJrOi9QSp7Xssdbs6u0iVPPMCF X-Received: by 2002:a17:906:3016:: with SMTP id 22mr9051703ejz.28.1627777933546; Sat, 31 Jul 2021 17:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627777933; cv=none; d=google.com; s=arc-20160816; b=WqnOJEw6YfCVQMCv9DEJoC0HN4eN1f2S/fd9eYiKYC1McFqc97LXgt2zoztaOFf7yG R/eeexOvOvtLQapPD9G7CV3hl2QiBqtDr0zV/YIOZPlwRu0Vw7wrJ7ZdnDxvFmo9lIkx C254aiMn05wwtPVf+eLAR7u3XBYLHDkfI0JTWP9Cne9Dq99vEKxadh7xbd+cL7CBu8n8 eQCHiNbybZQGq9rKxQ6w91ko6RRNJN4kmzNEtpCfDV+Ygn+FMj465iPyrHndsI+Wfl6h 6igKsxhaNO/Iop4rAnJzzUC5VyDYJapA4P5ifKEp8lrakSzgZGNdzIljIMN8IA465sqY 3DiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vwWjpyFqdMPmfFC5PqGzeA4NCE1Pl8UqRbJa3TNnNSc=; b=cx8fg8bDkz7hp+5p0JLwTwnNjfNYgs4LD0WhyHWF180ogJi9SwwsGbNDuI6oRP2Ll+ N1UFRM3eW0Oi0f8FSKerY0OGq+JDVRHV/hvClhzIEQgNOi+zVO2ECpbtvwGJpou0mr+W tUlvH1vkCsuUzW3op24lxgG+Zq4uWJI9w3xOGeGpGVW4o+Zbry4kYx7lNpBKm298/lOa mX90StbJXJlkC3crB0R/NK7DVUHQ6EWfgpyMvmWgXWd6dzENgZP3LtJCbKWcNsdIVZqW dHC8bYE+B8hrfYRI9nOE4TaIV6ZuQaaerRL/k1T6fPYL1uwV3+JH5WQxh5cXgAOCwvmh Y0lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=usssoOhJ; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id g17si7663204ejr.674.2021.07.31.17.32.13; Sat, 31 Jul 2021 17:32:13 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=usssoOhJ; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 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 S230134AbhHAAcR (ORCPT + 8 others); Sat, 31 Jul 2021 20:32:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230115AbhHAAcM (ORCPT ); Sat, 31 Jul 2021 20:32:12 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E898C06179A for ; Sat, 31 Jul 2021 17:32:02 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id q2so18716642ljq.5 for ; Sat, 31 Jul 2021 17:32:02 -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=vwWjpyFqdMPmfFC5PqGzeA4NCE1Pl8UqRbJa3TNnNSc=; b=usssoOhJnU50r4WXu4DqIn9E3DSokkyKeK1/SJeC3mAgbIDLw/DjgC7TQCpHTrZFk4 U9I2HEHXfQbgtZVFeKFX3T0g9BMu1fPy8tm369pkTtys/AHI18F3BQL4f3nj84YmfzT0 P0Zd5cOf7kDk1mvf9ACjedBYFYzBkqHWqutvkNDyEvZwFht/aQGCXK8wU8wsktvsVNcW +sdRkBN4xqQjNaQIUAWN4Jw++gvbbVQTNVpErlWneF6RiB6B/25SFtxj9IAY7T27HfIR AVhiLGaIuVBId4Yh0zvzXh/tiJPVPgC/wlxSLRKr8QA9B/POk4OOO1wLXzVZvF7r1U3W CVAQ== 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=vwWjpyFqdMPmfFC5PqGzeA4NCE1Pl8UqRbJa3TNnNSc=; b=sStcN+jztA8SK/igIAMfxJnGy7jG/6FceqNss6XpMSWM9gl10jB/J9kF7XDbjSAtlK wy8J3Ye+ujN+98G1MZFlm1h/B8G4/lPqaA6rwuAetktyrASNyuevmwKyYfucgpDKrngC 5Xt7kuEw3/ju8wS1A5y64ph/3BtE4jks/aJJKix7yFoaTaNLnXhJHmUXawXTKO8KLTQd kPs6VQxBLJoYH0k285j6R41vAKQ9ctM4VGUd/iuRgODy1f6VfeM8BaBSzsXDMlHZX3F6 nLXtPHXNdUZCVp+Q5QLzBJsWYNZ+GUEfIGTqHfGXgpyj4iq3MxciR/3ityvM/I7KCOBm 1Q8A== X-Gm-Message-State: AOAM532EuNVB1U5DTr4ksOl1ALb8E+qjQ4qESn6uKHH0HvgVGuTwx9pT MMOvFEO5PTnlQSYQBIEuLD7V6QcICjVNAw== X-Received: by 2002:a2e:9814:: with SMTP id a20mr6531000ljj.402.1627777920501; Sat, 31 Jul 2021 17:32:00 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id r6sm485255ljk.76.2021.07.31.17.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 17:32:00 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" , Jakub Kicinski Cc: Imre Kaloz , Krzysztof Halasa , Linus Walleij , Arnd Bergmann Subject: [PATCH net-next 6/6] ixp4xx_eth: Probe the PTP module from the device tree Date: Sun, 1 Aug 2021 02:27:37 +0200 Message-Id: <20210801002737.3038741-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210801002737.3038741-1-linus.walleij@linaro.org> References: <20210801002737.3038741-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This adds device tree probing support for the PTP module adjacent to the ethernet module. It is pretty straight forward, all resources are in the device tree as they come to the platform device. Cc: Arnd Bergmann Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/ptp_ixp46x.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) -- 2.31.1 diff --git a/drivers/net/ethernet/xscale/ptp_ixp46x.c b/drivers/net/ethernet/xscale/ptp_ixp46x.c index 3ed40b0d0ad2..1f382777aa5a 100644 --- a/drivers/net/ethernet/xscale/ptp_ixp46x.c +++ b/drivers/net/ethernet/xscale/ptp_ixp46x.c @@ -6,6 +6,7 @@ */ #include #include +#include #include #include #include @@ -309,9 +310,19 @@ static int ptp_ixp_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id ptp_ixp_match[] = { + { + .compatible = "intel,ixp46x-ptp-timer", + }, + { }, +}; + static struct platform_driver ptp_ixp_driver = { - .driver.name = "ptp-ixp46x", - .driver.suppress_bind_attrs = true, + .driver = { + .name = "ptp-ixp46x", + .of_match_table = ptp_ixp_match, + .suppress_bind_attrs = true, + }, .probe = ptp_ixp_probe, }; module_platform_driver(ptp_ixp_driver);