Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp33839rwl; Wed, 9 Aug 2023 10:28:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmMcbRRkNEezzvmPjZI1DjdpPgBV0EaRuDDcdozYQAlx/utdNoqs8r71hbTt25k5/dAXX4 X-Received: by 2002:a05:6a00:1a0f:b0:687:2b8e:8a83 with SMTP id g15-20020a056a001a0f00b006872b8e8a83mr3307293pfv.32.1691602126886; Wed, 09 Aug 2023 10:28:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691602126; cv=none; d=google.com; s=arc-20160816; b=XSXHTBxGH4GCshuW5a7EERgt/zDbWejp7Ajz0XqLjZNZWSXQjiCDUz4+bQdNwisjHv Cv2sGtMb2czV9lQ09K7TwGLf69ZSB2wEdeDFkvIjS2aog0bQlpHz7EhFQaBXZ1nfp8R9 prvkU7E+SyZpBqBraUqv7W9dfodasdaxlW9eySq2QrMDPQpEe+84i+w3+penPmA80vvv 5N701W9+vSDmzPcx+tRciDNc+l9O3PMz16w8aeM0MNze1GiB9zmaZEdTL42XJhoCr8J9 HhPp1mmq/iiwSVsRtLeGTp5shSJeKyZ0nni1sTSVeH4Yh1HycZ/hJGkSc2AW84g2T1lU 1n3g== 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=OuJDdIS5m5t68jUpTnWAKzdgaeJCnpqKrEaxgdO3hso=; fh=UEVvRAFK6gmZxZNnJDUC7AmNk/iU78fiWA23OmiDi44=; b=o/dYTqy2Vr/xDpMBnu6nygY1zjlIf50pysYL6PjvS0fGAU+KcPrnPFzrpskn3o+PSl 5eqhlxMysLHGhjrT04rPxclbLrEhLW4WswdaXmxMb+wqTEBkzlHeBAKYJU5FAE1kco5t DCnQZ+POkgxdK7b6DJw8GBQw7+Z/sfO9hi4d6R/mRwgY8tk2FUx77FXb2tPyogDLRIib T5qQ/It+VEuPGks21STytrk6dwU6AIhmr0fVPQoVc1crCv/KDuBZ6bnfIFjseZ9Axng/ XU+G3FCT3YjRVtvO5xfUCz85ZMpQSk9tqQJDZgATBeGra01ujWtXjSNwSVm/m5YnzzKP qvoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L4FQ928x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a634645000000b00563eda6a8e6si9364268pgk.613.2023.08.09.10.28.31; Wed, 09 Aug 2023 10:28:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L4FQ928x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232311AbjHIRCd (ORCPT + 99 others); Wed, 9 Aug 2023 13:02:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232505AbjHIRCP (ORCPT ); Wed, 9 Aug 2023 13:02:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BE842136; Wed, 9 Aug 2023 10:02:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A281F641D7; Wed, 9 Aug 2023 17:02:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E6C6C433CC; Wed, 9 Aug 2023 17:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691600533; bh=2GxVXefyNbdQErExbmg0/pws/HcbyG4JyeKhzXvRnBE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L4FQ928xApvJhFE7Tj8KKEoOwWeAcsCs7IVHfjo54UzZhuYT+1/itilrbXbRAkTot aygKFrqatHRVmboBFOzHoObEJlmsElo6lDTz74RBj6An9R/fnCu2HlOwl2+RB6C1Tf +FLLxeQp+C5lGV8MtsdKsRV5EoxRSLGnzH8SGey+kA1k2KlB2z5OZRmvJg1260d3hR KJAWgfmAq2wIgT0c47FDz0u20m2QnpPLoqsa9KeRBLAyemWGdPr+b+RSi3plJ6z+Ke j1BtCa/bbeGCxRgRp0pyJZunGA1HUrosCZQPLTZJzOg/Hid0gOD1reZKA8wQ3ZDcNS 0Y4oJ9Gsm6AXQ== From: Jisheng Zhang To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next v3 08/10] net: stmmac: platform: support parsing safety irqs from DT Date: Thu, 10 Aug 2023 00:50:05 +0800 Message-Id: <20230809165007.1439-9-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230809165007.1439-1-jszhang@kernel.org> References: <20230809165007.1439-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The snps dwmac IP may support safety features, and those Safety Feature Correctible Error and Uncorrectible Error irqs may be separate irqs. Add support to parse the safety irqs from DT. Signed-off-by: Jisheng Zhang --- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 23d53ea04b24..29145682b57b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -738,6 +738,18 @@ int stmmac_get_platform_resources(struct platform_device *pdev, dev_info(&pdev->dev, "IRQ eth_lpi not found\n"); } + stmmac_res->sfty_ce_irq = platform_get_irq_byname_optional(pdev, "sfty_ce"); + if (stmmac_res->sfty_ce_irq < 0) { + if (stmmac_res->sfty_ce_irq == -EPROBE_DEFER) + return -EPROBE_DEFER; + } + + stmmac_res->sfty_ue_irq = platform_get_irq_byname_optional(pdev, "sfty_ue"); + if (stmmac_res->sfty_ue_irq < 0) { + if (stmmac_res->sfty_ue_irq == -EPROBE_DEFER) + return -EPROBE_DEFER; + } + stmmac_res->addr = devm_platform_ioremap_resource(pdev, 0); return PTR_ERR_OR_ZERO(stmmac_res->addr); -- 2.40.1