162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ciconfig NTB_IDT
362306a36Sopenharmony_ci	tristate "IDT PCIe-switch Non-Transparent Bridge support"
462306a36Sopenharmony_ci	depends on PCI
562306a36Sopenharmony_ci	select HWMON
662306a36Sopenharmony_ci	help
762306a36Sopenharmony_ci	 This driver supports NTB of capable IDT PCIe-switches.
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci	 Some of the pre-initializations must be made before IDT PCIe-switch
1062306a36Sopenharmony_ci	 exposes its NT-functions correctly. It should be done by either proper
1162306a36Sopenharmony_ci	 initialization of EEPROM connected to master SMbus of the switch or
1262306a36Sopenharmony_ci	 by BIOS using slave-SMBus interface changing corresponding registers
1362306a36Sopenharmony_ci	 value. Evidently it must be done before PCI bus enumeration is
1462306a36Sopenharmony_ci	 finished in Linux kernel.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci	 First of all partitions must be activated and properly assigned to all
1762306a36Sopenharmony_ci	 the ports with NT-functions intended to be activated (see SWPARTxCTL
1862306a36Sopenharmony_ci	 and SWPORTxCTL registers). Then all NT-function BARs must be enabled
1962306a36Sopenharmony_ci	 with chosen valid aperture. For memory windows related BARs the
2062306a36Sopenharmony_ci	 aperture settings shall determine the maximum size of memory windows
2162306a36Sopenharmony_ci	 accepted by a BAR. Note that BAR0 must map PCI configuration space
2262306a36Sopenharmony_ci	 registers.
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci	 It's worth to note, that since a part of this driver relies on the
2562306a36Sopenharmony_ci	 BAR settings of peer NT-functions, the BAR setups can't be done over
2662306a36Sopenharmony_ci	 kernel PCI fixups. That's why the alternative pre-initialization
2762306a36Sopenharmony_ci	 techniques like BIOS using SMBus interface or EEPROM should be
2862306a36Sopenharmony_ci	 utilized.
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci	 If unsure, say N.
3162306a36Sopenharmony_ci
32