Linux-Doc Archive on lore.kernel.org
 help / color / Atom feed
* [RFC 0/1] fpga: dfl: RFC PCI config
@ 2020-06-30 17:16 trix
  2020-06-30 17:16 ` [RFC 1/1] " trix
  0 siblings, 1 reply; 4+ messages in thread
From: trix @ 2020-06-30 17:16 UTC (permalink / raw)
  To: hao.wu, mdf, corbet; +Cc: linux-fpga, linux-doc, linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

This configury shows where I would like the dfl pci cards to go
by introducing future cards as well as the current pac 10 card.

The goal is to fully configure the card in the drivers/fpga
area of the config.  Collecting configury of the fpga/ parts
as well as the subdevices scattered over the tree.

The user is not prevented from manually picking the equivlent.

Some documentation started to track the subdevices needed
that are not in the fpga dir as well as guiding the user to
identify the appropriate top level config.


Tom Rix (1):
  fpga: dfl: RFC PCI config

 Documentation/fpga/dfl.rst | 33 +++++++++++++++++++++++++++++++++
 drivers/fpga/Kconfig       | 28 ++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

-- 
2.18.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RFC 1/1] fpga: dfl: RFC PCI config
  2020-06-30 17:16 [RFC 0/1] fpga: dfl: RFC PCI config trix
@ 2020-06-30 17:16 ` trix
  2020-06-30 17:26   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: trix @ 2020-06-30 17:16 UTC (permalink / raw)
  To: hao.wu, mdf, corbet; +Cc: linux-fpga, linux-doc, linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

Create some top level configs the map to dfl pci cards.

Autoselect the parts of fpga that are needed to run these cards
as well as the other subsystem configs to the card's subdevices.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 Documentation/fpga/dfl.rst | 33 +++++++++++++++++++++++++++++++++
 drivers/fpga/Kconfig       | 28 ++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/Documentation/fpga/dfl.rst b/Documentation/fpga/dfl.rst
index d7648d7c7eee..3a872bc8e3d3 100644
--- a/Documentation/fpga/dfl.rst
+++ b/Documentation/fpga/dfl.rst
@@ -500,6 +500,39 @@ Developer only needs to provide a sub feature driver with matched feature id.
 FME Partial Reconfiguration Sub Feature driver (see drivers/fpga/dfl-fme-pr.c)
 could be a reference.
 
+Kernel configuration
+====================
+
+While it is possible to manually setup a configuration to match your device,
+there are some top level configurations that collect configuations for
+some reference pci cards.  Below descibes these configuration as well as
+what other kernel configs are needed for proper configuration.
+
+FPGA_DFL_PAC10
+Intel Arria 10 GX PCI card, PCI id 0X09C4
+Depends on
+  SPI_ALTERA
+  MFD_INTEL_M10_BMC
+  MFD_INTEL_M10_BMC_SECURE
+  SENSORS_INTEL_M10_BMC_HWMON
+
+FPGA_DFL_D5005
+Intel Stratix 10, D5005 PCI card, PCI id 0X0B2B
+Depends on
+  SPI_ALTERA
+  MFD_INTEL_M10_BMC
+  MFD_INTEL_M10_BMC_SECURE
+  SENSORS_INTEL_M10_BMC_HWMON
+  INTEL_S10_PHY
+
+FPGA_DFL_N3000
+Intel Network Accelerator, N3000 PCI card, PCI id 0X0B30
+Depends on
+  SPI_ALTERA
+  MFD_INTEL_M10_BMC
+  MFD_INTEL_M10_BMC_SECURE
+  SENSORS_INTEL_M10_BMC_HWMON
+  INTEL_LL_10G_MAC
 
 Open discussion
 ===============
diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
index 9d53bd9094e2..b657de20bc98 100644
--- a/drivers/fpga/Kconfig
+++ b/drivers/fpga/Kconfig
@@ -138,6 +138,34 @@ config OF_FPGA_REGION
 	  Support for loading FPGA images by applying a Device Tree
 	  overlay.
 
+config FPGA_DFL_PAC10
+	tristate "Intel Arria 10 GX PCI card"
+	select SPI_ALTERA
+	select MFD_INTEL_M10_BMC
+	select MFD_INTEL_M10_BMC_SECURE
+	select SENSORS_INTEL_M10_BMC_HWMON
+	select FPGA_DFL
+	select FPGA_DFL_FME
+	select FPGA_DFL_FME_MGR
+	select FPGA_DFL_FME_BRIDGE
+	select FPGA_DFL_FME_REGION
+	select FPGA_DFL_AFU
+	select FPGA_DFL_SPI_ALTERA
+	select FPGA_DFL_PCI
+	select IFPGA_SEC_MGR
+
+config FPGA_DFL_D5005
+	tristate "Intel Stratix 10, D5005 PCI card"
+	select FPGA_DFL_PAC10
+	select INTEL_S10_PHY
+	select FPGA_DFl_HSSI
+
+config FPGA_DFL_N3000
+	tristate "Intel Network Accelerator, N3000 PCI card"
+	select FPGA_DFL_PAC10
+	select INTEL_LL_10G_MAC
+	select FPGA_DFL_N3000_NIOS
+
 config FPGA_DFL
 	tristate "FPGA Device Feature List (DFL) support"
 	select FPGA_BRIDGE
-- 
2.18.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 1/1] fpga: dfl: RFC PCI config
  2020-06-30 17:16 ` [RFC 1/1] " trix
@ 2020-06-30 17:26   ` Randy Dunlap
  2020-06-30 18:44     ` Tom Rix
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2020-06-30 17:26 UTC (permalink / raw)
  To: trix, hao.wu, mdf, corbet; +Cc: linux-fpga, linux-doc, linux-kernel

On 6/30/20 10:16 AM, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
> 
> Create some top level configs the map to dfl pci cards.
> 
> Autoselect the parts of fpga that are needed to run these cards
> as well as the other subsystem configs to the card's subdevices.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  Documentation/fpga/dfl.rst | 33 +++++++++++++++++++++++++++++++++
>  drivers/fpga/Kconfig       | 28 ++++++++++++++++++++++++++++
>  2 files changed, 61 insertions(+)
> 
> diff --git a/Documentation/fpga/dfl.rst b/Documentation/fpga/dfl.rst
> index d7648d7c7eee..3a872bc8e3d3 100644
> --- a/Documentation/fpga/dfl.rst
> +++ b/Documentation/fpga/dfl.rst
> @@ -500,6 +500,39 @@ Developer only needs to provide a sub feature driver with matched feature id.
>  FME Partial Reconfiguration Sub Feature driver (see drivers/fpga/dfl-fme-pr.c)
>  could be a reference.
>  
> +Kernel configuration
> +====================
> +
> +While it is possible to manually setup a configuration to match your device,
> +there are some top level configurations that collect configuations for

                                                        configurations

> +some reference pci cards.  Below descibes these configuration as well as

                  PCI               describes

> +what other kernel configs are needed for proper configuration.
> +
> +FPGA_DFL_PAC10
> +Intel Arria 10 GX PCI card, PCI id 0X09C4
> +Depends on
> +  SPI_ALTERA
> +  MFD_INTEL_M10_BMC
> +  MFD_INTEL_M10_BMC_SECURE
> +  SENSORS_INTEL_M10_BMC_HWMON
> +
> +FPGA_DFL_D5005
> +Intel Stratix 10, D5005 PCI card, PCI id 0X0B2B
> +Depends on
> +  SPI_ALTERA
> +  MFD_INTEL_M10_BMC
> +  MFD_INTEL_M10_BMC_SECURE
> +  SENSORS_INTEL_M10_BMC_HWMON
> +  INTEL_S10_PHY
> +
> +FPGA_DFL_N3000
> +Intel Network Accelerator, N3000 PCI card, PCI id 0X0B30
> +Depends on
> +  SPI_ALTERA
> +  MFD_INTEL_M10_BMC
> +  MFD_INTEL_M10_BMC_SECURE
> +  SENSORS_INTEL_M10_BMC_HWMON
> +  INTEL_LL_10G_MAC
>  
>  Open discussion
>  ===============
> diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
> index 9d53bd9094e2..b657de20bc98 100644
> --- a/drivers/fpga/Kconfig
> +++ b/drivers/fpga/Kconfig
> @@ -138,6 +138,34 @@ config OF_FPGA_REGION
>  	  Support for loading FPGA images by applying a Device Tree
>  	  overlay.
>  
> +config FPGA_DFL_PAC10
> +	tristate "Intel Arria 10 GX PCI card"
> +	select SPI_ALTERA

above kconfig symbol:
	depends on SPI_MASTER

> +	select MFD_INTEL_M10_BMC
> +	select MFD_INTEL_M10_BMC_SECURE
> +	select SENSORS_INTEL_M10_BMC_HWMON

I haven't tested this, but in general it's not safe to select something like
SENSORS* or HWMON* unless you first check that CONFIG_HWMON is enabled.
Otherwise this would usually cause kconfig warning(s).

But don't add things like
	select HWMON
	select SPI
	select SPI_MASTER

because we don't enable subsystems (like HWMON or SPI) just inside one
driver's kconfig entry.
The driver(s) should instead depend on HWMON, SPI, SPI_MASTER etc.

> +	select FPGA_DFL
> +	select FPGA_DFL_FME
> +	select FPGA_DFL_FME_MGR
> +	select FPGA_DFL_FME_BRIDGE
> +	select FPGA_DFL_FME_REGION
> +	select FPGA_DFL_AFU
> +	select FPGA_DFL_SPI_ALTERA
> +	select FPGA_DFL_PCI
> +	select IFPGA_SEC_MGR
> +
> +config FPGA_DFL_D5005
> +	tristate "Intel Stratix 10, D5005 PCI card"
> +	select FPGA_DFL_PAC10
> +	select INTEL_S10_PHY
> +	select FPGA_DFl_HSSI
> +
> +config FPGA_DFL_N3000
> +	tristate "Intel Network Accelerator, N3000 PCI card"
> +	select FPGA_DFL_PAC10
> +	select INTEL_LL_10G_MAC
> +	select FPGA_DFL_N3000_NIOS
> +
>  config FPGA_DFL
>  	tristate "FPGA Device Feature List (DFL) support"
>  	select FPGA_BRIDGE
> 


-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 1/1] fpga: dfl: RFC PCI config
  2020-06-30 17:26   ` Randy Dunlap
@ 2020-06-30 18:44     ` Tom Rix
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rix @ 2020-06-30 18:44 UTC (permalink / raw)
  To: Randy Dunlap, hao.wu, mdf, corbet; +Cc: linux-fpga, linux-doc, linux-kernel

> I haven't tested this, but in general it's not safe to select something like
> SENSORS* or HWMON* unless you first check that CONFIG_HWMON is enabled.
> Otherwise this would usually cause kconfig warning(s).
>
> But don't add things like
> 	select HWMON
> 	select SPI
> 	select SPI_MASTER
>
> because we don't enable subsystems (like HWMON or SPI) just inside one
> driver's kconfig entry.
> The driver(s) should instead depend on HWMON, SPI, SPI_MASTER etc.

Yes, I thought this was ugly. The next rev addresses this issue.  The config will not be fully automagic.  User will have enough information in the doc to figure out the other subsystems.  

Tom


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 17:16 [RFC 0/1] fpga: dfl: RFC PCI config trix
2020-06-30 17:16 ` [RFC 1/1] " trix
2020-06-30 17:26   ` Randy Dunlap
2020-06-30 18:44     ` Tom Rix

Linux-Doc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-doc/0 linux-doc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-doc linux-doc/ https://lore.kernel.org/linux-doc \
		linux-doc@vger.kernel.org
	public-inbox-index linux-doc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-doc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git