Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp97643pxa; Tue, 4 Aug 2020 00:09:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy23OAY+rqS7DZUgvbybs78gOrQh7l6tLCQp/NVUGfsyduQYy2nFtrOn4tS2dcHp9vG7FFT X-Received: by 2002:a05:6402:403:: with SMTP id q3mr13534130edv.12.1596524981431; Tue, 04 Aug 2020 00:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596524981; cv=none; d=google.com; s=arc-20160816; b=PSWe+C3EhwdcvojvraCUV9d9xiPRaMYNF3mmysSJH3J36GiXjNtuJ+bPPnOQYPweoO d7L0Gm5hgobQ48QYxvN5l4FzFVogYza35W/SaGY1UUvQT51qdWvq8WarWs4n8jjLUdHb D4JT6R3AuVlPLLDbLFzWqjlEfqbvWLiOQv2NP7bGoLDwzsvPtREug/Ypu+Ukj1nMo3Un 3sB/YUICK+kd7xuttJCnowYu1IJtP3XkCJ0mzBkINc4o7hqXi9awXwjnbVVosb0vY7hT LlUHF6lg8W9sWcvig3OfOsFKnO5UiZh9QrK4hw9nye5Ng0fU5X9Q3jpFsjYvcBMYtzWV jEQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=0y2FY3QasqUaztIsSXrQKTXrDGWG595lBtKLkoJ0ZPg=; b=hqvq65D8dv35830ky4LUwWfLapr2TTkb5KDkxjP441t1Js6cX6KaJ9owZGTEtPhwOU b08DLl1Li7KSlqxo1DoDXnxeB0SpvvvWKTDy5O0/YYm96aaP7MJypV8tHtjXDg8C6Ewv jRvKPYPOJLoJac9iKgebG5n6ycUIO1DDoY/3KaFtt+twNdXk3Jx2tgTHd8PgniUs8b24 uVSnuQI1RgDU9w9+4j6pxoK0OPBoAOb9pRB80LEXo5XRS+XPAZ5DgnITgtZaRWvb3jgk CvMh/SG9gFqKCVEAMSH8IbnDiNHNuA24j+L9KdukPyttgFK1IB+Bb06nL2CQR6zxeeJ0 Q69g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si11995307edn.499.2020.08.04.00.09.19; Tue, 04 Aug 2020 00:09:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729156AbgHDHI4 (ORCPT + 99 others); Tue, 4 Aug 2020 03:08:56 -0400 Received: from mga06.intel.com ([134.134.136.31]:60927 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726660AbgHDHI4 (ORCPT ); Tue, 4 Aug 2020 03:08:56 -0400 IronPort-SDR: wC+yJtivv4BCIUTMdcuP3FiSJn4m7EJX6JPbWVZHw5boPPfM63FsxhtDL4GL8sR3+hYw/rI2dT dU+oZwOTz90g== X-IronPort-AV: E=McAfee;i="6000,8403,9702"; a="213801914" X-IronPort-AV: E=Sophos;i="5.75,433,1589266800"; d="scan'208";a="213801914" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2020 00:08:55 -0700 IronPort-SDR: u82ETqqGpwhyFOvaVE/ERzB0Sd/W0VfaC1A0teBGGlzzqF6/aM0PnYAR0XWULFeyWfGtyoiP94 89wvgs/EbRnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,433,1589266800"; d="scan'208";a="315226081" Received: from yilunxu-optiplex-7050.sh.intel.com ([10.239.159.141]) by fmsmga004.fm.intel.com with ESMTP; 04 Aug 2020 00:08:53 -0700 From: Xu Yilun To: mdf@kernel.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: trix@redhat.com, lgoncalv@redhat.com, yilun.xu@intel.com Subject: [PATCH v3 0/4] Modularization of DFL private feature drivers Date: Tue, 4 Aug 2020 15:05:11 +0800 Message-Id: <1596524715-18038-1-git-send-email-yilun.xu@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset makes it possible to develop independent driver modules for DFL private features. It also helps to leverage existing kernel drivers to enable some IP blocks in DFL. Patch #1: An improvement of feature id definition. The feature id will be used as the key field for dfl device/driver matching. Patch #2: Release the dfl mmio regions after enumeration, so that private feature drivers could request mmio region in their own drivers. Patch #3: Introduce the dfl bus, then dfl devices could be supported by independent dfl drivers. Patch #4: An example of the dfl driver for N3000 nios private feature. Main changes from v1: - Add the new Patch #1, to improve the feature id definition. - Change the dfl bus uevent format. - Change the dfl device's sysfs name format. - refactor dfl_dev_add() - Add the Patch #4 as an example of the dfl driver. - A lot of minor fixes for comments from Hao and Tom. Main changes from v2: - Add the doc for dfl-n3000-nios driver. - Minor fixes for comments from Tom. Xu Yilun (4): fpga: dfl: change data type of feature id to u16 fpga: dfl: map feature mmio resources in their own feature drivers fpga: dfl: create a dfl bus type to support DFL devices fpga: dfl: add support for N3000 nios private feature Documentation/ABI/testing/sysfs-bus-dfl | 15 + .../ABI/testing/sysfs-bus-dfl-devices-n3000-nios | 18 + Documentation/fpga/dfl-n3000-nios.rst | 39 ++ Documentation/fpga/index.rst | 1 + drivers/fpga/Kconfig | 12 + drivers/fpga/Makefile | 2 + drivers/fpga/dfl-fme-perf.c | 2 +- drivers/fpga/dfl-n3000-nios.c | 518 +++++++++++++++++++++ drivers/fpga/dfl-pci.c | 24 +- drivers/fpga/dfl.c | 464 +++++++++++++++--- drivers/fpga/dfl.h | 101 +++- 11 files changed, 1094 insertions(+), 102 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-dfl create mode 100644 Documentation/ABI/testing/sysfs-bus-dfl-devices-n3000-nios create mode 100644 Documentation/fpga/dfl-n3000-nios.rst create mode 100644 drivers/fpga/dfl-n3000-nios.c -- 2.7.4