Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1986891iog; Thu, 16 Jun 2022 19:22:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ut4TcIw8FOmj8b1Kho4rlFtG+mqdjuXDm1GBZYof5oPOZ+NZLMDhzYZLf5HLSjeADDCb0W X-Received: by 2002:a63:6b41:0:b0:3fe:22d6:e6aa with SMTP id g62-20020a636b41000000b003fe22d6e6aamr7052850pgc.249.1655432547436; Thu, 16 Jun 2022 19:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655432547; cv=none; d=google.com; s=arc-20160816; b=pmQvSuvqZV0Dq4VzE+sB5MfM+dvhDEo9MufxepHR7sYKkbek4bjxtNLeFovEtoza0g DqJzOP/ZLwRaV3VO4fh5OQsM1PvgDi4SiNPW+/ePnhcYQ247ApyVL9592pD05kinafmF yM1kaC41UI1HbJBp8VN83Bi3dPUUKQDzipt5rmjbyTH5ZtTbi4HgQLanmJiW7cSySZ9p +kMAqH91bl4k86sZmI9OaiA8z3JjLLzNJb7f1L5nTSTxYlZ/QRiMBXT7hAMMmp6BIdK/ wnUZhhRC2XF9g1J9VX7/dXu0wDUeBupfKQVPDnDf8TZi8Q2gfYToRHV07HQrkqHnZ7OO U/GQ== 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=am3idtKoznzBaW1v8e4uKol9aKfU5quOEKcLLnMAyPA=; b=j7frbZyZ0WpFKFsRPt46kBPEOOVDX7Ub3fJfte+Bc8YmhVOvGMpnijQgJkmR4sW3YO dwyn3XqdlPrZ/rfK133c3hPA0wN//cLwgqQUvF4HRy3thVxT3w7bMUzgcqlTuq0ys8jY IkpCEYbBPleLcmLIc8lrUHDjlxQwDArIlJrSvJYkY5Ry3jC2Jx1PdmUndDpHcADJGzI5 4vGdaFJb5r6lL4Eqvt2QBeHW5bpRerU109CeqdN9Bi5753NPyt5Pan7or7yNGubp4ZaH zfAhEG0ZnPpkpugqC9ttB8jgjiloA2YGIZp7rfq3I0Jm2zO5GBvbu+vkU064PeD9uwWu GidA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=m6Ku36IZ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pc7-20020a17090b3b8700b001dff303247dsi13476202pjb.1.2022.06.16.19.22.11; Thu, 16 Jun 2022 19:22:27 -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=@intel.com header.s=Intel header.b=m6Ku36IZ; 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 S1379603AbiFQCHq (ORCPT + 99 others); Thu, 16 Jun 2022 22:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379573AbiFQCHo (ORCPT ); Thu, 16 Jun 2022 22:07:44 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 212A61F61F; Thu, 16 Jun 2022 19:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655431663; x=1686967663; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ApzyEuuaqntfaLHpghKAi3bl7usIGTVwvAQnSAu3KBs=; b=m6Ku36IZzVK9vnOWv+wj7HzAC0SKCDDl9InscPmAlFZ+89TjPuxnHFoE SCVOd7xaVUeg0OQGA89rjcwGTUFZpFnBf5bmCuMWq5QuwRsJ6ymseoSMj 1AEp8Ljo906wlRPhV1GM6Z06fNVsN/MRSLsnN/k2vbQ883frZqc4jThO8 ZDDDirHGnKSs6YVe4PvqbcDBwxQGKHcWBWv4p6tapy4t2x2H3uxs1mbHe +PXr3l6CDt0CbTvCOBPDlVaTFL1ajG1ZGkDWS+4wnmHHEJmp8fmQpo0nP Xtq+anJy3hNFzdwHq8asIyWFBzozWJzy5Xkfxf4LEBjb9OihwVjWL0b8m w==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="365750316" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="365750316" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 19:07:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="831831701" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.238.175.107]) by fmsmga006.fm.intel.com with ESMTP; 16 Jun 2022 19:07:39 -0700 From: Tianfei Zhang To: yilun.xu@intel.com, lee.jones@linaro.org Cc: hao.wu@intel.com, trix@redhat.com, linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org, russell.h.weight@intel.com, matthew.gerlach@linux.intel.com, Tianfei Zhang Subject: [PATCH v2 0/4] add PMCI driver support Date: Thu, 16 Jun 2022 22:04:01 -0400 Message-Id: <20220617020405.128352-1-tianfei.zhang@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 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_NONE,T_SCC_BODY_TEXT_LINE 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 PMCI(Platform Management Control Interface) is a software-visible interface, connected to card BMC which provided telemetry and mailbox functionalities for Intel PAC FPGA card. Currently, intel-m10-bmc driver support Intel MAX10 BMC functions via SPI interface. To support multiple bus interfaces, splits the common code from intel-m10-bmc driver into intel-m10-bmc-core. On the other hand, it leverages the regmap APIs to support Intel specific Indirect Register Interface for register read/write on PMCI driver. This patchset adding a driver for the PMCI-base interface of Intel MAX10 BMC controller. patch 1: use ddata for local variables which directly interacts with dev_get_drvdata()/dev_set_drvdata(). patch 2: split the common code from intel-m10-bmc driver into intel-m10-bmc-core. patch 3: add a driver for PMCI. patch 4: introduce a new data structure m10bmc_csr for the different register definition of MAX10 CSRs. v2: - use regmap APIs to support Intel specific Indirect Register Interface on PMCI driver. - fix compile warning reported by lkp. - rebased on 5.19-rc2 Tianfei Zhang (4): mfd: intel-m10-bmc: rename the local variables mfd: intel-m10-bmc: split into core and spi mfd: intel-m10-bmc: add PMCI driver mfd: intel-m10-bmc: support multiple register layouts .../ABI/testing/sysfs-driver-intel-m10-bmc | 8 +- drivers/mfd/Kconfig | 34 +++- drivers/mfd/Makefile | 6 +- .../{intel-m10-bmc.c => intel-m10-bmc-core.c} | 148 ++++++-------- drivers/mfd/intel-m10-bmc-pmci.c | 190 ++++++++++++++++++ drivers/mfd/intel-m10-bmc-spi.c | 83 ++++++++ include/linux/mfd/intel-m10-bmc.h | 43 +++- 7 files changed, 413 insertions(+), 99 deletions(-) rename drivers/mfd/{intel-m10-bmc.c => intel-m10-bmc-core.c} (56%) create mode 100644 drivers/mfd/intel-m10-bmc-pmci.c create mode 100644 drivers/mfd/intel-m10-bmc-spi.c -- 2.26.2