From patchwork Mon Mar 6 16:10:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 659490 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F24AC64EC4 for ; Mon, 6 Mar 2023 16:36:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbjCFQgX (ORCPT ); Mon, 6 Mar 2023 11:36:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230157AbjCFQfv (ORCPT ); Mon, 6 Mar 2023 11:35:51 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74A4939BA1; Mon, 6 Mar 2023 08:35:19 -0800 (PST) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 326Er8gS017378; Mon, 6 Mar 2023 16:11:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=++FuhlHztEop4Uig5L1dBZosNZIyBfh5t9N+NcII+ow=; b=WYyQF+1ZnyfpnGUnRv0g8PHg/JVLXozfapFl20oDkdVXFSSunHcpaiaWJLYpt5hhlX+m KP8RjMAVFKxGToU6qvLIKySaOn9g0a0jibINxWWMnRVznbTzg2Cp38n/9adRYuMkNkpM bcr58CI5H4WD5kIkW9d7Iv167mM233DG8tWaRa+/xVVUjm6IJQEIFGWnW0RNYNXptpuu EfgFx6TcT/BMg+RYMl8L1dpXrIC1sp4RO6mrLJqy3ODjMDNVx/9UvTPLG1H+QsutUR/u 6H/zldKTMbm5BWEZ1xaXDli/+5ysrnafY22LvbneXaB7JBttTzoWH2vzQXT8aiI4bhFE zQ== Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3p50vmgetr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 16:11:06 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 326G1TYH015321; Mon, 6 Mar 2023 16:11:05 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([9.208.129.117]) by ppma02dal.us.ibm.com (PPS) with ESMTPS id 3p4199hk1n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 16:11:05 +0000 Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 326GB31l49021300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Mar 2023 16:11:03 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9D3F458058; Mon, 6 Mar 2023 16:11:03 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C38C458059; Mon, 6 Mar 2023 16:11:01 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.108.29]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Mar 2023 16:11:01 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: rostedt@goodmis.org, linux-trace-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mhiramat@kernel.org, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, andrew@aj.id.au, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, eajames@linux.ibm.com Subject: [PATCH v8 2/8] fsi: Make master device indexing and naming optional Date: Mon, 6 Mar 2023 10:10:50 -0600 Message-Id: <20230306161057.44017-3-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230306161057.44017-1-eajames@linux.ibm.com> References: <20230306161057.44017-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: wmkguqJmclJLF4rXpk8AUjMG1ui0b-cM X-Proofpoint-ORIG-GUID: wmkguqJmclJLF4rXpk8AUjMG1ui0b-cM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_08,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 suspectscore=0 adultscore=0 mlxscore=0 phishscore=0 spamscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060142 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some FSI masters need different device naming, so make the indexing and naming an optional part of FSI master registration. Signed-off-by: Eddie James --- drivers/fsi/fsi-core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index d591e68afd11..3271e40702ec 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c @@ -1297,11 +1297,16 @@ int fsi_master_register(struct fsi_master *master) struct device_node *np; mutex_init(&master->scan_lock); - master->idx = ida_simple_get(&master_ida, 0, INT_MAX, GFP_KERNEL); - if (master->idx < 0) - return master->idx; - dev_set_name(&master->dev, "fsi%d", master->idx); + if (!master->idx) { + master->idx = ida_simple_get(&master_ida, 0, INT_MAX, + GFP_KERNEL); + if (master->idx < 0) + return master->idx; + + dev_set_name(&master->dev, "fsi%d", master->idx); + } + master->dev.class = &fsi_master_class; rc = device_register(&master->dev); From patchwork Mon Mar 6 16:10:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 659485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7FCCC6FD19 for ; Mon, 6 Mar 2023 17:06:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230291AbjCFRGo (ORCPT ); Mon, 6 Mar 2023 12:06:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbjCFRE6 (ORCPT ); Mon, 6 Mar 2023 12:04:58 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3612311E87; Mon, 6 Mar 2023 09:04:28 -0800 (PST) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 326EnIID033571; Mon, 6 Mar 2023 16:11:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pp1; bh=kX3Vl11fgpbcRT2Yp+QxdfAbvT5CTTbsQ0eGJvC1rnw=; b=PXjgH1WFDfIXChS/16nUtkMTB/EPU2ugQyozjnkeTt8Su5pUrupHvXedF8/619FYq9EI 7wbchx6yj6dukTaNhNuu5QeifHlDaCGVejMiLVEdq1RZ0sQH2iJwGPIznkMBCNwutqGU o8n1PVgxqco0KsTx3Lae+s6wjo/b4kbdWPBlw002hbFf62oA5q12iFlIsPEISE22Kbe8 UPzHXmymwtkU9L1owt7D/HroFt6DDQCdNoWjhOX9ED21dB/xkuQbYoqnuLQmuepQLc02 qD9440jdBl07uy181tkYOZUer8Hd/Loqbnqoh/VegHXHvnNsQrkTL7gv6A0C8c3HyTv8 7g== Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3p4uaen8s1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 16:11:08 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 326G5VvF028682; Mon, 6 Mar 2023 16:11:06 GMT Received: from smtprelay07.wdc07v.mail.ibm.com ([9.208.129.116]) by ppma05wdc.us.ibm.com (PPS) with ESMTPS id 3p419v62wd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 16:11:06 +0000 Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay07.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 326GB55k26214786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Mar 2023 16:11:05 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A8E0E5805B; Mon, 6 Mar 2023 16:11:05 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D659358059; Mon, 6 Mar 2023 16:11:03 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.108.29]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Mar 2023 16:11:03 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: rostedt@goodmis.org, linux-trace-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mhiramat@kernel.org, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, andrew@aj.id.au, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, eajames@linux.ibm.com Subject: [PATCH v8 3/8] dt-bindings: fsi: Document the IBM I2C Responder virtual FSI master Date: Mon, 6 Mar 2023 10:10:51 -0600 Message-Id: <20230306161057.44017-4-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230306161057.44017-1-eajames@linux.ibm.com> References: <20230306161057.44017-1-eajames@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: xJ0syAcowyawIz15vC5s6ijXnxe2CwxZ X-Proofpoint-ORIG-GUID: xJ0syAcowyawIz15vC5s6ijXnxe2CwxZ X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_09,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 clxscore=1015 phishscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 spamscore=0 mlxscore=0 impostorscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060142 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The I2C Responder translates I2C commands to CFAM or SCOM operations, effectively implementing an FSI master. Signed-off-by: Eddie James Reviewed-by: Andrew Jeffery Reviewed-by: Krzysztof Kozlowski --- .../bindings/fsi/ibm,i2cr-fsi-master.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/fsi/ibm,i2cr-fsi-master.yaml diff --git a/Documentation/devicetree/bindings/fsi/ibm,i2cr-fsi-master.yaml b/Documentation/devicetree/bindings/fsi/ibm,i2cr-fsi-master.yaml new file mode 100644 index 000000000000..442cecdc57cb --- /dev/null +++ b/Documentation/devicetree/bindings/fsi/ibm,i2cr-fsi-master.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/fsi/ibm,i2cr-fsi-master.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: IBM I2C Responder virtual FSI master + +maintainers: + - Eddie James + +description: | + The I2C Responder (I2CR) is a an I2C device that's connected to an FSI CFAM + (see fsi.txt). The I2CR translates I2C bus operations to FSI CFAM reads and + writes or SCOM operations, thereby acting as an FSI master. + +properties: + compatible: + enum: + - ibm,i2cr-fsi-master + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + i2cr@20 { + compatible = "ibm,i2cr-fsi-master"; + reg = <0x20>; + }; + }; From patchwork Mon Mar 6 16:10:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 659491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 404E9C61DA4 for ; Mon, 6 Mar 2023 16:35:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229685AbjCFQfV (ORCPT ); Mon, 6 Mar 2023 11:35:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjCFQey (ORCPT ); Mon, 6 Mar 2023 11:34:54 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 614AB3B0DB; Mon, 6 Mar 2023 08:34:21 -0800 (PST) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 326EeDRM017416; Mon, 6 Mar 2023 16:11:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=v2gEUB123stf3BBeQgDaxg0D1lDc/c2GglxXTZ+mQwI=; b=WcG9i5XeaicJ2oUBje495QrWZEzOQe4VsQZoK8bo94emQel9n3rpvpR+/VQXUWKbVpJd 1tmxdDl6nWijbU6mMG6OUjMuLy7ojDfqbXhn5YKr4cfKosEkv9hShpvuldlPb51ev2qX czeQUsgzxM/W1gjh5CU2nK7ADsRRcKXPxNlTOJU+FlGq/vUA7qxE7Ej7FJeNJSo78nCz FiOfoR9jkDVCrL3167GGo93i2p2ZVtIDNj40tCI29/YM8ij33qRDGTFzAf98imRG5Ysh y4GuTFb9JbWSSt+xz5G3I9ZdONFgd1hAaraPMGpRmns9FaXJqn1sR5w62k8i9DLVWgFE Gg== Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3p50vmgexq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 16:11:16 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 326G3qsA020396; Mon, 6 Mar 2023 16:11:15 GMT Received: from smtprelay02.wdc07v.mail.ibm.com ([9.208.129.120]) by ppma02wdc.us.ibm.com (PPS) with ESMTPS id 3p419k634c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 16:11:15 +0000 Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay02.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 326GBDvA59703552 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Mar 2023 16:11:14 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E0F5E5805B; Mon, 6 Mar 2023 16:11:13 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1B99A5805C; Mon, 6 Mar 2023 16:11:12 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.108.29]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Mar 2023 16:11:11 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: rostedt@goodmis.org, linux-trace-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mhiramat@kernel.org, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, andrew@aj.id.au, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, eajames@linux.ibm.com Subject: [PATCH v8 7/8] fsi: Use of_match_table for bus matching if specified Date: Mon, 6 Mar 2023 10:10:55 -0600 Message-Id: <20230306161057.44017-8-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230306161057.44017-1-eajames@linux.ibm.com> References: <20230306161057.44017-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: oDYfBsJ73dgTAAcu7QUJSxV-inL8RD__ X-Proofpoint-ORIG-GUID: oDYfBsJ73dgTAAcu7QUJSxV-inL8RD__ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_08,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 suspectscore=0 adultscore=0 mlxscore=0 phishscore=0 spamscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060142 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Since we have two scom drivers, use the standard of matching if the driver specifies a table so that the right devices go to the right driver. Signed-off-by: Eddie James --- drivers/fsi/fsi-core.c | 11 +++++++++-- drivers/fsi/fsi-scom.c | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index 48f25dc0fad7..5191f6979346 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -1380,8 +1381,14 @@ static int fsi_bus_match(struct device *dev, struct device_driver *drv) if (id->engine_type != fsi_dev->engine_type) continue; if (id->version == FSI_VERSION_ANY || - id->version == fsi_dev->version) - return 1; + id->version == fsi_dev->version) { + if (drv->of_match_table) { + if (of_driver_match_device(dev, drv)) + return 1; + } else { + return 1; + } + } } return 0; diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c index bcb756dc9866..61dbda9dbe2b 100644 --- a/drivers/fsi/fsi-scom.c +++ b/drivers/fsi/fsi-scom.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -587,6 +588,12 @@ static int scom_remove(struct device *dev) return 0; } +static const struct of_device_id scom_of_ids[] = { + { .compatible = "ibm,fsi2pib" }, + { } +}; +MODULE_DEVICE_TABLE(of, scom_of_ids); + static const struct fsi_device_id scom_ids[] = { { .engine_type = FSI_ENGID_SCOM, @@ -600,6 +607,7 @@ static struct fsi_driver scom_drv = { .drv = { .name = "scom", .bus = &fsi_bus_type, + .of_match_table = scom_of_ids, .probe = scom_probe, .remove = scom_remove, } From patchwork Mon Mar 6 16:10:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 659493 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCE2FC678D4 for ; Mon, 6 Mar 2023 16:29:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229772AbjCFQ3E (ORCPT ); Mon, 6 Mar 2023 11:29:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbjCFQ3D (ORCPT ); Mon, 6 Mar 2023 11:29:03 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2D5BA5F3; Mon, 6 Mar 2023 08:28:36 -0800 (PST) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 326FrF7E017356; Mon, 6 Mar 2023 16:11:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=KJc0ydFTUgIwjCtrGuXVj0xPsA/uMLi0FjiGPI0kMbA=; b=hY8ZOxUv5biZkTPrq/BY7fVKfXFAIDujuM2L5SDJgcEqx3Ov8gYKJeeVTtDjXh1PrsH7 M6bCX9ipx2O7io8MCeYLG+5aeIAXypHkLNxVVJtMg2m4CJUZ8n9XcaHP2xMaHF0ebspG kwRo1iqDvHmkj5BAhjnXA8HXDFbBx8BjvQ4i5tUohKIxrXY5zPAmJX0uhex5yT2N7kpH oz2yVfhG2DSS8OSb3MkR2suIVZtpFSo5Aner9yY6k8FMYRRsT8nMOMQ8zFRTXsPFkCNy C+9X/8Vy+yn2lqzwqLVi3o8qHwO6TH47oTvNX23Yy8FLgq4sClphrx+DWJCXk8UyljAM 0A== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3p4vp23hw5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 16:11:18 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 326G5cJN010180; Mon, 6 Mar 2023 16:11:17 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([9.208.129.117]) by ppma04wdc.us.ibm.com (PPS) with ESMTPS id 3p419e632q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 16:11:17 +0000 Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 326GBGCZ4260470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Mar 2023 16:11:16 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 021EE58059; Mon, 6 Mar 2023 16:11:16 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 267C15805B; Mon, 6 Mar 2023 16:11:14 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.108.29]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Mar 2023 16:11:13 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: rostedt@goodmis.org, linux-trace-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mhiramat@kernel.org, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, andrew@aj.id.au, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, eajames@linux.ibm.com Subject: [PATCH v8 8/8] fsi: sbefifo: Don't check status during probe Date: Mon, 6 Mar 2023 10:10:56 -0600 Message-Id: <20230306161057.44017-9-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230306161057.44017-1-eajames@linux.ibm.com> References: <20230306161057.44017-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: _GRm8Kz4E-rhTUsgYYNUBbSH2FhkmY1_ X-Proofpoint-GUID: _GRm8Kz4E-rhTUsgYYNUBbSH2FhkmY1_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_08,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 clxscore=1015 suspectscore=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060142 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The status check during probe doesn't serve any purpose. Any attempt to use the SBEFIFO will result in the same check and cleanup. Signed-off-by: Eddie James --- drivers/fsi/fsi-sbefifo.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c index 9912b7a6a4b9..42d7c95528d1 100644 --- a/drivers/fsi/fsi-sbefifo.c +++ b/drivers/fsi/fsi-sbefifo.c @@ -1027,14 +1027,6 @@ static int sbefifo_probe(struct device *dev) mutex_init(&sbefifo->lock); sbefifo->timeout_start_rsp_ms = SBEFIFO_TIMEOUT_START_RSP; - /* - * Try cleaning up the FIFO. If this fails, we still register the - * driver and will try cleaning things up again on the next access. - */ - rc = sbefifo_cleanup_hw(sbefifo); - if (rc && rc != -ESHUTDOWN) - dev_err(dev, "Initial HW cleanup failed, will retry later\n"); - /* Create chardev for userspace access */ sbefifo->dev.type = &fsi_cdev_type; sbefifo->dev.parent = dev;