^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) config NTB_IDT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) tristate "IDT PCIe-switch Non-Transparent Bridge support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) depends on PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) select HWMON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) This driver supports NTB of capable IDT PCIe-switches.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) Some of the pre-initializations must be made before IDT PCIe-switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) exposes its NT-functions correctly. It should be done by either proper
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) initialization of EEPROM connected to master SMbus of the switch or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) by BIOS using slave-SMBus interface changing corresponding registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) value. Evidently it must be done before PCI bus enumeration is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) finished in Linux kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) First of all partitions must be activated and properly assigned to all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) the ports with NT-functions intended to be activated (see SWPARTxCTL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) and SWPORTxCTL registers). Then all NT-function BARs must be enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) with chosen valid aperture. For memory windows related BARs the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) aperture settings shall determine the maximum size of memory windows
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) accepted by a BAR. Note that BAR0 must map PCI configuration space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) registers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) It's worth to note, that since a part of this driver relies on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) BAR settings of peer NT-functions, the BAR setups can't be done over
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) kernel PCI fixups. That's why the alternative pre-initialization
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) techniques like BIOS using SMBus interface or EEPROM should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) utilized.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)