From patchwork Sat Aug 28 17:15:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 503775 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp259891jai; Sat, 28 Aug 2021 10:18:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCRalPbP9cqmYraB7WFthCn18n339RJUd+QDbkJdmMunQraCOq7boUG656bfzSTVEdXVRZ X-Received: by 2002:a05:6638:304a:: with SMTP id u10mr13547822jak.62.1630171100007; Sat, 28 Aug 2021 10:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630171100; cv=none; d=google.com; s=arc-20160816; b=E/is7r5lppf9bO/4zXOxvh10Opov5lgaROVHCDVM4B6p9ql1iTnippiFmoZAJHmHb9 S+GZeVj0xMMX5KFh6zwYL1t5HPAic4WXsC4u+bV4b/lylcZuZ/dWjozWHvB6JmJqeklP 5ybQi+ydW+NNzgh5yfjP+hzqCadMXevcUbe2d+Ma5RHNUVBjA8jSBLAZZdFyeAD/Equt j35aAIRCUWtCBTH133Rgau6R1aTkn57HBB1UOv436PclFQ0Lw8kDS22FKO/E3YfLYYgU fQ+YPZ2LUZpymaiABd/loC0EFhTY7Z+9thrES6jrHs0I4lxiXuXS29OLAE40IS6tTicm 58OQ== 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=Nj5RTF35gQsW0AqxyNE0lXSMA9c7c05/wwrJgBCDQ4U=; b=GB/V6tWEFsxGwdfQefyrkGx1mO473lnbO840lUvUs0zlfozTHBy0sJQKPPESpaBnZ7 a5Pxj0uSOcJis80F4KHH1Nmj2X8HGrbiEqf1CsHQj/g2MNWe2wlTGvpXGuHSr29SkKZu POlYIL2IE+tKJ8652MvYompYN/jquY2NDJAx2WzKhFU7CumwdFDKXW66huwZNdPMGIYY qJYNPA4ZVBbXRAQF7cEZVxlenw8AZTfdXVL84wcQXHBzLKLMtsMjkukdx6LsHSMa94pj v6ugo5RkwsBsMcBoKlbQkFr0MborA2n0UMYHjniBwyhSaXfNW5j+h5RjdlsNV1/gobc2 WjrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IfXR0FKM; 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 i126si4695650iof.61.2021.08.28.10.18.19; Sat, 28 Aug 2021 10:18:19 -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=IfXR0FKM; 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 S234648AbhH1RTI (ORCPT + 8 others); Sat, 28 Aug 2021 13:19:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234629AbhH1RTF (ORCPT ); Sat, 28 Aug 2021 13:19:05 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC82DC0617AD for ; Sat, 28 Aug 2021 10:18:10 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id b4so21395392lfo.13 for ; Sat, 28 Aug 2021 10:18:10 -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=Nj5RTF35gQsW0AqxyNE0lXSMA9c7c05/wwrJgBCDQ4U=; b=IfXR0FKMeE+Lt8UhIHMyKqhJoWd2hmRNFgP+lqpFRp8FIE4OuVVBbH4UcxZE5jNcOI WCipCy3BCDT13kpCqJEv2Oq73F0yPNwT5lI+SvyH6AO7gxZjYD4pEnCg2ly2qVsfiP8Q z+bXgihCFQXRelsCxwa5mjzkuiBCFKZXJ30f872qE4xq8S/8PWKpegkltDcup6UW7Zde yhFNLQUNE0gWDhIj5Dix4LmguPYLGQhlSa3tbjWJHKsbwRneR/UnJCiPLTRXjopfqvOZ aHr1dhtMhF9DITddZxeHRqAamx5cIP6p81kV8jpY9fAh/UAc4AJtyZNruv1qIFT6Q8+8 ic6w== 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=Nj5RTF35gQsW0AqxyNE0lXSMA9c7c05/wwrJgBCDQ4U=; b=cBz1P91TF77iGcMh/qK0SIFZgsLMZ9JFKLf1PYalUh4B0OLArCcz4FTQ74Ly2T0w1q KTdlMhlc1QM23idKfX8vhloYLwKhxyK4w6T+CS/0ZyelNp9vWdOH+a5LvEVhtDqdxHWQ /SpSgFiD2mvhKxsNMMewyNR5YqAyON4MoI36fIPOCi4VCAn1sSakD0OTRZBi3nHQ169T aihobc+LbWuBHba+Xk80mUaGkrw6U4bhfuVYA8okpBwYpz5d4arg2OdJQxEtubi5CAED mexMEdm+ROEHJ+pYEnbJp72VEokoS06xIJ8NlIXypA4zcz3IsGggO0zc8OE1lR+9+E80 nG5Q== X-Gm-Message-State: AOAM532MR7Lj79nBdJjLg+npMNhRbZMsZyG3iTBIobAPVwa62w78rlKf v5Wi8zUOzdSbSK4qv3XqplCx3LHCu0ocLA== X-Received: by 2002:a05:6512:b9e:: with SMTP id b30mr10915963lfv.428.1630171089042; Sat, 28 Aug 2021 10:18:09 -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 p1sm202195lfo.255.2021.08.28.10.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Aug 2021 10:18:08 -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 5/5 v3] ixp4xx_eth: Probe the PTP module from the device tree Date: Sat, 28 Aug 2021 19:15:48 +0200 Message-Id: <20210828171548.143057-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210828171548.143057-1-linus.walleij@linaro.org> References: <20210828171548.143057-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 c7ff150bf23f..ecece21315c3 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 @@ -311,9 +312,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);