18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ciconfig NTB_IDT 38c2ecf20Sopenharmony_ci tristate "IDT PCIe-switch Non-Transparent Bridge support" 48c2ecf20Sopenharmony_ci depends on PCI 58c2ecf20Sopenharmony_ci select HWMON 68c2ecf20Sopenharmony_ci help 78c2ecf20Sopenharmony_ci This driver supports NTB of capable IDT PCIe-switches. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci Some of the pre-initializations must be made before IDT PCIe-switch 108c2ecf20Sopenharmony_ci exposes its NT-functions correctly. It should be done by either proper 118c2ecf20Sopenharmony_ci initialization of EEPROM connected to master SMbus of the switch or 128c2ecf20Sopenharmony_ci by BIOS using slave-SMBus interface changing corresponding registers 138c2ecf20Sopenharmony_ci value. Evidently it must be done before PCI bus enumeration is 148c2ecf20Sopenharmony_ci finished in Linux kernel. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci First of all partitions must be activated and properly assigned to all 178c2ecf20Sopenharmony_ci the ports with NT-functions intended to be activated (see SWPARTxCTL 188c2ecf20Sopenharmony_ci and SWPORTxCTL registers). Then all NT-function BARs must be enabled 198c2ecf20Sopenharmony_ci with chosen valid aperture. For memory windows related BARs the 208c2ecf20Sopenharmony_ci aperture settings shall determine the maximum size of memory windows 218c2ecf20Sopenharmony_ci accepted by a BAR. Note that BAR0 must map PCI configuration space 228c2ecf20Sopenharmony_ci registers. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci It's worth to note, that since a part of this driver relies on the 258c2ecf20Sopenharmony_ci BAR settings of peer NT-functions, the BAR setups can't be done over 268c2ecf20Sopenharmony_ci kernel PCI fixups. That's why the alternative pre-initialization 278c2ecf20Sopenharmony_ci techniques like BIOS using SMBus interface or EEPROM should be 288c2ecf20Sopenharmony_ci utilized. 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci If unsure, say N. 318c2ecf20Sopenharmony_ci 32