From patchwork Wed Nov 2 20:51:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 1698495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=ao2pkhdb; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N2fG90Jd3z23lp for ; Thu, 3 Nov 2022 07:52:17 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4N2fG86GStz3cKk for ; Thu, 3 Nov 2022 07:52:16 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=ao2pkhdb; dkim-atps=neutral X-Original-To: linux-fsi@lists.ozlabs.org Delivered-To: linux-fsi@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=eajames@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=ao2pkhdb; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4N2fFv2lLrz3cLB for ; Thu, 3 Nov 2022 07:52:03 +1100 (AEDT) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A2KLTQo022441; Wed, 2 Nov 2022 20:51:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=3Vo7kFNZKuw3z5FeVY3FfDysBAcb781H5upJaig0ErE=; b=ao2pkhdbdF50UBy8jNvZ9vKC4OkgjVtlRumFIzWQa6WH31li2sjP8ow47kEMPcTNcyPH 0ZlfZ+F4g5MkIRfySZXp0jM5XrnlTk4bLmsI1SyXMSgbI+u6slAib1YZs1rmDUYTJNzL VqllgWWs2NWen1Ywt4myW5eXQH68LW4lUrc/QOC0iM7f1t4RPPPsjkoxBNZfqTHfDeqr 4KMt0NmtXjoMSN32LzrIcHhR6QFNM7p6s3Aeg+GLBw1gDN2w8QJ0fLAVWySfOU2t6pow oXNQOCSny84+eYvKYkWd+Hu2BK7VcXhpJyFSD/oxEPOSPUzFb3ixryvufiGnWsgOE8cB zg== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kkyh18r4c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Nov 2022 20:51:53 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2A2Kpfkk025181; Wed, 2 Nov 2022 20:51:52 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma01dal.us.ibm.com with ESMTP id 3kgutav8qt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Nov 2022 20:51:52 +0000 Received: from smtpav05.dal12v.mail.ibm.com ([9.208.128.132]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2A2KpmB916253478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Nov 2022 20:51:48 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8575358052; Wed, 2 Nov 2022 20:51:50 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 80C9F5805D; Wed, 2 Nov 2022 20:51:49 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.65.200.160]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 2 Nov 2022 20:51:49 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Subject: [PATCH v2 0/5] fsi: Add regmap and refactor sbefifo Date: Wed, 2 Nov 2022 15:51:43 -0500 Message-Id: <20221102205148.1334459-1-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: nNQRhG22lDT2iYZdY7mGaMV64I4AuWeW X-Proofpoint-ORIG-GUID: nNQRhG22lDT2iYZdY7mGaMV64I4AuWeW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-02_15,2022-11-02_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=473 phishscore=0 lowpriorityscore=0 spamscore=0 clxscore=1011 priorityscore=1501 adultscore=0 suspectscore=0 impostorscore=0 bulkscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211020135 X-BeenThere: linux-fsi@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafael@kernel.org, linux-kernel@vger.kernel.org, broonie@kernel.org, alistair@popple.id.au Errors-To: linux-fsi-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "linux-fsi" The SBEFIFO hardware can now be attached over a new I2C endpoint interface called the I2C Responder (I2CR). In order to use the existing SBEFIFO driver, add a regmap driver for the FSI bus and an endpoint driver for the I2CR. Then, refactor the SBEFIFO and OCC drivers to clean up and use the new regmap driver or the I2CR interface. Changes since v1: - Instead of a regmap driver for the I2CR, just have a private interface driver for FSI, since SBEFIFO is likely the only user. Eddie James (5): regmap: Add FSI bus support drivers: fsi: Add I2C Responder driver drivers: fsi: Rename sbefifo and occ sources drivers: fsi: separate char device code for occ and sbefifo drivers: fsi: occ and sbefifo refactor drivers/base/regmap/Kconfig | 6 +- drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-fsi.c | 231 ++++++ drivers/fsi/Kconfig | 32 +- drivers/fsi/Makefile | 9 +- drivers/fsi/fsi-occ.c | 766 -------------------- drivers/fsi/fsi-sbefifo.c | 1144 ------------------------------ drivers/fsi/i2cr.c | 116 +++ drivers/fsi/i2cr.h | 19 + drivers/fsi/occ-cdev.c | 157 ++++ drivers/fsi/occ.c | 536 ++++++++++++++ drivers/fsi/occ.h | 57 ++ drivers/fsi/sbefifo-cdev.c | 218 ++++++ drivers/fsi/sbefifo-fsi.c | 68 ++ drivers/fsi/sbefifo-i2c.c | 73 ++ drivers/fsi/sbefifo.c | 797 +++++++++++++++++++++ drivers/fsi/sbefifo.h | 50 ++ include/linux/regmap.h | 37 + 18 files changed, 2398 insertions(+), 1919 deletions(-) create mode 100644 drivers/base/regmap/regmap-fsi.c delete mode 100644 drivers/fsi/fsi-occ.c delete mode 100644 drivers/fsi/fsi-sbefifo.c create mode 100644 drivers/fsi/i2cr.c create mode 100644 drivers/fsi/i2cr.h create mode 100644 drivers/fsi/occ-cdev.c create mode 100644 drivers/fsi/occ.c create mode 100644 drivers/fsi/occ.h create mode 100644 drivers/fsi/sbefifo-cdev.c create mode 100644 drivers/fsi/sbefifo-fsi.c create mode 100644 drivers/fsi/sbefifo-i2c.c create mode 100644 drivers/fsi/sbefifo.c create mode 100644 drivers/fsi/sbefifo.h