From patchwork Fri Aug 13 22:00:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 496581 Delivered-To: patch@linaro.org Received: by 2002:a02:cf8a:0:0:0:0:0 with SMTP id w10csp973852jar; Fri, 13 Aug 2021 15:02:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP0NaPXiFvpZeIG61jmG1K2ZO/pMRQwlCoTa5Ksqq3BccGV8c966eOtDHP91iK1SwJvoMx X-Received: by 2002:a17:906:3ada:: with SMTP id z26mr4509373ejd.404.1628892170564; Fri, 13 Aug 2021 15:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628892170; cv=none; d=google.com; s=arc-20160816; b=D4zh+n3Itm4WCijZSZhZcCnPAe41v/NtMvRNvRSKsM4ocqpLREXWCP5/sAsqbqzfUd c/wkYKIDwoZGyhGUrwQGMaurODa9RE5U5zF0ZAoNkl3Xcd3M9HSSYDps9reoo1izv/r8 ByrMqCBpJzAq/bRteBRq9oWkrt2F61K6Mc7QKuDIRPsKUbVfnFIV4p1pCfiBecGRrAX+ NZrwTEbp6mROHZ7z51UjneFn2z8/2LGqSTrL53uWhtZ0FMhqwbYUxNNAIil0ThI+BBfm ooRQz9AEvaBqd0M3w+vbDPppYUbQBe+2kaQQnk/8Zn3V2BMqILZdMflTBHNnf9neYKEp 9iYg== 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=Ftn/Ffsz0Uu5YdDnrQXqLL9Yu3PsOp4hgS1vyNIsDZtp3WmAU8+Ok/1P+lAU+aD134 l+94c8SluDL4Tb+FYYf7ZxvvGUCaXvn5un+ZZDNxZ+YQuAQIbYC/EwosfIem7kmd9NnS j8dcgWpoVJL7tyeT0ySlh2Qped7mYM/epfkfDLMSph32QN3INTzWbRRy8dw91h59kISu gxblbXKm/KIpnQhPaZ/W9ds6GR8A0AtBMTs8kSd7l194jIRhLVRq2T7WeR1C+ez6hLHV n43yWSSs+0Gt27l4x2nrM9nWhh5Ke5STFVPcsO5xOXCLWjzIeSwSmMopb0TawYg3Nnt/ p+sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oib6oA8E; 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 s18si3299982eji.591.2021.08.13.15.02.50; Fri, 13 Aug 2021 15:02:50 -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=oib6oA8E; 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 S234869AbhHMWDQ (ORCPT + 8 others); Fri, 13 Aug 2021 18:03:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235246AbhHMWDM (ORCPT ); Fri, 13 Aug 2021 18:03:12 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF33FC06129D for ; Fri, 13 Aug 2021 15:02:43 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id n17so22432957lft.13 for ; Fri, 13 Aug 2021 15:02:43 -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=oib6oA8EaW2M8z2hR0IrRBmSmBQ9PIGW9IK/vqwp9Eo6k1+FUphjHMx4QaVQeiSAGb b2kfVEa7/XznTL07vUYqpcZKW57fhTUsrK2j3M7MWqyaBMJRRhoQniBfL62/VLxaL23P HOVKUxy86dxVKxlsLRdhSB10rAD5fhAhX/yiKvwejiaLDNAAzeA2l+bcWGTnWCV+egsX DQU7h5A8E76P7TfWqzvmUQr8JdSxVwuRvbTAxSwaiWMXLzOF0XXIt8VKzE6zanCF0gat tKGCn0Y/gDWLK7uK+w2dWD7zRBGMm+6iQofxciolKSA52hVe2yfMWuwZAHAogc7ppxvZ XAeA== 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=BKPOPwSUiir47rjp19dtnLe1WJrAxZPj+wPVuCjPjoBxCjBEt0r7QJFeuC32n/MZAZ d5tjDmsVZBainWkG0UtO+dtJ3M9ARr4iTAa2vbXraVVUriVy/FI0plZYjYYgpvzIY/2x 0ZPmxUHegNcIFcbI2BziMCuFMIdmorsWrxaCFVQGEm5LX0kJYvzZM+36ErAUGX4+/K5a uQCAHZI7T8NIUcH8qQvKuHm9TWulEir68cki7I/4L3yQZJDyIVkzIE7YSJiiVaawkkAx 7ufxtZpXTDX8Rq6ugI95o/JOywPklfygC4tVhO+TLB1X2k/JaQzM/FxY1vAescZvzkDY TyMw== X-Gm-Message-State: AOAM533aNKBE7Uv8iRxmM6qVJGBVJ+4tGK6kRIvcmgTnlorRZWHO4gyD mLOky08Sl2RVQhF7gNqVdHK9Q0hhFThqSg== X-Received: by 2002:ac2:5503:: with SMTP id j3mr3042988lfk.397.1628892162061; Fri, 13 Aug 2021 15:02:42 -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 s17sm274912ljp.61.2021.08.13.15.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Aug 2021 15:02:41 -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 v2] ixp4xx_eth: Probe the PTP module from the device tree Date: Sat, 14 Aug 2021 00:00:11 +0200 Message-Id: <20210813220011.921211-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210813220011.921211-1-linus.walleij@linaro.org> References: <20210813220011.921211-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);