Message ID | 20221211103913.5287-1-ilpo.jarvinen@linux.intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1708962wrr; Sun, 11 Dec 2022 02:40:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf5FUiLtI3CcjiUM8OFE9BzeJ4vbNdPx7U1INHkiSYRWSi1uc+ZGO37qQY+7twZieaY9I8HU X-Received: by 2002:a17:90a:e618:b0:219:3f85:b1e3 with SMTP id j24-20020a17090ae61800b002193f85b1e3mr14112177pjy.3.1670755221873; Sun, 11 Dec 2022 02:40:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670755221; cv=none; d=google.com; s=arc-20160816; b=laD9LR0z5Ogkc6kjn1HBj8bZ1HI6fDJC+tW/waJVN24keigaPpL+TC4RPrpT32pCA9 oHGAKuXoqHlQQ/E20yG0BaCpM80YKA5aE2B9v6PGUmpwaIwxFXzEuBYPl2HcFVA+DDRy 2QJHDge+kNGLi3WlC4Db4f00hwgawK+MvW2w1QGvzYdKSyBrwKlYAjeDoYrx0n3j8U3U zOehfjxPvFtASQOTXTogDFNebHnEu8i9xIcnhdQX9Wg/yDyhlaurSAXAJElfmF1MJ+Wq VbLprixdtsKOAXciJSvPeEhYV0rT7ezaIVLO5hUsKNms6sjzB1wRqv6w3JpYdoUZI7Pj 1xjA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=GHw81SUoWZQtx/ZGnP1I26/JOpUHtU+v4dLlsKEueyg=; b=pOZPVz+fPbKfhxO2FF0oI9UaVlprTa1r2ZpEfmep2OwsCGO90IRorLJfRvUXTg3Dbi UnkLI/J+g0om5fIebYDiFTkliuBCnNyfxwUrOEi7dcgOHx2/j+s6gw8B37Qp5Efj7PR9 x78AG3CD38YFvYgBrHEo+a4cG5/1Rb46tpmr+jt0H7/RDcPItm9LcfZsTAVqSMh2ljvT CnTthnLzYFtBiwfVHIr0X8GhcpqXYOOofTVWwrEjn1D/Ctpt32QjZ9ZCnCJ88HTHCK41 Bhk+2ABidW6mL4+kVwyYPCZiQxAhczGo96/MUM0LQqGrtDIWFUmNBY2kY9dGd6akxPvl WmNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hcHit28t; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a17090acb0c00b00218c30f7e1esi6372016pjt.127.2022.12.11.02.40.08; Sun, 11 Dec 2022 02:40:21 -0800 (PST) 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=@intel.com header.s=Intel header.b=hcHit28t; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbiLKKjh (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Sun, 11 Dec 2022 05:39:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiLKKjf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 11 Dec 2022 05:39:35 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E815E2DE9; Sun, 11 Dec 2022 02:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670755174; x=1702291174; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=E5Y+TsxdMupDg9ElYz3t/Ii0i1MvGNzoq73DRBTVz4Q=; b=hcHit28tevH6QeYsK+RT7bTcsq7/nCHVyaTzV7wRyOzStnbGli5T5yZj vaFzfr+FO7+y4dkyFVC8NYqMnxTfFJuWuQ7KBGVHXDT6SWRiFd3jyeST3 fKDWZzKV3BVHvFgfzcnnuhqAMMaNZ7do528MeoTpb1esu9ugDHhAtomyO s0WJAAiC1hIWZtSsN9L9wfjNCaZoo6/p+lkukV53OIhkUkLjY6WimEWyX K0UCXxzmSSzlmr3kVClA0cRttGg5DTU6+5IGQuBkLhDRz14/mXT3SIZEP 2NQyXLgQHWfff+1ZlkU7Qqreu+B1P1iwc252tpM55k3tS4XiSYJfR5Q6T g==; X-IronPort-AV: E=McAfee;i="6500,9779,10557"; a="379899589" X-IronPort-AV: E=Sophos;i="5.96,236,1665471600"; d="scan'208";a="379899589" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2022 02:39:34 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10557"; a="754575414" X-IronPort-AV: E=Sophos;i="5.96,236,1665471600"; d="scan'208";a="754575414" Received: from dratzker-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.251.214.1]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2022 02:39:29 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> To: linux-fpga@vger.kernel.org, Xu Yilun <yilun.xu@intel.com>, Wu Hao <hao.wu@intel.com>, Tom Rix <trix@redhat.com>, Moritz Fischer <mdf@kernel.org>, Lee Jones <lee@kernel.org>, Matthew Gerlach <matthew.gerlach@linux.intel.com>, Russ Weight <russell.h.weight@intel.com>, Tianfei zhang <tianfei.zhang@intel.com>, Mark Brown <broonie@kernel.org>, Greg KH <gregkh@linuxfoundation.org>, Marco Pagani <marpagan@redhat.com> Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> Subject: [PATCH v4 0/8] intel-m10-bmc: Split BMC to core and SPI parts & add PMCI+N6000 support Date: Sun, 11 Dec 2022 12:39:05 +0200 Message-Id: <20221211103913.5287-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751913827603730360?= X-GMAIL-MSGID: =?utf-8?q?1751913827603730360?= |
Series |
intel-m10-bmc: Split BMC to core and SPI parts & add PMCI+N6000 support
|
|
Message
Ilpo Järvinen
Dec. 11, 2022, 10:39 a.m. UTC
Hi all, Here are the patches for MAX 10 BMC core/SPI interface split and addition of the PMCI interface. There are a few supporting rearrangement patches prior to the actual split. In this version, the indirect register access became part of the BMC PMCI module. The current downside of the split is that there's not that much code remaining in the core part when all the type specific definitions are moved to the file with the relevant interface. The patch set is based on top of the "fpga: m10bmc-sec: Fix probe rollback" and commit dfd10332596e ("fpga: m10bmc-sec: Fix kconfig dependencies") to avoid triggering conflicts. v4: - Use board type for naming defines & structs - Set .reg_read/write and call devm_regmap_init() directly - Rename indirect_bus_*() funcs to indirect_*() - Move indirect code into intel-m10-bmc-pmci so funcs can be static - Drop module licence GPL v2 - GPL change v3: - Move regmap indirect into BMC PMCI module - Get rid of "generalization" of cmd offsets and values, back to v1 #defines - Tweak Kconfig & Makefile - Rename intel-m10-bmc-pmci to intel-m10-bmc-pmci-main - Rework sec update read/write paths - Sec update driver code effectively uses the SPI side code from v2 - Rename m10bmc_sec_write() to m10bmc_sec_fw_write() - Rename flash_ops to flash_bulk_ops and make them optional - Move flash MUX and flash_mutex handling into sec update driver - Prevent simultaneous flash bulk write & read using flash_mutex - Keep M10BMC_STAGING_BASE in header (now used in the sec update code) - Rebased on top of leak fix "fpga: m10bmc-sec: Fix probe rollback" v2: - Drop type from mfd side, the platform info takes care of differentation - Explain introducing ->info to struct m10bmc in commit message (belongs logically there) - Intro PMCI better - Improve naming - Rename M10BMC_PMCI_FLASH_CTRL to M10BMC_PMCI_FLASH_MUX_CTRL - Use m10bmc_pmci/M10BMC_PMCI prefix consistently - Use M10BMC_SPI prefix for SPI related defines - Newly added stuff gets m10bmc_spi prefix - Removed dev from struct m10bmc_pmci_device - Rename "n_offset" variable to "offset" in PMCI flash ops - Always issue idle command in regmap indirect to clear RD/WR/ACK bits - Handle stride misaligned sizes in flash read/write ops Ilpo Järvinen (8): mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific info mfd: intel-m10-bmc: Rename the local variables mfd: intel-m10-bmc: Split into core and spi specific parts mfd: intel-m10-bmc: Support multiple CSR register layouts fpga: intel-m10-bmc: Rework flash read/write mfd: intel-m10-bmc: Downscope SPI defines & prefix with M10BMC_N3000 mfd: intel-m10-bmc: Add PMCI driver fpga: m10bmc-sec: Add support for N6000 .../ABI/testing/sysfs-driver-intel-m10-bmc | 8 +- MAINTAINERS | 2 +- drivers/fpga/Kconfig | 2 +- drivers/fpga/intel-m10-bmc-sec-update.c | 273 ++++++++---- drivers/hwmon/Kconfig | 2 +- drivers/mfd/Kconfig | 32 +- drivers/mfd/Makefile | 5 +- drivers/mfd/intel-m10-bmc-core.c | 133 ++++++ drivers/mfd/intel-m10-bmc-pmci.c | 397 ++++++++++++++++++ drivers/mfd/intel-m10-bmc-spi.c | 205 +++++++++ drivers/mfd/intel-m10-bmc.c | 238 ----------- include/linux/mfd/intel-m10-bmc.h | 108 +++-- 12 files changed, 1021 insertions(+), 384 deletions(-) create mode 100644 drivers/mfd/intel-m10-bmc-core.c create mode 100644 drivers/mfd/intel-m10-bmc-pmci.c create mode 100644 drivers/mfd/intel-m10-bmc-spi.c delete mode 100644 drivers/mfd/intel-m10-bmc.c