From patchwork Fri Aug 26 15:01:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Colberg, Peter" X-Patchwork-Id: 12956168 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 A962CECAAA3 for ; Fri, 26 Aug 2022 15:04:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243725AbiHZPCo (ORCPT ); Fri, 26 Aug 2022 11:02:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243730AbiHZPCj (ORCPT ); Fri, 26 Aug 2022 11:02:39 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A979DA3C2; Fri, 26 Aug 2022 08:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661526151; x=1693062151; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jtAdrPErhjfMtG2XjUFseiD+T/7y59+TgXca0rfF0MY=; b=eD74UNEyHVhjsExa6U1fkIKdqvfvRCF9w+/+2Ito+IuDmumfju9npBeM 1iKJNH5jpuJby5VErSaC1qVDv/LskEvwjHy0K/xhTtS2IBBquHEGRlVg7 6c7C458GknayzbJyXFZhwDEmUtjNIgGTVQmM5AX+UmXwDUfQogDHtGcuf GC+l8mrT58i7Jm4LLtoRpkIdjvMdY8u3msqGhkYFKQWgLgTDNgRnb6HJ4 pGeYzf+WIB8FvhmA2BhERwN1+bOuv0QyhcF/Y6yC06bWyZgNnIw43mmq4 9pqF6DTIl6/0CdzCfjqHIyCrNH/YguysPjTk6KNTdyxEWxsUnBJbPn8rn g==; X-IronPort-AV: E=McAfee;i="6500,9779,10451"; a="295796602" X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="295796602" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 08:02:30 -0700 X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="671493154" Received: from scc823097.zsc7.intel.com ([10.148.153.229]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 08:02:30 -0700 From: Peter Colberg To: Wu Hao , Tom Rix , Greg Kroah-Hartman , linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: matthew.gerlach@linux.intel.com, basheer.ahmed.muddebihal@intel.com, tianfei.zhang@intel.com, marpagan@redhat.com, lgoncalv@redhat.com, Peter Colberg , Russ Weight Subject: [PATCH v2] uio: dfl: add IOPLL user-clock feature id Date: Fri, 26 Aug 2022 11:01:16 -0400 Message-Id: <20220826150116.16014-1-peter.colberg@intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20220817213746.4986-1-peter.colberg@intel.com> References: <20220817213746.4986-1-peter.colberg@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fpga@vger.kernel.org Add a Device Feature List (DFL) feature id [1] for the configurable IOPLL user clock source, which can be used to configure the clock speeds that are used for RTL logic that is programmed into the Partial Reconfiguration (PR) region of an FPGA. The IOPLL user-space driver [2] contains frequency tables [3] with the specific user clock frequencies for an implementation. For each desired frequency, the table values are produced by calling the quartus tool, the same tool that generates the IOPLL RTL logic. The quartus tool allows the RTL designer to select different options which can affect the table values. The table-driven, user-space driver allows for supporting future, modified implementations and provides users the ability to modify the IOPLL implementation. [1] https://github.com/OPAE/dfl-feature-id [2] https://github.com/OPAE/opae-sdk/blob/a494f54a9f0356d0425edbff228f0254a4c70303/libraries/plugins/xfpga/usrclk/fpga_user_clk.c [3] https://github.com/OPAE/opae-sdk/blob/a494f54a9f0356d0425edbff228f0254a4c70303/libraries/plugins/xfpga/usrclk/fpga_user_clk_freq.h Signed-off-by: Peter Colberg Signed-off-by: Russ Weight Acked-by: Xu Yilun --- drivers/uio/uio_dfl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/uio/uio_dfl.c b/drivers/uio/uio_dfl.c index 8f39cc8bb034..69e93f3e7faf 100644 --- a/drivers/uio/uio_dfl.c +++ b/drivers/uio/uio_dfl.c @@ -46,10 +46,12 @@ static int uio_dfl_probe(struct dfl_device *ddev) #define FME_FEATURE_ID_ETH_GROUP 0x10 #define FME_FEATURE_ID_HSSI_SUBSYS 0x15 +#define PORT_FEATURE_ID_IOPLL_USRCLK 0x14 static const struct dfl_device_id uio_dfl_ids[] = { { FME_ID, FME_FEATURE_ID_ETH_GROUP }, { FME_ID, FME_FEATURE_ID_HSSI_SUBSYS }, + { PORT_ID, PORT_FEATURE_ID_IOPLL_USRCLK }, { } }; MODULE_DEVICE_TABLE(dfl, uio_dfl_ids);