From patchwork Thu Nov 23 11:38:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jaiswal X-Patchwork-Id: 168890 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp379876vqx; Thu, 23 Nov 2023 03:39:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IExVSAsmWGdkyu85FtIvvvLgLr5gG3AXOxnxDXzL3fCrAoobPrVPWjFu6jqUjUn+ANfc724 X-Received: by 2002:a05:6a00:3924:b0:6cb:b59d:ed8f with SMTP id fh36-20020a056a00392400b006cbb59ded8fmr5587038pfb.28.1700739571407; Thu, 23 Nov 2023 03:39:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700739571; cv=none; d=google.com; s=arc-20160816; b=eF0zVOm/kEZm/Beyulv7weZrFq6XWaDlFbgf25YVuZBuAhrk51XG4r+rVxtFPLuo+b Xf8quyA8O3emsfxSWjNpRzEUwLPn7lLHtCs1J1V+fYZdk0aVm2p0af8rkVzTGj37s/rW L1MCuCb1+HJ1Ci3vJHvopfc4/5RMJ7XjfUKe01g31L2OMjtL+0AMuaA+fXo7XAlgBtyE DbPSM10zzAN5xO2yO61pssK1xESwtEztCS9AjKHRG/yO0nL/pG/sKiqbd4mu5I94xq3v +QYaK+XJ+WTa+4KKxLXcHh1NWHBZ7X9s+MFivmlna2MF9LOKjD1+MkqqOZOmc+gx1RQZ 3diw== 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=/HMvisoKKdxErewtmk40Y03V2X0AbT3pYgpBbk9Rjm0=; fh=gw1nGGRvPTMpMB1+2yIHl2JD2hbsUI2mdSe/41PDYQ8=; b=KYH9rpso8LAcQ7QJNp5m8mbeh+dtr+ssNbhj+fZqoluklY9RHcBE62yV7duQpt/GPU LrcHZARYS6sQphhPQTW71glJ6tqKZbwIglEvkVB6xCc50hHEUknmUoyFtLupbNWl4vYa kZpdmeeA2dznVhMrP6vwkiB3gFjLX8PBDnxBG0OmAhzSxvWCeIBaYGoXSSKJqZ3WnoxH p+gsu2hniGtLGO3NrtWGXWZYq78PgOpk/KJcQRcRKegF0phc2i7F1szUuF9j/VJ9QEhH HehcZaY7KcW8nwnhQry/aAdEXBqkPCaMkMgNH11Aiu+jrke4iRZZ2NS3dvp8nHgFzq7T f02w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FTPmFASt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id g9-20020a056a0023c900b0069342eade87si1133269pfc.18.2023.11.23.03.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 03:39:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FTPmFASt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A483683271F8; Thu, 23 Nov 2023 03:39:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345101AbjKWLjA (ORCPT + 99 others); Thu, 23 Nov 2023 06:39:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345098AbjKWLi5 (ORCPT ); Thu, 23 Nov 2023 06:38:57 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35BFDD49; Thu, 23 Nov 2023 03:39:04 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AN7GGeb017205; Thu, 23 Nov 2023 11:38:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=/HMvisoKKdxErewtmk40Y03V2X0AbT3pYgpBbk9Rjm0=; b=FTPmFAStJQvWCXT2JqgjETF98n35+85+FhhC6cdOFjW7NJIPSQAjSW7Vk+3++cO5Jh5P WehfG11ilifcqIrbWByqi9seXkmlz8uIMhSZCoiF7Y/cwtbVG9sgJDK434fImaqFdq50 77nCb3ry0uxR4IIFMa/jzhJRtIfY9WMhjRLbsf5jF7mQwHmjOG3pcloVMTtxNT8JddJq Pv25Ax2zKCe9kl9HNe2XxEVfVldXecY+9n10n03ltcZ+y9Y0bhAvbTiRhvBxhgflbkwC 5rqq/RwPZ3L9Lsbf1ZZq8p0p+QYSz2KJJ7XRh76XGDGs/zseIrTRZOZ/L7eS76CXh7Ri fg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uhf6ku4xj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Nov 2023 11:38:51 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3ANBcoHw001075 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Nov 2023 11:38:50 GMT Received: from hu-jsuraj-hyd.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 23 Nov 2023 03:38:40 -0800 From: Suraj Jaiswal To: , Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S. Miller" , Eric Dumazet , "Jakub Kicinski" , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Alexandre Torgue , "Jose Abreu" , Maxime Coquelin , , , , , , Prasad Sodagudi , Andrew Halaney CC: Subject: [PATCH net-next v3 1/3] dt-bindings: net: qcom,ethqos: add binding doc for fault IRQ for sa8775p Date: Thu, 23 Nov 2023 17:08:13 +0530 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: b_LEfvE0nJH2UYhSEG3J1ox4TGf0wXYC X-Proofpoint-ORIG-GUID: b_LEfvE0nJH2UYhSEG3J1ox4TGf0wXYC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_09,2023-11-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 priorityscore=1501 clxscore=1015 adultscore=0 mlxlogscore=904 spamscore=0 suspectscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311230083 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 23 Nov 2023 03:39:28 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783354696654466393 X-GMAIL-MSGID: 1783354696654466393 Add binding doc for fault IRQ. The fault IRQ will be trigger for ECC,DPP,FSM error. Signed-off-by: Suraj Jaiswal --- Documentation/devicetree/bindings/net/qcom,ethqos.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml index 7bdb412a0185..e013cb51fb07 100644 --- a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml @@ -37,12 +37,14 @@ properties: items: - description: Combined signal for various interrupt events - description: The interrupt that occurs when Rx exits the LPI state + - description: The interrupt that occurs when HW fault occurs interrupt-names: minItems: 1 items: - const: macirq - const: eth_lpi + - const: safety clocks: maxItems: 4 @@ -89,8 +91,9 @@ examples: <&gcc GCC_ETH_PTP_CLK>, <&gcc GCC_ETH_RGMII_CLK>; interrupts = , - ; - interrupt-names = "macirq", "eth_lpi"; + , + ; + interrupt-names = "macirq", "eth_lpi", "safety"; rx-fifo-depth = <4096>; tx-fifo-depth = <4096>; From patchwork Thu Nov 23 11:38:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jaiswal X-Patchwork-Id: 168889 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp379853vqx; Thu, 23 Nov 2023 03:39:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOLu9/GSsf6oWF+id2ZWwbw4WPWhhwGXfGff/89gGYtzZKR3EQYnfwm2r2zsD/ml+ZIamr X-Received: by 2002:a17:902:e546:b0:1cc:fd1:c85f with SMTP id n6-20020a170902e54600b001cc0fd1c85fmr6025512plf.22.1700739568109; Thu, 23 Nov 2023 03:39:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700739568; cv=none; d=google.com; s=arc-20160816; b=MWzE7KuJ1fk95QnN3eqULHda3ypX+j5BoJshF5syKTJjyf1Tf1ogO2vD23gwPYkFGS FQeK6EizrGmiasBlkc99B+zbJKGLzLGcSWKVVmxWJDAHClo8CsqaHjEo+A/p7JTINGVW N8DdeS/ylgkJ8hWop2b0auuIcPjEk8TFFyeQ3x1Ccx0h04yT+uTwT5znOZUgOoJPzTNq 0UbpJyvxEYuM6CmgpZa0gKHjuXCtss7+Swuhj633nXGJemKZMi+G6tKGX8LVA8YFQZP4 cYAQu+EJmxHsm0Qp/5Rc1TuQIRuUnSHrkUnD+1/H2t2pxSTchp7qx0RNGNtwLrpIsSlJ sNGw== 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=y/Nd+6w8S23TPbGZaLug3tvcWS5MO7EAocO+wJHDUn0=; fh=gw1nGGRvPTMpMB1+2yIHl2JD2hbsUI2mdSe/41PDYQ8=; b=Tc9dT/rTCl8NJMkD0I9jdhFkruCdeY8lOEOqVjuioaLEObKwU4QmkoH3W9Yfwg3P6t QOkE/acjfnaqi9Z+Kxk24S6PiqRHRKVK5c4Tq1zPbx94W8zrA3aiMrOrt9gEXzgVfqeu mJ+H06+zDGQi2Q6goSQ1+WnQuqqSg/4LS8poEAGf5UF0gK5Jb3e9A1/eRb14te5/2g6k uYKWRHfPJG5MDvfINx1VZkzf49VSQL2+wICC4yI+qZ4gixLh3ab5eeBbLAUR38t+4zph sl25bkNsVzgf2hcaNZbSQNj+Bkgdj/TRGuDG7mRniZNonJm9/oGJJy/ZnGI40p9psdio 28cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AtYyDBiv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q22-20020a170902789600b001cf677b6c36si921827pll.281.2023.11.23.03.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 03:39:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AtYyDBiv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A15EC825899B; Thu, 23 Nov 2023 03:39:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345139AbjKWLjM (ORCPT + 99 others); Thu, 23 Nov 2023 06:39:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345122AbjKWLjH (ORCPT ); Thu, 23 Nov 2023 06:39:07 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4926410C2; Thu, 23 Nov 2023 03:39:12 -0800 (PST) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AN3LFmZ021376; Thu, 23 Nov 2023 11:38:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=y/Nd+6w8S23TPbGZaLug3tvcWS5MO7EAocO+wJHDUn0=; b=AtYyDBivYAoz3cU2DbNfjxKLzSfSnNWvWmahcjxev2vQBQa0hv1AoFrff57h/DwkMbEF 4kW2NT0q5evQiagQZG9tBtyjRpVJg6v1MjA+g2ZVrETxBc907+DYHsDM4F/dpTK1M9Wz VMFMoDm3IoX2nlEk+ct2bsIWhV6V27LDVwNOsbZAU67ZvMlJgN8ARbX7vwnPtl6GzwBi Ka6ZzCNQy5WPYf7jzaweM+FO+KgM1Um+lnOsvPnZCjtog4oSIGFOv08FHcmG1hAzE5Y7 4X4IOWab1ZXPuKPmeBSU99+mWytTWrpz/U6zxar29eCtL/RIIOihb7ivBe/ADjsA7xL7 Ig== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uhgajtyxu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Nov 2023 11:38:58 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3ANBcvM1003675 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Nov 2023 11:38:57 GMT Received: from hu-jsuraj-hyd.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 23 Nov 2023 03:38:48 -0800 From: Suraj Jaiswal To: , Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S. Miller" , Eric Dumazet , "Jakub Kicinski" , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Alexandre Torgue , "Jose Abreu" , Maxime Coquelin , , , , , , Prasad Sodagudi , Andrew Halaney CC: Subject: [PATCH net-next v3 2/3] arm64: dts: qcom: sa8775p: enable Fault IRQ Date: Thu, 23 Nov 2023 17:08:14 +0530 Message-ID: <66690488f08912698301a2c203d7c562798806a2.1700737841.git.quic_jsuraj@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: OCaS-hLvfQWlnsCpeN6KUYIcpNTCnmcY X-Proofpoint-ORIG-GUID: OCaS-hLvfQWlnsCpeN6KUYIcpNTCnmcY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_09,2023-11-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=662 priorityscore=1501 lowpriorityscore=0 spamscore=0 bulkscore=0 clxscore=1015 impostorscore=0 malwarescore=0 mlxscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311230083 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 23 Nov 2023 03:39:23 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783354693173896518 X-GMAIL-MSGID: 1783354693173896518 Add changes to support fault IRQ Handling Support for ethernet. Signed-off-by: Suraj Jaiswal --- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi index 13dd44dd9ed1..15155adcd200 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi @@ -2394,8 +2394,9 @@ ethernet1: ethernet@23000000 { <0x0 0x23016000 0x0 0x100>; reg-names = "stmmaceth", "rgmii"; - interrupts = ; - interrupt-names = "macirq"; + interrupts = + ; + interrupt-names = "macirq", "safety"; clocks = <&gcc GCC_EMAC1_AXI_CLK>, <&gcc GCC_EMAC1_SLV_AHB_CLK>, @@ -2427,8 +2428,9 @@ ethernet0: ethernet@23040000 { <0x0 0x23056000 0x0 0x100>; reg-names = "stmmaceth", "rgmii"; - interrupts = ; - interrupt-names = "macirq"; + interrupts = , + ; + interrupt-names = "macirq", "safety"; clocks = <&gcc GCC_EMAC0_AXI_CLK>, <&gcc GCC_EMAC0_SLV_AHB_CLK>, From patchwork Thu Nov 23 11:38:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jaiswal X-Patchwork-Id: 168891 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp379929vqx; Thu, 23 Nov 2023 03:39:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeqbjYIx3FGsyTXCuO7NN81ytab/KUW5FpND1FfellCxb0SyPFlvrf9oAESz8oFO/l2Y3S X-Received: by 2002:a05:6a20:3d21:b0:18b:8fd9:5ad4 with SMTP id y33-20020a056a203d2100b0018b8fd95ad4mr1730051pzi.10.1700739582069; Thu, 23 Nov 2023 03:39:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700739582; cv=none; d=google.com; s=arc-20160816; b=aU6Pp50Bw4QbTaS/pIuXmTfBa2lUGm+xQ4uMsyzpHap4ru2ZERydxIwZQqj2QjvSUo 8g1Q4INAR/ElRJGl3ph6bwIUvB3Vpdn/I1bpiOLXNkds8hlVQEsKFHUCzbe/au7X49Fz s47KgMhkp0swLhgOmeCf7/0nGdYXPTzCDX3Ki3EFK+9EpyTNCDxQVJ+2AvEeHCdlcKrp 8Yb1ERqvjuXUT2Y2edQe98J1MHEE0e2ruZ1TifXky9wqAYAemf6ugXf/2BUisDVa25Af xksftQj6U8sitin6MoJepYUgECQBrHdh43XW3kRX2vF4lZd0h7wegWo07Q5o/F5tbShY 3X5w== 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=6juClkUBmcBTBsnEjdDc22tc/uO5kD0o1qqxtbwZTZM=; fh=gw1nGGRvPTMpMB1+2yIHl2JD2hbsUI2mdSe/41PDYQ8=; b=rrU8793VSh/MR7yqWkMkm62e/PiOOe6JuumKm1Z30H9gahxLDWifSDy/JRva3XFX1H rmCQxeH0a0xs8Kc6t25U30yi+vbB6fCb6eYZRuAtnaiHtNLJq9dVseNMPAnOz7gUcgjl BJnTsQ1FfxH5YcgdhQgjktyBsPJ5futoxkUlRovZAB0nFXR3olxT6eaF28iUuOyugE78 ucBzB4o3ilkrwYaxNC+GefHV2UQ+yqyosGEH5A6fsek8Vn78tRL6hZWuySpMyIJsUeDB okAGR6E9FxKu0w/7in92nr/HxHMG2riMwoAeXbLZc3wdyqnmLYpSG7ptK8MgVp+Jl0Ed F9zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=S4oW4wKR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id p6-20020a634206000000b0056513361b4fsi1082405pga.741.2023.11.23.03.39.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 03:39:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=S4oW4wKR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 70C1883271FB; Thu, 23 Nov 2023 03:39:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345107AbjKWLjY (ORCPT + 99 others); Thu, 23 Nov 2023 06:39:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345097AbjKWLjM (ORCPT ); Thu, 23 Nov 2023 06:39:12 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 264DD10C0; Thu, 23 Nov 2023 03:39:18 -0800 (PST) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AN8fLHM007773; Thu, 23 Nov 2023 11:39:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=6juClkUBmcBTBsnEjdDc22tc/uO5kD0o1qqxtbwZTZM=; b=S4oW4wKRm2I3ppiPge+nPl+LYaNLjOrkEwx64EfTssDd5PypbUkDpZT1WtRhI1heA7zs NjXf+98H2zhe2q8yLI+f8BmhU29bOZTWppPXJy+85Ri/Tv/RbSdb9ex6EXq5CDI5lpAa qA8y3ZbngPWjhkD78+7ALREWCss0JZslNc0ciQP8xUygAGUhAKugZVDzzFfFgWMAf9uQ QZcJ2NYWNHI8L9AABa8YyzgqZ3NTS2A11BbNRk2F7nBYO3MZLUrNvvoAfRw4feP6ZXUm 6M0CcI+OTppAERi4g0OWl/zeHek+zCnYW1H4Ehg1qZN+lW6Cz6zJeGR9yHLZSZARGLkg vw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uj3ec0b67-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Nov 2023 11:39:06 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3ANBd59P005976 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Nov 2023 11:39:05 GMT Received: from hu-jsuraj-hyd.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 23 Nov 2023 03:38:55 -0800 From: Suraj Jaiswal To: , Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S. Miller" , Eric Dumazet , "Jakub Kicinski" , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Alexandre Torgue , "Jose Abreu" , Maxime Coquelin , , , , , , Prasad Sodagudi , Andrew Halaney CC: Subject: [PATCH net-next v3 3/3] net: stmmac: Add driver support for DWMAC5 fault IRQ Support Date: Thu, 23 Nov 2023 17:08:15 +0530 Message-ID: <62eaaace3713751cb1ecac3163e857737107ca0e.1700737841.git.quic_jsuraj@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: inTtRkS7Bsh4eRNmB_EsvVggQ51OqJNb X-Proofpoint-GUID: inTtRkS7Bsh4eRNmB_EsvVggQ51OqJNb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_09,2023-11-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311230083 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 23 Nov 2023 03:39:39 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783354708328955469 X-GMAIL-MSGID: 1783354708328955469 Add IRQ support to listen HW fault like ECC,DPP,FSM fault and print the fault information in the kernel log. Signed-off-by: Suraj Jaiswal --- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 ++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 18 +++++++++++++++++ .../ethernet/stmicro/stmmac/stmmac_platform.c | 20 +++++++++++++++++++ 4 files changed, 41 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index 6b935922054d..c4821c7ab674 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -347,6 +347,7 @@ enum request_irq_err { REQ_IRQ_ERR_SFTY_UE, REQ_IRQ_ERR_SFTY_CE, REQ_IRQ_ERR_LPI, + REQ_IRQ_ERR_SAFETY, REQ_IRQ_ERR_WOL, REQ_IRQ_ERR_MAC, REQ_IRQ_ERR_NO, diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index cd7a9768de5f..8893d4b7fa38 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -33,6 +33,7 @@ struct stmmac_resources { int irq; int sfty_ce_irq; int sfty_ue_irq; + int safety_common_intr; int rx_irq[MTL_MAX_RX_QUEUES]; int tx_irq[MTL_MAX_TX_QUEUES]; }; @@ -331,6 +332,7 @@ struct stmmac_priv { /* XDP BPF Program */ unsigned long *af_xdp_zc_qps; struct bpf_prog *xdp_prog; + int safety_common_intr; }; enum stmmac_state { diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 8964fc8a955f..2ae4f34444de 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3530,6 +3530,10 @@ static void stmmac_free_irq(struct net_device *dev, if (priv->wol_irq > 0 && priv->wol_irq != dev->irq) free_irq(priv->wol_irq, dev); fallthrough; + case REQ_IRQ_ERR_SAFETY: + if (priv->safety_common_intr > 0 && priv->safety_common_intr != dev->irq) + free_irq(priv->safety_common_intr, dev); + fallthrough; case REQ_IRQ_ERR_WOL: free_irq(dev->irq, dev); fallthrough; @@ -3736,6 +3740,18 @@ static int stmmac_request_irq_single(struct net_device *dev) } } + if (priv->safety_common_intr > 0 && priv->safety_common_intr != dev->irq) { + ret = request_irq(priv->safety_common_intr, stmmac_safety_interrupt, + 0, "safety", dev); + if (unlikely(ret < 0)) { + netdev_err(priv->dev, + "%s: alloc safety failed %d (error: %d)\n", + __func__, priv->safety_common_intr, ret); + irq_err = REQ_IRQ_ERR_SAFETY; + goto irq_error; + } + } + return 0; irq_error: @@ -7398,6 +7414,8 @@ int stmmac_dvr_probe(struct device *device, priv->lpi_irq = res->lpi_irq; priv->sfty_ce_irq = res->sfty_ce_irq; priv->sfty_ue_irq = res->sfty_ue_irq; + priv->safety_common_intr = res->safety_common_intr; + for (i = 0; i < MTL_MAX_RX_QUEUES; i++) priv->rx_irq[i] = res->rx_irq[i]; for (i = 0; i < MTL_MAX_TX_QUEUES; i++) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 1ffde555da47..bae1704d5f4b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -690,9 +690,25 @@ devm_stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) #endif /* CONFIG_OF */ EXPORT_SYMBOL_GPL(devm_stmmac_probe_config_dt); +int stmmac_get_fault_intr_config(struct platform_device *pdev, struct stmmac_resources *res) +{ + int ret = 0; + + res->safety_common_intr = platform_get_irq_byname(pdev, "safety"); + + if (res->safety_common_intr < 0) { + if (res->safety_common_intr != -EPROBE_DEFER) + dev_err(&pdev->dev, "safety IRQ configuration information not found\n"); + ret = 1; + } + + return ret; +} + int stmmac_get_platform_resources(struct platform_device *pdev, struct stmmac_resources *stmmac_res) { + int ret = 0; memset(stmmac_res, 0, sizeof(*stmmac_res)); /* Get IRQ information early to have an ability to ask for deferred @@ -702,6 +718,10 @@ int stmmac_get_platform_resources(struct platform_device *pdev, if (stmmac_res->irq < 0) return stmmac_res->irq; + ret = stmmac_get_fault_intr_config(pdev, stmmac_res); + if (ret) + dev_err(&pdev->dev, "Fault interrupt not present\n"); + /* On some platforms e.g. SPEAr the wake up irq differs from the mac irq * The external wake up irq can be passed through the platform code * named as "eth_wake_irq"