Advertisement
Guest User

Untitled

a guest
Jul 5th, 2021
3,669
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 119.11 KB | None | 0 0
  1. commit 40177b35f11907e56a7783f744dcce91300f02d5
  2. Author: Arnd Bergmann <arnd@arndb.de>
  3. Date: Mon Jul 5 11:43:16 2021 +0200
  4.  
  5. CONFIG_HAS_IOPORT
  6.  
  7. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  8.  
  9. diff --git a/drivers/accessibility/speakup/Kconfig b/drivers/accessibility/speakup/Kconfig
  10. index 07ecbbde0384..e84fb617acc4 100644
  11. --- a/drivers/accessibility/speakup/Kconfig
  12. +++ b/drivers/accessibility/speakup/Kconfig
  13. @@ -46,6 +46,7 @@ if SPEAKUP
  14. config SPEAKUP_SERIALIO
  15. def_bool y
  16. depends on ISA || COMPILE_TEST
  17. + depends on HAS_IOPORT
  18.  
  19. config SPEAKUP_SYNTH_ACNTSA
  20. tristate "Accent SA synthesizer support"
  21. diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
  22. index eedec61e3476..78f61ca7c2a9 100644
  23. --- a/drivers/acpi/Kconfig
  24. +++ b/drivers/acpi/Kconfig
  25. @@ -9,6 +9,7 @@ config ARCH_SUPPORTS_ACPI
  26. menuconfig ACPI
  27. bool "ACPI (Advanced Configuration and Power Interface) Support"
  28. depends on ARCH_SUPPORTS_ACPI
  29. + depends on HAS_IOPORT
  30. select PNP
  31. select NLS
  32. default y if X86
  33. diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
  34. index d17c83319e70..169610597ae4 100644
  35. --- a/drivers/ata/Kconfig
  36. +++ b/drivers/ata/Kconfig
  37. @@ -556,7 +556,7 @@ comment "PATA SFF controllers with BMDMA"
  38.  
  39. config PATA_ALI
  40. tristate "ALi PATA support"
  41. - depends on PCI
  42. + depends on LEGACY_PCI
  43. select PATA_TIMINGS
  44. help
  45. This option enables support for the ALi ATA interfaces
  46. @@ -566,7 +566,7 @@ config PATA_ALI
  47.  
  48. config PATA_AMD
  49. tristate "AMD/NVidia PATA support"
  50. - depends on PCI
  51. + depends on LEGACY_PCI
  52. select PATA_TIMINGS
  53. help
  54. This option enables support for the AMD and NVidia PATA
  55. @@ -584,7 +584,7 @@ config PATA_ARASAN_CF
  56.  
  57. config PATA_ARTOP
  58. tristate "ARTOP 6210/6260 PATA support"
  59. - depends on PCI
  60. + depends on LEGACY_PCI
  61. help
  62. This option enables support for ARTOP PATA controllers.
  63.  
  64. @@ -621,7 +621,7 @@ config PATA_BK3710
  65.  
  66. config PATA_CMD64X
  67. tristate "CMD64x PATA support"
  68. - depends on PCI
  69. + depends on LEGACY_PCI
  70. select PATA_TIMINGS
  71. help
  72. This option enables support for the CMD64x series chips
  73. @@ -667,7 +667,7 @@ config PATA_CS5536
  74.  
  75. config PATA_CYPRESS
  76. tristate "Cypress CY82C693 PATA support (Very Experimental)"
  77. - depends on PCI
  78. + depends on LEGACY_PCI
  79. select PATA_TIMINGS
  80. help
  81. This option enables support for the Cypress/Contaq CY82C693
  82. @@ -707,7 +707,7 @@ config PATA_FTIDE010
  83.  
  84. config PATA_HPT366
  85. tristate "HPT 366/368 PATA support"
  86. - depends on PCI
  87. + depends on LEGACY_PCI
  88. help
  89. This option enables support for the HPT 366 and 368
  90. PATA controllers via the new ATA layer.
  91. @@ -716,7 +716,7 @@ config PATA_HPT366
  92.  
  93. config PATA_HPT37X
  94. tristate "HPT 370/370A/371/372/374/302 PATA support"
  95. - depends on PCI
  96. + depends on LEGACY_PCI
  97. help
  98. This option enables support for the majority of the later HPT
  99. PATA controllers via the new ATA layer.
  100. @@ -725,7 +725,7 @@ config PATA_HPT37X
  101.  
  102. config PATA_HPT3X2N
  103. tristate "HPT 371N/372N/302N PATA support"
  104. - depends on PCI
  105. + depends on LEGACY_PCI
  106. help
  107. This option enables support for the N variant HPT PATA
  108. controllers via the new ATA layer.
  109. @@ -828,7 +828,7 @@ config PATA_MPC52xx
  110.  
  111. config PATA_NETCELL
  112. tristate "NETCELL Revolution RAID support"
  113. - depends on PCI
  114. + depends on LEGACY_PCI
  115. help
  116. This option enables support for the Netcell Revolution RAID
  117. PATA controller.
  118. @@ -864,7 +864,7 @@ config PATA_OLDPIIX
  119.  
  120. config PATA_OPTIDMA
  121. tristate "OPTI FireStar PATA support (Very Experimental)"
  122. - depends on PCI
  123. + depends on LEGACY_PCI
  124. help
  125. This option enables DMA/PIO support for the later OPTi
  126. controllers found on some old motherboards and in some
  127. @@ -874,7 +874,7 @@ config PATA_OPTIDMA
  128.  
  129. config PATA_PDC2027X
  130. tristate "Promise PATA 2027x support"
  131. - depends on PCI
  132. + depends on LEGACY_PCI
  133. help
  134. This option enables support for Promise PATA pdc20268 to pdc20277 host adapters.
  135.  
  136. @@ -882,7 +882,7 @@ config PATA_PDC2027X
  137.  
  138. config PATA_PDC_OLD
  139. tristate "Older Promise PATA controller support"
  140. - depends on PCI
  141. + depends on LEGACY_PCI
  142. help
  143. This option enables support for the Promise 20246, 20262, 20263,
  144. 20265 and 20267 adapters.
  145. @@ -910,7 +910,7 @@ config PATA_RDC
  146.  
  147. config PATA_SC1200
  148. tristate "SC1200 PATA support"
  149. - depends on PCI && (X86_32 || COMPILE_TEST)
  150. + depends on LEGACY_PCI && (X86_32 || COMPILE_TEST)
  151. help
  152. This option enables support for the NatSemi/AMD SC1200 SoC
  153. companion chip used with the Geode processor family.
  154. @@ -928,7 +928,7 @@ config PATA_SCH
  155.  
  156. config PATA_SERVERWORKS
  157. tristate "SERVERWORKS OSB4/CSB5/CSB6/HT1000 PATA support"
  158. - depends on PCI
  159. + depends on LEGACY_PCI
  160. help
  161. This option enables support for the Serverworks OSB4/CSB5/CSB6 and
  162. HT1000 PATA controllers, via the new ATA layer.
  163. @@ -1005,7 +1005,7 @@ comment "PIO-only SFF controllers"
  164.  
  165. config PATA_CMD640_PCI
  166. tristate "CMD640 PCI PATA support (Experimental)"
  167. - depends on PCI
  168. + depends on LEGACY_PCI
  169. select PATA_TIMINGS
  170. help
  171. This option enables support for the CMD640 PCI IDE
  172. @@ -1086,7 +1086,7 @@ config PATA_NS87410
  173.  
  174. config PATA_OPTI
  175. tristate "OPTI621/6215 PATA support (Very Experimental)"
  176. - depends on PCI
  177. + depends on LEGACY_PCI
  178. help
  179. This option enables full PIO support for the early Opti ATA
  180. controllers found on some old motherboards.
  181. @@ -1197,7 +1197,7 @@ config ATA_GENERIC
  182.  
  183. config PATA_LEGACY
  184. tristate "Legacy ISA PATA support (Experimental)"
  185. - depends on (ISA || PCI)
  186. + depends on (ISA || LEGACY_PCI)
  187. select PATA_TIMINGS
  188. help
  189. This option enables support for ISA/VLB/PCI bus legacy PATA
  190. diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
  191. index 20a32e4d501d..791942217e2c 100644
  192. --- a/drivers/ata/ata_generic.c
  193. +++ b/drivers/ata/ata_generic.c
  194. @@ -197,7 +197,8 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
  195. if (!(command & PCI_COMMAND_IO))
  196. return -ENODEV;
  197.  
  198. - if (dev->vendor == PCI_VENDOR_ID_AL)
  199. + if (IS_ENABLED(CONFIG_LEGACY_PCI) &&
  200. + dev->vendor == PCI_VENDOR_ID_AL)
  201. ata_pci_bmdma_clear_simplex(dev);
  202.  
  203. if (dev->vendor == PCI_VENDOR_ID_ATI) {
  204. diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
  205. index ae7189d1a568..9b0f61753505 100644
  206. --- a/drivers/ata/libata-sff.c
  207. +++ b/drivers/ata/libata-sff.c
  208. @@ -3088,6 +3088,7 @@ EXPORT_SYMBOL_GPL(ata_bmdma_port_start32);
  209.  
  210. #ifdef CONFIG_PCI
  211.  
  212. +#ifdef CONFIG_LEGACY_PCI
  213. /**
  214. * ata_pci_bmdma_clear_simplex - attempt to kick device out of simplex
  215. * @pdev: PCI device
  216. @@ -3113,6 +3114,7 @@ int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev)
  217. return 0;
  218. }
  219. EXPORT_SYMBOL_GPL(ata_pci_bmdma_clear_simplex);
  220. +#endif
  221.  
  222. static void ata_bmdma_nodma(struct ata_host *host, const char *reason)
  223. {
  224. diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
  225. index e7f7eee6ee9a..c7e859b5f35f 100644
  226. --- a/drivers/bus/Kconfig
  227. +++ b/drivers/bus/Kconfig
  228. @@ -81,7 +81,7 @@ config MOXTET
  229. config HISILICON_LPC
  230. bool "Support for ISA I/O space on HiSilicon Hip06/7"
  231. depends on (ARM64 && ARCH_HISI) || (COMPILE_TEST && !ALPHA && !HEXAGON && !PARISC)
  232. - depends on HAS_IOMEM
  233. + depends on HAS_IOPORT
  234. select INDIRECT_PIO if ARM64
  235. help
  236. Driver to enable I/O access to devices attached to the Low Pin
  237. diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
  238. index b151e0fcdeb5..fa53a0f24c06 100644
  239. --- a/drivers/char/Kconfig
  240. +++ b/drivers/char/Kconfig
  241. @@ -33,6 +33,7 @@ config TTY_PRINTK_LEVEL
  242. config PRINTER
  243. tristate "Parallel printer support"
  244. depends on PARPORT
  245. + depends on HAS_IOPORT
  246. help
  247. If you intend to attach a printer to the parallel port of your Linux
  248. box (as opposed to using a serial printer; if the connector at the
  249. @@ -380,7 +381,7 @@ config MAX_RAW_DEVS
  250.  
  251. config DEVPORT
  252. bool "/dev/port character device"
  253. - depends on ISA || PCI
  254. + depends on HAS_IOPORT
  255. default y
  256. help
  257. Say Y here if you want to support the /dev/port device. The /dev/port
  258. diff --git a/drivers/char/ipmi/Makefile b/drivers/char/ipmi/Makefile
  259. index 0822adc2ec41..757a5a18e82a 100644
  260. --- a/drivers/char/ipmi/Makefile
  261. +++ b/drivers/char/ipmi/Makefile
  262. @@ -5,13 +5,10 @@
  263.  
  264. ipmi_si-y := ipmi_si_intf.o ipmi_kcs_sm.o ipmi_smic_sm.o ipmi_bt_sm.o \
  265. ipmi_si_hotmod.o ipmi_si_hardcode.o ipmi_si_platform.o \
  266. - ipmi_si_port_io.o ipmi_si_mem_io.o
  267. -ifdef CONFIG_PCI
  268. -ipmi_si-y += ipmi_si_pci.o
  269. -endif
  270. -ifdef CONFIG_PARISC
  271. -ipmi_si-y += ipmi_si_parisc.o
  272. -endif
  273. + ipmi_si_mem_io.o
  274. +ipmi_si-$(CONFIG_HAS_IOPORT) += ipmi_si_port_io.o
  275. +ipmi_si-$(CONFIG_PCI) += ipmi_si_pci.o
  276. +ipmi_si-$(CONFIG_PARISC) += ipmi_si_parisc.o
  277.  
  278. obj-$(CONFIG_IPMI_HANDLER) += ipmi_msghandler.o
  279. obj-$(CONFIG_IPMI_DEVICE_INTERFACE) += ipmi_devintf.o
  280. diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
  281. index 62929a3e397e..57e4fc650722 100644
  282. --- a/drivers/char/ipmi/ipmi_si_intf.c
  283. +++ b/drivers/char/ipmi/ipmi_si_intf.c
  284. @@ -1882,7 +1882,8 @@ int ipmi_si_add_smi(struct si_sm_io *io)
  285. }
  286.  
  287. if (!io->io_setup) {
  288. - if (io->addr_space == IPMI_IO_ADDR_SPACE) {
  289. + if (IS_ENABLED(CONFIG_HAS_IOPORT) &&
  290. + io->addr_space == IPMI_IO_ADDR_SPACE) {
  291. io->io_setup = ipmi_si_port_setup;
  292. } else if (io->addr_space == IPMI_MEM_ADDR_SPACE) {
  293. io->io_setup = ipmi_si_mem_setup;
  294. diff --git a/drivers/char/ipmi/ipmi_si_pci.c b/drivers/char/ipmi/ipmi_si_pci.c
  295. index 74fa2055868b..b83d55685b22 100644
  296. --- a/drivers/char/ipmi/ipmi_si_pci.c
  297. +++ b/drivers/char/ipmi/ipmi_si_pci.c
  298. @@ -97,6 +97,9 @@ static int ipmi_pci_probe(struct pci_dev *pdev,
  299. }
  300.  
  301. if (pci_resource_flags(pdev, 0) & IORESOURCE_IO) {
  302. + if (!IS_ENABLED(CONFIG_HAS_IOPORT))
  303. + return -ENXIO;
  304. +
  305. io.addr_space = IPMI_IO_ADDR_SPACE;
  306. io.io_setup = ipmi_si_port_setup;
  307. } else {
  308. diff --git a/drivers/char/mem.c b/drivers/char/mem.c
  309. index 15dc54fa1d47..afaa6cfd746b 100644
  310. --- a/drivers/char/mem.c
  311. +++ b/drivers/char/mem.c
  312. @@ -403,6 +403,7 @@ static int mmap_mem(struct file *file, struct vm_area_struct *vma)
  313. return 0;
  314. }
  315.  
  316. +#ifdef CONFIG_DEVPORT
  317. static ssize_t read_port(struct file *file, char __user *buf,
  318. size_t count, loff_t *ppos)
  319. {
  320. @@ -444,6 +445,7 @@ static ssize_t write_port(struct file *file, const char __user *buf,
  321. *ppos = i;
  322. return tmp-buf;
  323. }
  324. +#endif
  325.  
  326. static ssize_t read_null(struct file *file, char __user *buf,
  327. size_t count, loff_t *ppos)
  328. @@ -662,12 +664,14 @@ static const struct file_operations null_fops = {
  329. .splice_write = splice_write_null,
  330. };
  331.  
  332. -static const struct file_operations __maybe_unused port_fops = {
  333. +#ifdef CONFIG_DEVPORT
  334. +static const struct file_operations port_fops = {
  335. .llseek = memory_lseek,
  336. .read = read_port,
  337. .write = write_port,
  338. .open = open_port,
  339. };
  340. +#endif
  341.  
  342. static const struct file_operations zero_fops = {
  343. .llseek = zero_lseek,
  344. diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
  345. index 4308f9ca7a43..d0c36398e499 100644
  346. --- a/drivers/char/tpm/Kconfig
  347. +++ b/drivers/char/tpm/Kconfig
  348. @@ -138,6 +138,7 @@ config TCG_NSC
  349. config TCG_ATMEL
  350. tristate "Atmel TPM Interface"
  351. depends on PPC64 || HAS_IOPORT_MAP
  352. + depends on HAS_IOPORT
  353. help
  354. If you have a TPM security chip from Atmel say Yes and it
  355. will be accessible from within Linux. To compile this driver
  356. diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c
  357. index 9c924a1440a9..2d2ae37153ba 100644
  358. --- a/drivers/char/tpm/tpm_infineon.c
  359. +++ b/drivers/char/tpm/tpm_infineon.c
  360. @@ -51,34 +51,40 @@ static struct tpm_inf_dev tpm_dev;
  361.  
  362. static inline void tpm_data_out(unsigned char data, unsigned char offset)
  363. {
  364. +#ifdef CONFIG_HAS_IOPORT
  365. if (tpm_dev.iotype == TPM_INF_IO_PORT)
  366. outb(data, tpm_dev.data_regs + offset);
  367. else
  368. +#endif
  369. writeb(data, tpm_dev.mem_base + tpm_dev.data_regs + offset);
  370. }
  371.  
  372. static inline unsigned char tpm_data_in(unsigned char offset)
  373. {
  374. +#ifdef CONFIG_HAS_IOPORT
  375. if (tpm_dev.iotype == TPM_INF_IO_PORT)
  376. return inb(tpm_dev.data_regs + offset);
  377. - else
  378. - return readb(tpm_dev.mem_base + tpm_dev.data_regs + offset);
  379. +#endif
  380. + return readb(tpm_dev.mem_base + tpm_dev.data_regs + offset);
  381. }
  382.  
  383. static inline void tpm_config_out(unsigned char data, unsigned char offset)
  384. {
  385. +#ifdef CONFIG_HAS_IOPORT
  386. if (tpm_dev.iotype == TPM_INF_IO_PORT)
  387. outb(data, tpm_dev.config_port + offset);
  388. else
  389. +#endif
  390. writeb(data, tpm_dev.mem_base + tpm_dev.index_off + offset);
  391. }
  392.  
  393. static inline unsigned char tpm_config_in(unsigned char offset)
  394. {
  395. +#ifdef CONFIG_HAS_IOPORT
  396. if (tpm_dev.iotype == TPM_INF_IO_PORT)
  397. return inb(tpm_dev.config_port + offset);
  398. - else
  399. - return readb(tpm_dev.mem_base + tpm_dev.index_off + offset);
  400. +#endif
  401. + return readb(tpm_dev.mem_base + tpm_dev.index_off + offset);
  402. }
  403.  
  404. /* TPM header definitions */
  405. diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
  406. index 55b9d3965ae1..10fec570e433 100644
  407. --- a/drivers/char/tpm/tpm_tis_core.c
  408. +++ b/drivers/char/tpm/tpm_tis_core.c
  409. @@ -867,11 +867,6 @@ static void tpm_tis_clkrun_enable(struct tpm_chip *chip, bool value)
  410. clkrun_val &= ~LPC_CLKRUN_EN;
  411. iowrite32(clkrun_val, data->ilb_base_addr + LPC_CNTRL_OFFSET);
  412.  
  413. - /*
  414. - * Write any random value on port 0x80 which is on LPC, to make
  415. - * sure LPC clock is running before sending any TPM command.
  416. - */
  417. - outb(0xCC, 0x80);
  418. } else {
  419. data->clkrun_enabled--;
  420. if (data->clkrun_enabled)
  421. @@ -882,13 +877,15 @@ static void tpm_tis_clkrun_enable(struct tpm_chip *chip, bool value)
  422. /* Enable LPC CLKRUN# */
  423. clkrun_val |= LPC_CLKRUN_EN;
  424. iowrite32(clkrun_val, data->ilb_base_addr + LPC_CNTRL_OFFSET);
  425. -
  426. - /*
  427. - * Write any random value on port 0x80 which is on LPC, to make
  428. - * sure LPC clock is running before sending any TPM command.
  429. - */
  430. - outb(0xCC, 0x80);
  431. }
  432. +
  433. +#ifdef CONFIG_HAS_IOPORT
  434. + /*
  435. + * Write any random value on port 0x80 which is on LPC, to make
  436. + * sure LPC clock is running before sending any TPM command.
  437. + */
  438. + outb(0xCC, 0x80);
  439. +#endif
  440. }
  441.  
  442. static const struct tpm_class_ops tpm_tis = {
  443. diff --git a/drivers/comedi/Kconfig b/drivers/comedi/Kconfig
  444. index 3cb61fa2c5c3..f5b8869df781 100644
  445. --- a/drivers/comedi/Kconfig
  446. +++ b/drivers/comedi/Kconfig
  447. @@ -67,6 +67,7 @@ config COMEDI_TEST
  448.  
  449. config COMEDI_PARPORT
  450. tristate "Parallel port support"
  451. + depends on HAS_IOPORT
  452. help
  453. Enable support for the standard parallel port.
  454. A cheap and easy way to get a few more digital I/O lines. Steal
  455. @@ -79,6 +80,7 @@ config COMEDI_PARPORT
  456. config COMEDI_SSV_DNP
  457. tristate "SSV Embedded Systems DIL/Net-PC support"
  458. depends on X86_32 || COMPILE_TEST
  459. + depends on HAS_IOPORT
  460. help
  461. Enable support for SSV Embedded Systems DIL/Net-PC
  462.  
  463. @@ -89,6 +91,7 @@ endif # COMEDI_MISC_DRIVERS
  464.  
  465. menuconfig COMEDI_ISA_DRIVERS
  466. bool "Comedi ISA and PC/104 drivers"
  467. + depends on ISA
  468. help
  469. Enable comedi ISA and PC/104 drivers to be built
  470.  
  471. @@ -572,6 +575,7 @@ if COMEDI_PCI_DRIVERS
  472.  
  473. config COMEDI_8255_PCI
  474. tristate "Generic PCI based 8255 digital i/o board support"
  475. + depends on LEGACY_PCI
  476. select COMEDI_8255
  477. help
  478. Enable support for PCI based 8255 digital i/o boards. This driver
  479. @@ -589,6 +593,7 @@ config COMEDI_8255_PCI
  480.  
  481. config COMEDI_ADDI_WATCHDOG
  482. tristate
  483. + depends on LEGACY_PCI
  484. help
  485. Provides support for the watchdog subdevice found on many ADDI-DATA
  486. boards. This module will be automatically selected when needed. The
  487. @@ -596,6 +601,7 @@ config COMEDI_ADDI_WATCHDOG
  488.  
  489. config COMEDI_ADDI_APCI_1032
  490. tristate "ADDI-DATA APCI_1032 support"
  491. + depends on LEGACY_PCI
  492. help
  493. Enable support for ADDI-DATA APCI_1032 cards
  494.  
  495. @@ -604,6 +610,7 @@ config COMEDI_ADDI_APCI_1032
  496.  
  497. config COMEDI_ADDI_APCI_1500
  498. tristate "ADDI-DATA APCI_1500 support"
  499. + depends on LEGACY_PCI
  500. help
  501. Enable support for ADDI-DATA APCI_1500 cards
  502.  
  503. @@ -612,6 +619,7 @@ config COMEDI_ADDI_APCI_1500
  504.  
  505. config COMEDI_ADDI_APCI_1516
  506. tristate "ADDI-DATA APCI-1016/1516/2016 support"
  507. + depends on LEGACY_PCI
  508. select COMEDI_ADDI_WATCHDOG
  509. help
  510. Enable support for ADDI-DATA APCI-1016, APCI-1516 and APCI-2016 boards.
  511. @@ -623,6 +631,7 @@ config COMEDI_ADDI_APCI_1516
  512.  
  513. config COMEDI_ADDI_APCI_1564
  514. tristate "ADDI-DATA APCI_1564 support"
  515. + depends on LEGACY_PCI
  516. select COMEDI_ADDI_WATCHDOG
  517. help
  518. Enable support for ADDI-DATA APCI_1564 cards
  519. @@ -632,6 +641,7 @@ config COMEDI_ADDI_APCI_1564
  520.  
  521. config COMEDI_ADDI_APCI_16XX
  522. tristate "ADDI-DATA APCI_16xx support"
  523. + depends on LEGACY_PCI
  524. help
  525. Enable support for ADDI-DATA APCI_16xx cards
  526.  
  527. @@ -640,6 +650,7 @@ config COMEDI_ADDI_APCI_16XX
  528.  
  529. config COMEDI_ADDI_APCI_2032
  530. tristate "ADDI-DATA APCI_2032 support"
  531. + depends on LEGACY_PCI
  532. select COMEDI_ADDI_WATCHDOG
  533. help
  534. Enable support for ADDI-DATA APCI_2032 cards
  535. @@ -649,6 +660,7 @@ config COMEDI_ADDI_APCI_2032
  536.  
  537. config COMEDI_ADDI_APCI_2200
  538. tristate "ADDI-DATA APCI_2200 support"
  539. + depends on LEGACY_PCI
  540. select COMEDI_ADDI_WATCHDOG
  541. help
  542. Enable support for ADDI-DATA APCI_2200 cards
  543. @@ -658,6 +670,7 @@ config COMEDI_ADDI_APCI_2200
  544.  
  545. config COMEDI_ADDI_APCI_3120
  546. tristate "ADDI-DATA APCI_3120/3001 support"
  547. + depends on LEGACY_PCI
  548. depends on HAS_DMA
  549. help
  550. Enable support for ADDI-DATA APCI_3120/3001 cards
  551. @@ -667,6 +680,7 @@ config COMEDI_ADDI_APCI_3120
  552.  
  553. config COMEDI_ADDI_APCI_3501
  554. tristate "ADDI-DATA APCI_3501 support"
  555. + depends on LEGACY_PCI
  556. help
  557. Enable support for ADDI-DATA APCI_3501 cards
  558.  
  559. @@ -675,6 +689,7 @@ config COMEDI_ADDI_APCI_3501
  560.  
  561. config COMEDI_ADDI_APCI_3XXX
  562. tristate "ADDI-DATA APCI_3xxx support"
  563. + depends on LEGACY_PCI
  564. help
  565. Enable support for ADDI-DATA APCI_3xxx cards
  566.  
  567. @@ -683,6 +698,7 @@ config COMEDI_ADDI_APCI_3XXX
  568.  
  569. config COMEDI_ADL_PCI6208
  570. tristate "ADLink PCI-6208A support"
  571. + depends on LEGACY_PCI
  572. help
  573. Enable support for ADLink PCI-6208A cards
  574.  
  575. @@ -691,6 +707,7 @@ config COMEDI_ADL_PCI6208
  576.  
  577. config COMEDI_ADL_PCI7X3X
  578. tristate "ADLink PCI-723X/743X isolated digital i/o board support"
  579. + depends on LEGACY_PCI
  580. help
  581. Enable support for ADlink PCI-723X/743X isolated digital i/o boards.
  582. Supported boards include the 32-channel PCI-7230 (16 in/16 out),
  583. @@ -702,6 +719,7 @@ config COMEDI_ADL_PCI7X3X
  584.  
  585. config COMEDI_ADL_PCI8164
  586. tristate "ADLink PCI-8164 4 Axes Motion Control board support"
  587. + depends on LEGACY_PCI
  588. help
  589. Enable support for ADlink PCI-8164 4 Axes Motion Control board
  590.  
  591. @@ -710,6 +728,7 @@ config COMEDI_ADL_PCI8164
  592.  
  593. config COMEDI_ADL_PCI9111
  594. tristate "ADLink PCI-9111HR support"
  595. + depends on LEGACY_PCI
  596. select COMEDI_8254
  597. help
  598. Enable support for ADlink PCI9111 cards
  599. @@ -719,6 +738,7 @@ config COMEDI_ADL_PCI9111
  600.  
  601. config COMEDI_ADL_PCI9118
  602. tristate "ADLink PCI-9118DG, PCI-9118HG, PCI-9118HR support"
  603. + depends on LEGACY_PCI
  604. depends on HAS_DMA
  605. select COMEDI_8254
  606. help
  607. @@ -729,6 +749,7 @@ config COMEDI_ADL_PCI9118
  608.  
  609. config COMEDI_ADV_PCI1710
  610. tristate "Advantech PCI-171x and PCI-1731 support"
  611. + depends on LEGACY_PCI
  612. select COMEDI_8254
  613. help
  614. Enable support for Advantech PCI-1710, PCI-1710HG, PCI-1711,
  615. @@ -739,6 +760,7 @@ config COMEDI_ADV_PCI1710
  616.  
  617. config COMEDI_ADV_PCI1720
  618. tristate "Advantech PCI-1720 support"
  619. + depends on LEGACY_PCI
  620. help
  621. Enable support for Advantech PCI-1720 Analog Output board.
  622.  
  623. @@ -747,6 +769,7 @@ config COMEDI_ADV_PCI1720
  624.  
  625. config COMEDI_ADV_PCI1723
  626. tristate "Advantech PCI-1723 support"
  627. + depends on LEGACY_PCI
  628. help
  629. Enable support for Advantech PCI-1723 cards
  630.  
  631. @@ -755,6 +778,7 @@ config COMEDI_ADV_PCI1723
  632.  
  633. config COMEDI_ADV_PCI1724
  634. tristate "Advantech PCI-1724U support"
  635. + depends on LEGACY_PCI
  636. help
  637. Enable support for Advantech PCI-1724U cards. These are 32-channel
  638. analog output cards with voltage and current loop output ranges and
  639. @@ -765,6 +789,7 @@ config COMEDI_ADV_PCI1724
  640.  
  641. config COMEDI_ADV_PCI1760
  642. tristate "Advantech PCI-1760 support"
  643. + depends on LEGACY_PCI
  644. help
  645. Enable support for Advantech PCI-1760 board.
  646.  
  647. @@ -773,6 +798,7 @@ config COMEDI_ADV_PCI1760
  648.  
  649. config COMEDI_ADV_PCI_DIO
  650. tristate "Advantech PCI DIO card support"
  651. + depends on LEGACY_PCI
  652. select COMEDI_8254
  653. select COMEDI_8255
  654. help
  655. @@ -786,6 +812,7 @@ config COMEDI_ADV_PCI_DIO
  656.  
  657. config COMEDI_AMPLC_DIO200_PCI
  658. tristate "Amplicon PCI215/PCI272/PCIe215/PCIe236/PCIe296 DIO support"
  659. + depends on LEGACY_PCI
  660. select COMEDI_AMPLC_DIO200
  661. help
  662. Enable support for Amplicon PCI215, PCI272, PCIe215, PCIe236
  663. @@ -796,6 +823,7 @@ config COMEDI_AMPLC_DIO200_PCI
  664.  
  665. config COMEDI_AMPLC_PC236_PCI
  666. tristate "Amplicon PCI236 DIO board support"
  667. + depends on LEGACY_PCI
  668. select COMEDI_AMPLC_PC236
  669. help
  670. Enable support for Amplicon PCI236 DIO board.
  671. @@ -805,6 +833,7 @@ config COMEDI_AMPLC_PC236_PCI
  672.  
  673. config COMEDI_AMPLC_PC263_PCI
  674. tristate "Amplicon PCI263 relay board support"
  675. + depends on LEGACY_PCI
  676. help
  677. Enable support for Amplicon PCI263 relay board. This is a PCI board
  678. with 16 reed relay output channels.
  679. @@ -814,6 +843,7 @@ config COMEDI_AMPLC_PC263_PCI
  680.  
  681. config COMEDI_AMPLC_PCI224
  682. tristate "Amplicon PCI224 and PCI234 support"
  683. + depends on LEGACY_PCI
  684. select COMEDI_8254
  685. help
  686. Enable support for Amplicon PCI224 and PCI234 AO boards
  687. @@ -823,6 +853,7 @@ config COMEDI_AMPLC_PCI224
  688.  
  689. config COMEDI_AMPLC_PCI230
  690. tristate "Amplicon PCI230 and PCI260 support"
  691. + depends on LEGACY_PCI
  692. select COMEDI_8254
  693. select COMEDI_8255
  694. help
  695. @@ -834,6 +865,7 @@ config COMEDI_AMPLC_PCI230
  696.  
  697. config COMEDI_CONTEC_PCI_DIO
  698. tristate "Contec PIO1616L digital I/O board support"
  699. + depends on LEGACY_PCI
  700. help
  701. Enable support for the Contec PIO1616L digital I/O board
  702.  
  703. @@ -842,6 +874,7 @@ config COMEDI_CONTEC_PCI_DIO
  704.  
  705. config COMEDI_DAS08_PCI
  706. tristate "DAS-08 PCI support"
  707. + depends on LEGACY_PCI
  708. select COMEDI_DAS08
  709. help
  710. Enable support for PCI DAS-08 cards.
  711. @@ -861,6 +894,7 @@ config COMEDI_DT3000
  712.  
  713. config COMEDI_DYNA_PCI10XX
  714. tristate "Dynalog PCI DAQ series support"
  715. + depends on LEGACY_PCI
  716. help
  717. Enable support for Dynalog PCI DAQ series
  718. PCI-1050
  719. @@ -894,6 +928,7 @@ config COMEDI_ICP_MULTI
  720.  
  721. config COMEDI_DAQBOARD2000
  722. tristate "IOtech DAQboard/2000 support"
  723. + depends on LEGACY_PCI
  724. select COMEDI_8255
  725. help
  726. Enable support for the IOtech DAQboard/2000
  727. @@ -911,6 +946,7 @@ config COMEDI_JR3_PCI
  728.  
  729. config COMEDI_KE_COUNTER
  730. tristate "Kolter-Electronic PCI Counter 1 card support"
  731. + depends on LEGACY_PCI
  732. help
  733. Enable support for Kolter-Electronic PCI Counter 1 cards
  734.  
  735. @@ -919,6 +955,7 @@ config COMEDI_KE_COUNTER
  736.  
  737. config COMEDI_CB_PCIDAS64
  738. tristate "MeasurementComputing PCI-DAS 64xx, 60xx, and 4020 support"
  739. + depends on LEGACY_PCI
  740. select COMEDI_8255
  741. help
  742. Enable support for ComputerBoards/MeasurementComputing PCI-DAS 64xx,
  743. @@ -929,6 +966,7 @@ config COMEDI_CB_PCIDAS64
  744.  
  745. config COMEDI_CB_PCIDAS
  746. tristate "MeasurementComputing PCI-DAS support"
  747. + depends on LEGACY_PCI
  748. select COMEDI_8254
  749. select COMEDI_8255
  750. help
  751. @@ -942,6 +980,7 @@ config COMEDI_CB_PCIDAS
  752.  
  753. config COMEDI_CB_PCIDDA
  754. tristate "MeasurementComputing PCI-DDA series support"
  755. + depends on LEGACY_PCI
  756. select COMEDI_8255
  757. help
  758. Enable support for ComputerBoards/MeasurementComputing PCI-DDA
  759. @@ -953,6 +992,7 @@ config COMEDI_CB_PCIDDA
  760.  
  761. config COMEDI_CB_PCIMDAS
  762. tristate "MeasurementComputing PCIM-DAS1602/16, PCIe-DAS1602/16 support"
  763. + depends on LEGACY_PCI
  764. select COMEDI_8254
  765. select COMEDI_8255
  766. help
  767. @@ -964,6 +1004,7 @@ config COMEDI_CB_PCIMDAS
  768.  
  769. config COMEDI_CB_PCIMDDA
  770. tristate "MeasurementComputing PCIM-DDA06-16 support"
  771. + depends on LEGACY_PCI
  772. select COMEDI_8255
  773. help
  774. Enable support for ComputerBoards/MeasurementComputing PCIM-DDA06-16
  775. @@ -973,6 +1014,7 @@ config COMEDI_CB_PCIMDDA
  776.  
  777. config COMEDI_ME4000
  778. tristate "Meilhaus ME-4000 support"
  779. + depends on LEGACY_PCI
  780. select COMEDI_8254
  781. help
  782. Enable support for Meilhaus PCI data acquisition cards
  783. @@ -1031,6 +1073,7 @@ config COMEDI_NI_670X
  784.  
  785. config COMEDI_NI_LABPC_PCI
  786. tristate "NI Lab-PC PCI-1200 support"
  787. + depends on LEGACY_PCI
  788. select COMEDI_NI_LABPC
  789. help
  790. Enable support for National Instruments Lab-PC PCI-1200.
  791. @@ -1040,6 +1083,7 @@ config COMEDI_NI_LABPC_PCI
  792.  
  793. config COMEDI_NI_PCIDIO
  794. tristate "NI PCI-DIO32HS, PCI-6533, PCI-6534 support"
  795. + depends on LEGACY_PCI
  796. depends on HAS_DMA
  797. select COMEDI_MITE
  798. select COMEDI_8255
  799. @@ -1052,7 +1096,9 @@ config COMEDI_NI_PCIDIO
  800.  
  801. config COMEDI_NI_PCIMIO
  802. tristate "NI PCI-MIO-E series and M series support"
  803. + depends on LEGACY_PCI
  804. depends on HAS_DMA
  805. + depends on LEGACY_PCI
  806. select COMEDI_NI_TIOCMD
  807. select COMEDI_8255
  808. help
  809. @@ -1074,6 +1120,7 @@ config COMEDI_NI_PCIMIO
  810.  
  811. config COMEDI_RTD520
  812. tristate "Real Time Devices PCI4520/DM7520 support"
  813. + depends on LEGACY_PCI
  814. select COMEDI_8254
  815. help
  816. Enable support for Real Time Devices PCI4520/DM7520
  817. @@ -1142,6 +1189,7 @@ config COMEDI_NI_DAQ_700_CS
  818.  
  819. config COMEDI_NI_DAQ_DIO24_CS
  820. tristate "NI DAQ-Card DIO-24 PCMCIA support"
  821. + depends on LEGACY_PCI
  822. select COMEDI_8255
  823. help
  824. Enable support for the National Instruments PCMCIA DAQ-Card DIO-24
  825. @@ -1160,6 +1208,7 @@ config COMEDI_NI_LABPC_CS
  826.  
  827. config COMEDI_NI_MIO_CS
  828. tristate "NI DAQCard E series PCMCIA support"
  829. + depends on LEGACY_PCI
  830. select COMEDI_NI_TIO
  831. select COMEDI_8255
  832. help
  833. @@ -1254,6 +1303,7 @@ config COMEDI_8255
  834.  
  835. config COMEDI_8255_SA
  836. tristate "Standalone 8255 support"
  837. + depends on LEGACY_PCI
  838. select COMEDI_8255
  839. help
  840. Enable support for 8255 digital I/O as a standalone driver.
  841. @@ -1290,10 +1340,12 @@ config COMEDI_AMPLC_DIO200
  842.  
  843. config COMEDI_AMPLC_PC236
  844. tristate
  845. + depends on HAS_IOPORT
  846. select COMEDI_8255
  847.  
  848. config COMEDI_DAS08
  849. tristate
  850. + depends on HAS_IOPORT
  851. select COMEDI_8254
  852. select COMEDI_8255
  853.  
  854. @@ -1302,6 +1354,7 @@ config COMEDI_ISADMA
  855.  
  856. config COMEDI_NI_LABPC
  857. tristate
  858. + depends on HAS_IOPORT
  859. select COMEDI_8254
  860. select COMEDI_8255
  861.  
  862. diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c
  863. index 8b8127fa8955..cc7380b3c670 100644
  864. --- a/drivers/firmware/dmi-sysfs.c
  865. +++ b/drivers/firmware/dmi-sysfs.c
  866. @@ -310,6 +310,7 @@ static struct kobj_type dmi_system_event_log_ktype = {
  867. .default_attrs = dmi_sysfs_sel_attrs,
  868. };
  869.  
  870. +#ifdef CONFIG_HAS_IOPORT
  871. typedef u8 (*sel_io_reader)(const struct dmi_system_event_log *sel,
  872. loff_t offset);
  873.  
  874. @@ -374,6 +375,7 @@ static ssize_t dmi_sel_raw_read_io(struct dmi_sysfs_entry *entry,
  875.  
  876. return wrote;
  877. }
  878. +#endif
  879.  
  880. static ssize_t dmi_sel_raw_read_phys32(struct dmi_sysfs_entry *entry,
  881. const struct dmi_system_event_log *sel,
  882. @@ -409,11 +411,13 @@ static ssize_t dmi_sel_raw_read_helper(struct dmi_sysfs_entry *entry,
  883. memcpy(&sel, dh, sizeof(sel));
  884.  
  885. switch (sel.access_method) {
  886. +#ifdef CONFIG_HAS_IOPORT
  887. case DMI_SEL_ACCESS_METHOD_IO8:
  888. case DMI_SEL_ACCESS_METHOD_IO2x8:
  889. case DMI_SEL_ACCESS_METHOD_IO16:
  890. return dmi_sel_raw_read_io(entry, &sel, state->buf,
  891. state->pos, state->count);
  892. +#endif
  893. case DMI_SEL_ACCESS_METHOD_PHYS32:
  894. return dmi_sel_raw_read_phys32(entry, &sel, state->buf,
  895. state->pos, state->count);
  896. diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
  897. index 1dd0ec6727fd..2513864687d8 100644
  898. --- a/drivers/gpio/Kconfig
  899. +++ b/drivers/gpio/Kconfig
  900. @@ -678,7 +678,7 @@ config GPIO_VR41XX
  901.  
  902. config GPIO_VX855
  903. tristate "VIA VX855/VX875 GPIO"
  904. - depends on (X86 || COMPILE_TEST) && PCI
  905. + depends on (X86 || COMPILE_TEST) && LEGACY_PCI
  906. select MFD_CORE
  907. select MFD_VX855
  908. help
  909. diff --git a/drivers/gpu/drm/bochs/Kconfig b/drivers/gpu/drm/bochs/Kconfig
  910. index 7bcdf294fed8..8db9b2180d23 100644
  911. --- a/drivers/gpu/drm/bochs/Kconfig
  912. +++ b/drivers/gpu/drm/bochs/Kconfig
  913. @@ -2,6 +2,7 @@
  914. config DRM_BOCHS
  915. tristate "DRM Support for bochs dispi vga interface (qemu stdvga)"
  916. depends on DRM && PCI && MMU
  917. + depends on HAS_IOPORT
  918. select DRM_KMS_HELPER
  919. select DRM_VRAM_HELPER
  920. select DRM_TTM
  921. diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
  922. index 2d7380a9890e..463926d0e2b0 100644
  923. --- a/drivers/gpu/drm/bochs/bochs_hw.c
  924. +++ b/drivers/gpu/drm/bochs/bochs_hw.c
  925. @@ -13,29 +13,31 @@
  926.  
  927. static void bochs_vga_writeb(struct bochs_device *bochs, u16 ioport, u8 val)
  928. {
  929. + int offset = ioport - 0x3c0 + 0x400;
  930. +
  931. if (WARN_ON(ioport < 0x3c0 || ioport > 0x3df))
  932. return;
  933.  
  934. - if (bochs->mmio) {
  935. - int offset = ioport - 0x3c0 + 0x400;
  936. - writeb(val, bochs->mmio + offset);
  937. - } else {
  938. +#ifdef CONFIG_HAS_IOPORT
  939. + if (!bochs->mmio) {
  940. outb(val, ioport);
  941. + return;
  942. }
  943. +#endif
  944. + writeb(val, bochs->mmio + offset);
  945. }
  946.  
  947. static u16 bochs_dispi_read(struct bochs_device *bochs, u16 reg)
  948. {
  949. - u16 ret = 0;
  950. + int offset = 0x500 + (reg << 1);
  951.  
  952. - if (bochs->mmio) {
  953. - int offset = 0x500 + (reg << 1);
  954. - ret = readw(bochs->mmio + offset);
  955. - } else {
  956. +#ifdef CONFIG_HAS_IOPORT
  957. + if (!bochs->mmio) {
  958. outw(reg, VBE_DISPI_IOPORT_INDEX);
  959. - ret = inw(VBE_DISPI_IOPORT_DATA);
  960. + return inw(VBE_DISPI_IOPORT_DATA);
  961. }
  962. - return ret;
  963. +#endif
  964. + return readw(bochs->mmio + offset);
  965. }
  966.  
  967. static void bochs_dispi_write(struct bochs_device *bochs, u16 reg, u16 val)
  968. diff --git a/drivers/gpu/drm/qxl/Kconfig b/drivers/gpu/drm/qxl/Kconfig
  969. index ca3f51c2a8fe..d0e0d440c8d9 100644
  970. --- a/drivers/gpu/drm/qxl/Kconfig
  971. +++ b/drivers/gpu/drm/qxl/Kconfig
  972. @@ -2,6 +2,7 @@
  973. config DRM_QXL
  974. tristate "QXL virtual GPU"
  975. depends on DRM && PCI && MMU
  976. + depends on HAS_IOPORT
  977. select DRM_KMS_HELPER
  978. select DRM_TTM
  979. select DRM_TTM_HELPER
  980. diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c
  981. index ad922c3ec681..e1fa17329fca 100644
  982. --- a/drivers/gpu/drm/tiny/cirrus.c
  983. +++ b/drivers/gpu/drm/tiny/cirrus.c
  984. @@ -305,8 +305,10 @@ static int cirrus_mode_set(struct cirrus_device *cirrus,
  985.  
  986. cirrus_set_start_address(cirrus, 0);
  987.  
  988. +#ifdef CONFIG_HAS_IOPORT
  989. /* Unblank (needed on S3 resume, vgabios doesn't do it then) */
  990. outb(0x20, 0x3c0);
  991. +#endif
  992.  
  993. drm_dev_exit(idx);
  994. return 0;
  995. diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
  996. index 87624902ea80..94a92e1cd076 100644
  997. --- a/drivers/hwmon/Kconfig
  998. +++ b/drivers/hwmon/Kconfig
  999. @@ -537,6 +537,7 @@ config SENSORS_SPARX5
  1000.  
  1001. config SENSORS_F71805F
  1002. tristate "Fintek F71805F/FG, F71806F/FG and F71872F/FG"
  1003. + depends on HAS_IOPORT
  1004. depends on !PPC
  1005. help
  1006. If you say yes here you get support for hardware monitoring
  1007. @@ -548,6 +549,7 @@ config SENSORS_F71805F
  1008.  
  1009. config SENSORS_F71882FG
  1010. tristate "Fintek F71882FG and compatibles"
  1011. + depends on HAS_IOPORT
  1012. depends on !PPC
  1013. help
  1014. If you say yes here you get support for hardware monitoring
  1015. @@ -751,6 +753,7 @@ config SENSORS_CORETEMP
  1016.  
  1017. config SENSORS_IT87
  1018. tristate "ITE IT87xx and compatibles"
  1019. + depends on HAS_IOPORT
  1020. depends on !PPC
  1021. select HWMON_VID
  1022. help
  1023. @@ -1246,6 +1249,7 @@ config SENSORS_LM77
  1024.  
  1025. config SENSORS_LM78
  1026. tristate "National Semiconductor LM78 and compatibles"
  1027. + depends on HAS_IOPORT
  1028. depends on I2C
  1029. select HWMON_VID
  1030. help
  1031. @@ -1367,6 +1371,7 @@ config SENSORS_LM95245
  1032.  
  1033. config SENSORS_PC87360
  1034. tristate "National Semiconductor PC87360 family"
  1035. + depends on HAS_IOPORT
  1036. depends on !PPC
  1037. select HWMON_VID
  1038. help
  1039. @@ -1381,6 +1386,7 @@ config SENSORS_PC87360
  1040.  
  1041. config SENSORS_PC87427
  1042. tristate "National Semiconductor PC87427"
  1043. + depends on HAS_IOPORT
  1044. depends on !PPC
  1045. help
  1046. If you say yes here you get access to the hardware monitoring
  1047. @@ -1412,6 +1418,7 @@ config SENSORS_NTC_THERMISTOR
  1048.  
  1049. config SENSORS_NCT6683
  1050. tristate "Nuvoton NCT6683D"
  1051. + depends on HAS_IOPORT
  1052. depends on !PPC
  1053. help
  1054. If you say yes here you get support for the hardware monitoring
  1055. @@ -1422,6 +1429,7 @@ config SENSORS_NCT6683
  1056.  
  1057. config SENSORS_NCT6775
  1058. tristate "Nuvoton NCT6775F and compatibles"
  1059. + depends on HAS_IOPORT
  1060. depends on !PPC
  1061. select HWMON_VID
  1062. help
  1063. @@ -1612,7 +1620,7 @@ config SENSORS_S3C_RAW
  1064.  
  1065. config SENSORS_SIS5595
  1066. tristate "Silicon Integrated Systems Corp. SiS5595"
  1067. - depends on PCI
  1068. + depends on LEGACY_PCI
  1069. help
  1070. If you say yes here you get support for the integrated sensors in
  1071. SiS5595 South Bridges.
  1072. @@ -1622,6 +1630,7 @@ config SENSORS_SIS5595
  1073.  
  1074. config SENSORS_DME1737
  1075. tristate "SMSC DME1737, SCH311x and compatibles"
  1076. + depends on HAS_IOPORT
  1077. depends on I2C && !PPC
  1078. select HWMON_VID
  1079. help
  1080. @@ -1665,6 +1674,7 @@ config SENSORS_EMC6W201
  1081.  
  1082. config SENSORS_SMSC47M1
  1083. tristate "SMSC LPC47M10x and compatibles"
  1084. + depends on HAS_IOPORT
  1085. depends on !PPC
  1086. help
  1087. If you say yes here you get support for the integrated fan
  1088. @@ -1699,6 +1709,7 @@ config SENSORS_SMSC47M192
  1089.  
  1090. config SENSORS_SMSC47B397
  1091. tristate "SMSC LPC47B397-NC"
  1092. + depends on HAS_IOPORT
  1093. depends on !PPC
  1094. help
  1095. If you say yes here you get support for the SMSC LPC47B397-NC
  1096. @@ -1712,6 +1723,7 @@ config SENSORS_SCH56XX_COMMON
  1097.  
  1098. config SENSORS_SCH5627
  1099. tristate "SMSC SCH5627"
  1100. + depends on HAS_IOPORT
  1101. depends on !PPC && WATCHDOG
  1102. select SENSORS_SCH56XX_COMMON
  1103. select WATCHDOG_CORE
  1104. @@ -1725,6 +1737,7 @@ config SENSORS_SCH5627
  1105.  
  1106. config SENSORS_SCH5636
  1107. tristate "SMSC SCH5636"
  1108. + depends on HAS_IOPORT
  1109. depends on !PPC && WATCHDOG
  1110. select SENSORS_SCH56XX_COMMON
  1111. select WATCHDOG_CORE
  1112. @@ -1943,7 +1956,7 @@ config SENSORS_VIA_CPUTEMP
  1113.  
  1114. config SENSORS_VIA686A
  1115. tristate "VIA686A"
  1116. - depends on PCI
  1117. + depends on LEGACY_PCI
  1118. help
  1119. If you say yes here you get support for the integrated sensors in
  1120. Via 686A/B South Bridges.
  1121. @@ -1953,6 +1966,7 @@ config SENSORS_VIA686A
  1122.  
  1123. config SENSORS_VT1211
  1124. tristate "VIA VT1211"
  1125. + depends on HAS_IOPORT
  1126. depends on !PPC
  1127. select HWMON_VID
  1128. help
  1129. @@ -1964,7 +1978,7 @@ config SENSORS_VT1211
  1130.  
  1131. config SENSORS_VT8231
  1132. tristate "VIA VT8231"
  1133. - depends on PCI
  1134. + depends on LEGACY_PCI
  1135. select HWMON_VID
  1136. help
  1137. If you say yes here then you get support for the integrated sensors
  1138. @@ -1987,6 +2001,7 @@ config SENSORS_W83773G
  1139. config SENSORS_W83781D
  1140. tristate "Winbond W83781D, W83782D, W83783S, Asus AS99127F"
  1141. depends on I2C
  1142. + depends on HAS_IOPORT
  1143. select HWMON_VID
  1144. help
  1145. If you say yes here you get support for the Winbond W8378x series
  1146. @@ -2072,6 +2087,7 @@ config SENSORS_W83L786NG
  1147.  
  1148. config SENSORS_W83627HF
  1149. tristate "Winbond W83627HF, W83627THF, W83637HF, W83687THF, W83697HF"
  1150. + depends on HAS_IOPORT
  1151. depends on !PPC
  1152. select HWMON_VID
  1153. help
  1154. @@ -2084,6 +2100,7 @@ config SENSORS_W83627HF
  1155.  
  1156. config SENSORS_W83627EHF
  1157. tristate "Winbond W83627EHF/EHG/DHG/UHG, W83667HG"
  1158. + depends on HAS_IOPORT
  1159. depends on !PPC
  1160. select HWMON_VID
  1161. help
  1162. diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
  1163. index 10acece9d7b9..2d20d004dbc4 100644
  1164. --- a/drivers/i2c/busses/Kconfig
  1165. +++ b/drivers/i2c/busses/Kconfig
  1166. @@ -11,7 +11,7 @@ comment "PC SMBus host controller drivers"
  1167.  
  1168. config I2C_ALI1535
  1169. tristate "ALI 1535"
  1170. - depends on PCI
  1171. + depends on LEGACY_PCI
  1172. help
  1173. If you say yes to this option, support will be included for the SMB
  1174. Host controller on Acer Labs Inc. (ALI) M1535 South Bridges. The SMB
  1175. @@ -23,7 +23,7 @@ config I2C_ALI1535
  1176.  
  1177. config I2C_ALI1563
  1178. tristate "ALI 1563"
  1179. - depends on PCI
  1180. + depends on LEGACY_PCI
  1181. help
  1182. If you say yes to this option, support will be included for the SMB
  1183. Host controller on Acer Labs Inc. (ALI) M1563 South Bridges. The SMB
  1184. @@ -35,7 +35,7 @@ config I2C_ALI1563
  1185.  
  1186. config I2C_ALI15X3
  1187. tristate "ALI 15x3"
  1188. - depends on PCI
  1189. + depends on LEGACY_PCI
  1190. help
  1191. If you say yes to this option, support will be included for the
  1192. Acer Labs Inc. (ALI) M1514 and M1543 motherboard I2C interfaces.
  1193. @@ -45,7 +45,7 @@ config I2C_ALI15X3
  1194.  
  1195. config I2C_AMD756
  1196. tristate "AMD 756/766/768/8111 and nVidia nForce"
  1197. - depends on PCI
  1198. + depends on LEGACY_PCI
  1199. help
  1200. If you say yes to this option, support will be included for the AMD
  1201. 756/766/768 mainboard I2C interfaces. The driver also includes
  1202. @@ -70,7 +70,7 @@ config I2C_AMD756_S4882
  1203.  
  1204. config I2C_AMD8111
  1205. tristate "AMD 8111"
  1206. - depends on PCI
  1207. + depends on LEGACY_PCI
  1208. help
  1209. If you say yes to this option, support will be included for the
  1210. second (SMBus 2.0) AMD 8111 mainboard I2C interface.
  1211. @@ -100,7 +100,7 @@ config I2C_HIX5HD2
  1212.  
  1213. config I2C_I801
  1214. tristate "Intel 82801 (ICH/PCH)"
  1215. - depends on PCI
  1216. + depends on LEGACY_PCI
  1217. select CHECK_SIGNATURE if X86 && DMI
  1218. select I2C_SMBUS
  1219. help
  1220. @@ -154,7 +154,7 @@ config I2C_I801
  1221.  
  1222. config I2C_ISCH
  1223. tristate "Intel SCH SMBus 1.0"
  1224. - depends on PCI
  1225. + depends on LEGACY_PCI
  1226. select LPC_SCH
  1227. help
  1228. Say Y here if you want to use SMBus controller on the Intel SCH
  1229. @@ -175,7 +175,7 @@ config I2C_ISMT
  1230.  
  1231. config I2C_PIIX4
  1232. tristate "Intel PIIX4 and compatible (ATI/AMD/Serverworks/Broadcom/SMSC)"
  1233. - depends on PCI
  1234. + depends on PCI && HAS_IOPORT
  1235. help
  1236. If you say yes to this option, support will be included for the Intel
  1237. PIIX4 family of mainboard I2C interfaces. Specifically, the following
  1238. @@ -221,7 +221,7 @@ config I2C_CHT_WC
  1239.  
  1240. config I2C_NFORCE2
  1241. tristate "Nvidia nForce2, nForce3 and nForce4"
  1242. - depends on PCI
  1243. + depends on LEGACY_PCI
  1244. help
  1245. If you say yes to this option, support will be included for the Nvidia
  1246. nForce2, nForce3 and nForce4 families of mainboard I2C interfaces.
  1247. @@ -253,7 +253,7 @@ config I2C_NVIDIA_GPU
  1248.  
  1249. config I2C_SIS5595
  1250. tristate "SiS 5595"
  1251. - depends on PCI
  1252. + depends on LEGACY_PCI
  1253. help
  1254. If you say yes to this option, support will be included for the
  1255. SiS5595 SMBus (a subset of I2C) interface.
  1256. @@ -263,7 +263,7 @@ config I2C_SIS5595
  1257.  
  1258. config I2C_SIS630
  1259. tristate "SiS 630/730/964"
  1260. - depends on PCI
  1261. + depends on LEGACY_PCI
  1262. help
  1263. If you say yes to this option, support will be included for the
  1264. SiS630, SiS730 and SiS964 SMBus (a subset of I2C) interface.
  1265. @@ -273,7 +273,7 @@ config I2C_SIS630
  1266.  
  1267. config I2C_SIS96X
  1268. tristate "SiS 96x"
  1269. - depends on PCI
  1270. + depends on LEGACY_PCI
  1271. help
  1272. If you say yes to this option, support will be included for the SiS
  1273. 96x SMBus (a subset of I2C) interfaces. Specifically, the following
  1274. @@ -291,7 +291,7 @@ config I2C_SIS96X
  1275.  
  1276. config I2C_VIA
  1277. tristate "VIA VT82C586B"
  1278. - depends on PCI
  1279. + depends on LEGACY_PCI
  1280. select I2C_ALGOBIT
  1281. help
  1282. If you say yes to this option, support will be included for the VIA
  1283. @@ -302,7 +302,7 @@ config I2C_VIA
  1284.  
  1285. config I2C_VIAPRO
  1286. tristate "VIA VT82C596/82C686/82xx and CX700/VX8xx/VX900"
  1287. - depends on PCI
  1288. + depends on LEGACY_PCI
  1289. help
  1290. If you say yes to this option, support will be included for the VIA
  1291. VT82C596 and later SMBus interface. Specifically, the following
  1292. @@ -825,6 +825,7 @@ config I2C_NPCM7XX
  1293.  
  1294. config I2C_OCORES
  1295. tristate "OpenCores I2C Controller"
  1296. + depends on HAS_IOPORT
  1297. help
  1298. If you say yes to this option, support will be included for the
  1299. OpenCores I2C controller. For details see
  1300. @@ -1222,6 +1223,7 @@ config I2C_CP2615
  1301. config I2C_PARPORT
  1302. tristate "Parallel port adapter"
  1303. depends on PARPORT
  1304. + depends on HAS_IOPORT
  1305. select I2C_ALGOBIT
  1306. select I2C_SMBUS
  1307. help
  1308. @@ -1320,6 +1322,7 @@ config I2C_ICY
  1309. config I2C_MLXCPLD
  1310. tristate "Mellanox I2C driver"
  1311. depends on X86_64 || COMPILE_TEST
  1312. + depends on HAS_IOPORT
  1313. help
  1314. This exposes the Mellanox platform I2C busses to the linux I2C layer
  1315. for X86 based systems.
  1316. diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
  1317. index 19abf11c84c8..d7280965d723 100644
  1318. --- a/drivers/ide/Kconfig
  1319. +++ b/drivers/ide/Kconfig
  1320. @@ -10,6 +10,7 @@ config HAVE_IDE
  1321. menuconfig IDE
  1322. tristate "ATA/ATAPI/MFM/RLL support (DEPRECATED)"
  1323. depends on HAVE_IDE
  1324. + depends on HAS_IOPORT
  1325. depends on BLOCK
  1326. select BLK_SCSI_REQUEST
  1327. help
  1328. diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
  1329. index c7946c439612..8d07315d0b59 100644
  1330. --- a/drivers/iio/adc/Kconfig
  1331. +++ b/drivers/iio/adc/Kconfig
  1332. @@ -119,7 +119,7 @@ config AD7606
  1333.  
  1334. config AD7606_IFACE_PARALLEL
  1335. tristate "Analog Devices AD7606 ADC driver with parallel interface support"
  1336. - depends on HAS_IOMEM
  1337. + depends on HAS_IOPORT
  1338. select AD7606
  1339. help
  1340. Say yes here to build parallel interface support for Analog Devices:
  1341. diff --git a/drivers/input/gameport/Kconfig b/drivers/input/gameport/Kconfig
  1342. index 4761795cb49f..679a8bc816f1 100644
  1343. --- a/drivers/input/gameport/Kconfig
  1344. +++ b/drivers/input/gameport/Kconfig
  1345. @@ -24,6 +24,7 @@ if GAMEPORT
  1346.  
  1347. config GAMEPORT_NS558
  1348. tristate "Classic ISA and PnP gameport support"
  1349. + depends on ISA
  1350. help
  1351. Say Y here if you have an ISA or PnP gameport.
  1352.  
  1353. @@ -34,6 +35,7 @@ config GAMEPORT_NS558
  1354.  
  1355. config GAMEPORT_L4
  1356. tristate "PDPI Lightning 4 gamecard support"
  1357. + depends on ISA
  1358. help
  1359. Say Y here if you have a PDPI Lightning 4 gamecard.
  1360.  
  1361. @@ -42,7 +44,7 @@ config GAMEPORT_L4
  1362.  
  1363. config GAMEPORT_EMU10K1
  1364. tristate "SB Live and Audigy gameport support"
  1365. - depends on PCI
  1366. + depends on LEGACY_PCI
  1367. help
  1368. Say Y here if you have a SoundBlaster Live! or SoundBlaster
  1369. Audigy card and want to use its gameport.
  1370. @@ -52,7 +54,7 @@ config GAMEPORT_EMU10K1
  1371.  
  1372. config GAMEPORT_FM801
  1373. tristate "ForteMedia FM801 gameport support"
  1374. - depends on PCI
  1375. + depends on LEGACY_PCI
  1376. help
  1377. Say Y here if you have ForteMedia FM801 PCI audio controller
  1378. (Abit AU10, Genius Sound Maker, HP Workstation zx2000,
  1379. diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
  1380. index f39b7b3f7942..5d125627c595 100644
  1381. --- a/drivers/input/serio/Kconfig
  1382. +++ b/drivers/input/serio/Kconfig
  1383. @@ -75,6 +75,7 @@ config SERIO_Q40KBD
  1384. config SERIO_PARKBD
  1385. tristate "Parallel port keyboard adapter"
  1386. depends on PARPORT
  1387. + depends on HAS_IOPORT
  1388. help
  1389. Say Y here if you built a simple parallel port adapter to attach
  1390. an additional AT keyboard, XT keyboard or PS/2 mouse.
  1391. @@ -148,6 +149,7 @@ config HIL_MLC
  1392. config SERIO_PCIPS2
  1393. tristate "PCI PS/2 keyboard and PS/2 mouse controller"
  1394. depends on PCI
  1395. + depends on HAS_IOPORT
  1396. help
  1397. Say Y here if you have a Mobility Docking station with PS/2
  1398. keyboard and mice ports.
  1399. diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
  1400. index 69656200a2f0..2caa5652ce00 100644
  1401. --- a/drivers/input/touchscreen/Kconfig
  1402. +++ b/drivers/input/touchscreen/Kconfig
  1403. @@ -663,6 +663,7 @@ config TOUCHSCREEN_INEXIO
  1404.  
  1405. config TOUCHSCREEN_MK712
  1406. tristate "ICS MicroClock MK712 touchscreen"
  1407. + depends on ISA
  1408. help
  1409. Say Y here if you have the ICS MicroClock MK712 touchscreen
  1410. controller chip in your system.
  1411. diff --git a/drivers/isdn/hardware/mISDN/Kconfig b/drivers/isdn/hardware/mISDN/Kconfig
  1412. index 078eeadf707a..2c5e16483179 100644
  1413. --- a/drivers/isdn/hardware/mISDN/Kconfig
  1414. +++ b/drivers/isdn/hardware/mISDN/Kconfig
  1415. @@ -7,14 +7,14 @@ comment "mISDN hardware drivers"
  1416. config MISDN_HFCPCI
  1417. tristate "Support for HFC PCI cards"
  1418. depends on MISDN
  1419. - depends on PCI
  1420. + depends on LEGACY_PCI
  1421. help
  1422. Enable support for cards with Cologne Chip AG's
  1423. HFC PCI chip.
  1424.  
  1425. config MISDN_HFCMULTI
  1426. tristate "Support for HFC multiport cards (HFC-4S/8S/E1)"
  1427. - depends on PCI || CPM1
  1428. + depends on LEGACY_PCI || CPM1
  1429. depends on MISDN
  1430. help
  1431. Enable support for cards with Cologne Chip AG's HFC multiport
  1432. @@ -43,7 +43,7 @@ config MISDN_HFCUSB
  1433. config MISDN_AVMFRITZ
  1434. tristate "Support for AVM FRITZ!CARD PCI"
  1435. depends on MISDN
  1436. - depends on PCI
  1437. + depends on LEGACY_PCI
  1438. select MISDN_IPAC
  1439. help
  1440. Enable support for AVMs FRITZ!CARD PCI cards
  1441. @@ -51,7 +51,7 @@ config MISDN_AVMFRITZ
  1442. config MISDN_SPEEDFAX
  1443. tristate "Support for Sedlbauer Speedfax+"
  1444. depends on MISDN
  1445. - depends on PCI
  1446. + depends on LEGACY_PCI
  1447. select MISDN_IPAC
  1448. select MISDN_ISAR
  1449. help
  1450. @@ -60,7 +60,7 @@ config MISDN_SPEEDFAX
  1451. config MISDN_INFINEON
  1452. tristate "Support for cards with Infineon chipset"
  1453. depends on MISDN
  1454. - depends on PCI
  1455. + depends on LEGACY_PCI
  1456. select MISDN_IPAC
  1457. help
  1458. Enable support for cards with ISAC + HSCX, IPAC or IPAC-SX
  1459. @@ -69,14 +69,14 @@ config MISDN_INFINEON
  1460. config MISDN_W6692
  1461. tristate "Support for cards with Winbond 6692"
  1462. depends on MISDN
  1463. - depends on PCI
  1464. + depends on LEGACY_PCI
  1465. help
  1466. Enable support for Winbond 6692 PCI chip based cards.
  1467.  
  1468. config MISDN_NETJET
  1469. tristate "Support for NETJet cards"
  1470. depends on MISDN
  1471. - depends on PCI
  1472. + depends on LEGACY_PCI
  1473. depends on TTY
  1474. select MISDN_IPAC
  1475. select MISDN_HDLC
  1476. diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
  1477. index 342fc336b8cd..5beef857d58e 100644
  1478. --- a/drivers/leds/Kconfig
  1479. +++ b/drivers/leds/Kconfig
  1480. @@ -727,7 +727,7 @@ config LEDS_LM355x
  1481.  
  1482. config LEDS_OT200
  1483. tristate "LED support for the Bachmann OT200"
  1484. - depends on LEDS_CLASS && HAS_IOMEM && (X86_32 || COMPILE_TEST)
  1485. + depends on LEDS_CLASS && HAS_IOPORT && (X86_32 || COMPILE_TEST)
  1486. help
  1487. This option enables support for the LEDs on the Bachmann OT200.
  1488. Say Y to enable LEDs on the Bachmann OT200.
  1489. diff --git a/drivers/media/cec/platform/Kconfig b/drivers/media/cec/platform/Kconfig
  1490. index b672d3142eb7..5e92ece5b104 100644
  1491. --- a/drivers/media/cec/platform/Kconfig
  1492. +++ b/drivers/media/cec/platform/Kconfig
  1493. @@ -100,7 +100,7 @@ config CEC_TEGRA
  1494. config CEC_SECO
  1495. tristate "SECO Boards HDMI CEC driver"
  1496. depends on (X86 || IA64) || COMPILE_TEST
  1497. - depends on PCI && DMI
  1498. + depends on LEGACY_PCI && DMI
  1499. select CEC_CORE
  1500. select CEC_NOTIFIER
  1501. help
  1502. diff --git a/drivers/media/pci/dm1105/Kconfig b/drivers/media/pci/dm1105/Kconfig
  1503. index e0e3af67c99c..9ecab93685d4 100644
  1504. --- a/drivers/media/pci/dm1105/Kconfig
  1505. +++ b/drivers/media/pci/dm1105/Kconfig
  1506. @@ -1,7 +1,7 @@
  1507. # SPDX-License-Identifier: GPL-2.0-only
  1508. config DVB_DM1105
  1509. tristate "SDMC DM1105 based PCI cards"
  1510. - depends on DVB_CORE && PCI && I2C && I2C_ALGOBIT
  1511. + depends on DVB_CORE && LEGACY_PCI && I2C && I2C_ALGOBIT
  1512. select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT
  1513. select DVB_STV0299 if MEDIA_SUBDRV_AUTOSELECT
  1514. select DVB_STV0288 if MEDIA_SUBDRV_AUTOSELECT
  1515. diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
  1516. index d29e29645e04..044590b58212 100644
  1517. --- a/drivers/media/radio/Kconfig
  1518. +++ b/drivers/media/radio/Kconfig
  1519. @@ -67,7 +67,7 @@ config USB_DSBR
  1520.  
  1521. config RADIO_MAXIRADIO
  1522. tristate "Guillemot MAXI Radio FM 2000 radio"
  1523. - depends on VIDEO_V4L2 && PCI
  1524. + depends on VIDEO_V4L2 && LEGACY_PCI
  1525. select RADIO_TEA575X
  1526. help
  1527. Choose Y here if you have this radio card. This card may also be
  1528. @@ -233,6 +233,7 @@ source "drivers/media/radio/wl128x/Kconfig"
  1529. menuconfig V4L_RADIO_ISA_DRIVERS
  1530. bool "ISA radio devices"
  1531. depends on ISA || COMPILE_TEST
  1532. + depends on HAS_IOPORT
  1533. help
  1534. Say Y here to enable support for these ISA drivers.
  1535.  
  1536. @@ -240,11 +241,13 @@ if V4L_RADIO_ISA_DRIVERS
  1537.  
  1538. config RADIO_ISA
  1539. depends on ISA || COMPILE_TEST
  1540. + depends on HAS_IOPORT
  1541. tristate
  1542.  
  1543. config RADIO_CADET
  1544. tristate "ADS Cadet AM/FM Tuner"
  1545. depends on ISA || COMPILE_TEST
  1546. + depends on HAS_IOPORT
  1547. depends on VIDEO_V4L2
  1548. help
  1549. Choose Y here if you have one of these AM/FM radio cards, and then
  1550. @@ -256,6 +259,7 @@ config RADIO_CADET
  1551. config RADIO_RTRACK
  1552. tristate "AIMSlab RadioTrack (aka RadioReveal) support"
  1553. depends on ISA || COMPILE_TEST
  1554. + depends on HAS_IOPORT
  1555. depends on VIDEO_V4L2
  1556. select RADIO_ISA
  1557. help
  1558. @@ -288,6 +292,7 @@ config RADIO_RTRACK_PORT
  1559. config RADIO_RTRACK2
  1560. tristate "AIMSlab RadioTrack II support"
  1561. depends on ISA || COMPILE_TEST
  1562. + depends on HAS_IOPORT
  1563. depends on VIDEO_V4L2
  1564. select RADIO_ISA
  1565. help
  1566. @@ -312,6 +317,7 @@ config RADIO_RTRACK2_PORT
  1567. config RADIO_AZTECH
  1568. tristate "Aztech/Packard Bell Radio"
  1569. depends on ISA || COMPILE_TEST
  1570. + depends on HAS_IOPORT
  1571. depends on VIDEO_V4L2
  1572. select RADIO_ISA
  1573. help
  1574. @@ -333,6 +339,7 @@ config RADIO_AZTECH_PORT
  1575. config RADIO_GEMTEK
  1576. tristate "GemTek Radio card (or compatible) support"
  1577. depends on ISA || COMPILE_TEST
  1578. + depends on HAS_IOPORT
  1579. depends on VIDEO_V4L2
  1580. select RADIO_ISA
  1581. help
  1582. @@ -389,6 +396,7 @@ config RADIO_MIROPCM20
  1583. config RADIO_SF16FMI
  1584. tristate "SF16-FMI/SF16-FMP/SF16-FMD Radio"
  1585. depends on ISA || COMPILE_TEST
  1586. + depends on HAS_IOPORT
  1587. depends on VIDEO_V4L2
  1588. help
  1589. Choose Y here if you have one of these FM radio cards.
  1590. @@ -399,6 +407,7 @@ config RADIO_SF16FMI
  1591. config RADIO_SF16FMR2
  1592. tristate "SF16-FMR2/SF16-FMD2 Radio"
  1593. depends on ISA || COMPILE_TEST
  1594. + depends on HAS_IOPORT
  1595. depends on VIDEO_V4L2
  1596. select RADIO_TEA575X
  1597. help
  1598. @@ -410,6 +419,7 @@ config RADIO_SF16FMR2
  1599. config RADIO_TERRATEC
  1600. tristate "TerraTec ActiveRadio ISA Standalone"
  1601. depends on ISA || COMPILE_TEST
  1602. + depends on HAS_IOPORT
  1603. depends on VIDEO_V4L2
  1604. select RADIO_ISA
  1605. help
  1606. @@ -425,6 +435,7 @@ config RADIO_TERRATEC
  1607. config RADIO_TRUST
  1608. tristate "Trust FM radio card"
  1609. depends on ISA || COMPILE_TEST
  1610. + depends on HAS_IOPORT
  1611. depends on VIDEO_V4L2
  1612. select RADIO_ISA
  1613. help
  1614. @@ -449,6 +460,7 @@ config RADIO_TRUST_PORT
  1615. config RADIO_TYPHOON
  1616. tristate "Typhoon Radio (a.k.a. EcoRadio)"
  1617. depends on ISA || COMPILE_TEST
  1618. + depends on HAS_IOPORT
  1619. depends on VIDEO_V4L2
  1620. select RADIO_ISA
  1621. help
  1622. @@ -484,6 +496,7 @@ config RADIO_TYPHOON_MUTEFREQ
  1623. config RADIO_ZOLTRIX
  1624. tristate "Zoltrix Radio"
  1625. depends on ISA || COMPILE_TEST
  1626. + depends on HAS_IOPORT
  1627. depends on VIDEO_V4L2
  1628. select RADIO_ISA
  1629. help
  1630. diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
  1631. index d0a8326b75c2..81a7dc2dd92d 100644
  1632. --- a/drivers/media/rc/Kconfig
  1633. +++ b/drivers/media/rc/Kconfig
  1634. @@ -162,7 +162,8 @@ config RC_ATI_REMOTE
  1635.  
  1636. config IR_ENE
  1637. tristate "ENE eHome Receiver/Transceiver (pnp id: ENE0100/ENE02xxx)"
  1638. - depends on PNP || COMPILE_TEST
  1639. + depends on ISAPNP || COMPILE_TEST
  1640. + depends on HAS_IOPORT
  1641. help
  1642. Say Y here to enable support for integrated infrared receiver
  1643. /transceiver made by ENE.
  1644. @@ -216,6 +217,7 @@ config IR_MCEUSB
  1645. config IR_ITE_CIR
  1646. tristate "ITE Tech Inc. IT8712/IT8512 Consumer Infrared Transceiver"
  1647. depends on PNP || COMPILE_TEST
  1648. + depends on HAS_IOPORT
  1649. help
  1650. Say Y here to enable support for integrated infrared receivers
  1651. /transceivers made by ITE Tech Inc. These are found in
  1652. @@ -228,6 +230,7 @@ config IR_ITE_CIR
  1653. config IR_FINTEK
  1654. tristate "Fintek Consumer Infrared Transceiver"
  1655. depends on PNP || COMPILE_TEST
  1656. + depends on HAS_IOPORT
  1657. help
  1658. Say Y here to enable support for integrated infrared receiver
  1659. /transceiver made by Fintek. This chip is found on assorted
  1660. @@ -259,6 +262,7 @@ config IR_MTK
  1661. config IR_NUVOTON
  1662. tristate "Nuvoton w836x7hg Consumer Infrared Transceiver"
  1663. depends on PNP || COMPILE_TEST
  1664. + depends on HAS_IOPORT
  1665. help
  1666. Say Y here to enable support for integrated infrared receiver
  1667. /transceiver made by Nuvoton (formerly Winbond). This chip is
  1668. @@ -302,6 +306,7 @@ config IR_STREAMZAP
  1669. config IR_WINBOND_CIR
  1670. tristate "Winbond IR remote control"
  1671. depends on (X86 && PNP) || COMPILE_TEST
  1672. + depends on HAS_IOPORT
  1673. select NEW_LEDS
  1674. select LEDS_CLASS
  1675. select BITREVERSE
  1676. @@ -430,6 +435,7 @@ config IR_SUNXI
  1677.  
  1678. config IR_SERIAL
  1679. tristate "Homebrew Serial Port Receiver"
  1680. + depends on HAS_IOPORT
  1681. help
  1682. Say Y if you want to use Homebrew Serial Port Receivers and
  1683. Transceivers.
  1684. @@ -445,6 +451,7 @@ config IR_SERIAL_TRANSMITTER
  1685.  
  1686. config IR_SIR
  1687. tristate "Built-in SIR IrDA port"
  1688. + depends on HAS_IOPORT
  1689. help
  1690. Say Y if you want to use a IrDA SIR port Transceivers.
  1691.  
  1692. diff --git a/drivers/message/fusion/Kconfig b/drivers/message/fusion/Kconfig
  1693. index a3d0288fd0e2..cec5995e1911 100644
  1694. --- a/drivers/message/fusion/Kconfig
  1695. +++ b/drivers/message/fusion/Kconfig
  1696. @@ -2,7 +2,7 @@
  1697.  
  1698. menuconfig FUSION
  1699. bool "Fusion MPT device support"
  1700. - depends on PCI
  1701. + depends on LEGACY_PCI
  1702. help
  1703. Say Y here to get to see options for Fusion Message
  1704. Passing Technology (MPT) drivers.
  1705. @@ -14,7 +14,7 @@ if FUSION
  1706.  
  1707. config FUSION_SPI
  1708. tristate "Fusion MPT ScsiHost drivers for SPI"
  1709. - depends on PCI && SCSI
  1710. + depends on LEGACY_PCI && SCSI
  1711. select SCSI_SPI_ATTRS
  1712. help
  1713. SCSI HOST support for a parallel SCSI host adapters.
  1714. @@ -29,7 +29,7 @@ config FUSION_SPI
  1715.  
  1716. config FUSION_FC
  1717. tristate "Fusion MPT ScsiHost drivers for FC"
  1718. - depends on PCI && SCSI
  1719. + depends on LEGACY_PCI && SCSI
  1720. depends on SCSI_FC_ATTRS
  1721. help
  1722. SCSI HOST support for a Fiber Channel host adapters.
  1723. @@ -48,7 +48,7 @@ config FUSION_FC
  1724.  
  1725. config FUSION_SAS
  1726. tristate "Fusion MPT ScsiHost drivers for SAS"
  1727. - depends on PCI && SCSI
  1728. + depends on LEGACY_PCI && SCSI
  1729. select SCSI_SAS_ATTRS
  1730. help
  1731. SCSI HOST support for a SAS host adapters.
  1732. diff --git a/drivers/misc/altera-stapl/Makefile b/drivers/misc/altera-stapl/Makefile
  1733. index dd0f8189666b..90f18e7bf9b0 100644
  1734. --- a/drivers/misc/altera-stapl/Makefile
  1735. +++ b/drivers/misc/altera-stapl/Makefile
  1736. @@ -1,4 +1,5 @@
  1737. # SPDX-License-Identifier: GPL-2.0-only
  1738. -altera-stapl-objs = altera-lpt.o altera-jtag.o altera-comp.o altera.o
  1739. +altera-stapl-y = altera-jtag.o altera-comp.o altera.o
  1740. +altera-stapl-$(CONFIG_HAS_IOPORT) += altera-lpt.o
  1741.  
  1742. obj-$(CONFIG_ALTERA_STAPL) += altera-stapl.o
  1743. diff --git a/drivers/misc/altera-stapl/altera.c b/drivers/misc/altera-stapl/altera.c
  1744. index 92c0611034b0..c7ae64de8bb4 100644
  1745. --- a/drivers/misc/altera-stapl/altera.c
  1746. +++ b/drivers/misc/altera-stapl/altera.c
  1747. @@ -2431,6 +2431,10 @@ int altera_init(struct altera_config *config, const struct firmware *fw)
  1748.  
  1749. astate->config = config;
  1750. if (!astate->config->jtag_io) {
  1751. + if (!IS_ENABLED(CONFIG_HAS_IOPORT)) {
  1752. + retval = -ENODEV;
  1753. + goto free_state;
  1754. + }
  1755. dprintk("%s: using byteblaster!\n", __func__);
  1756. astate->config->jtag_io = netup_jtag_io_lpt;
  1757. }
  1758. @@ -2505,7 +2509,7 @@ int altera_init(struct altera_config *config, const struct firmware *fw)
  1759.  
  1760. } else if (exec_result)
  1761. printk(KERN_ERR "%s: error %d\n", __func__, exec_result);
  1762. -
  1763. +free_state:
  1764. kfree(astate);
  1765. free_value:
  1766. kfree(value);
  1767. diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
  1768. index 6dccd68a99d3..7a84b0765289 100644
  1769. --- a/drivers/net/Kconfig
  1770. +++ b/drivers/net/Kconfig
  1771. @@ -458,7 +458,7 @@ source "drivers/net/ipa/Kconfig"
  1772.  
  1773. config NET_SB1000
  1774. tristate "General Instruments Surfboard 1000"
  1775. - depends on PNP
  1776. + depends on ISAPNP
  1777. help
  1778. This is a driver for the General Instrument (also known as
  1779. NextLevel) SURFboard 1000 internal
  1780. diff --git a/drivers/net/arcnet/Kconfig b/drivers/net/arcnet/Kconfig
  1781. index a51b9dab6d3a..b8038287c4f2 100644
  1782. --- a/drivers/net/arcnet/Kconfig
  1783. +++ b/drivers/net/arcnet/Kconfig
  1784. @@ -4,7 +4,7 @@
  1785. #
  1786.  
  1787. menuconfig ARCNET
  1788. - depends on NETDEVICES && (ISA || PCI || PCMCIA)
  1789. + depends on NETDEVICES && (ISA || LEGACY_PCI || PCMCIA)
  1790. tristate "ARCnet support"
  1791. help
  1792. If you have a network card of this type, say Y and check out the
  1793. diff --git a/drivers/net/can/cc770/Kconfig b/drivers/net/can/cc770/Kconfig
  1794. index 9ef1359319f0..467ef19de1c1 100644
  1795. --- a/drivers/net/can/cc770/Kconfig
  1796. +++ b/drivers/net/can/cc770/Kconfig
  1797. @@ -7,6 +7,7 @@ if CAN_CC770
  1798.  
  1799. config CAN_CC770_ISA
  1800. tristate "ISA Bus based legacy CC770 driver"
  1801. + depends on ISA
  1802. help
  1803. This driver adds legacy support for CC770 and AN82527 chips
  1804. connected to the ISA bus using I/O port, memory mapped or
  1805. diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
  1806. index 110071b26921..be1943a27ed0 100644
  1807. --- a/drivers/net/can/sja1000/Kconfig
  1808. +++ b/drivers/net/can/sja1000/Kconfig
  1809. @@ -87,6 +87,7 @@ config CAN_PLX_PCI
  1810.  
  1811. config CAN_SJA1000_ISA
  1812. tristate "ISA Bus based legacy SJA1000 driver"
  1813. + depends on ISA
  1814. help
  1815. This driver adds legacy support for SJA1000 chips connected to
  1816. the ISA bus using I/O port, memory mapped or indirect access.
  1817. diff --git a/drivers/net/ethernet/8390/Kconfig b/drivers/net/ethernet/8390/Kconfig
  1818. index a4130e643342..0fa43943ea74 100644
  1819. --- a/drivers/net/ethernet/8390/Kconfig
  1820. +++ b/drivers/net/ethernet/8390/Kconfig
  1821. @@ -117,7 +117,7 @@ config NE2000
  1822.  
  1823. config NE2K_PCI
  1824. tristate "PCI NE2000 and clones support (see help)"
  1825. - depends on PCI
  1826. + depends on LEGACY_PCI
  1827. select CRC32
  1828. help
  1829. This driver is for NE2000 compatible PCI cards. It will not work
  1830. diff --git a/drivers/net/ethernet/amd/Kconfig b/drivers/net/ethernet/amd/Kconfig
  1831. index c6a3abec86f5..dc7841f9a399 100644
  1832. --- a/drivers/net/ethernet/amd/Kconfig
  1833. +++ b/drivers/net/ethernet/amd/Kconfig
  1834. @@ -56,7 +56,7 @@ config LANCE
  1835.  
  1836. config PCNET32
  1837. tristate "AMD PCnet32 PCI support"
  1838. - depends on PCI
  1839. + depends on LEGACY_PCI
  1840. select CRC32
  1841. select MII
  1842. help
  1843. diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
  1844. index c1d155690341..8ddf336224d4 100644
  1845. --- a/drivers/net/ethernet/intel/Kconfig
  1846. +++ b/drivers/net/ethernet/intel/Kconfig
  1847. @@ -18,7 +18,7 @@ if NET_VENDOR_INTEL
  1848.  
  1849. config E100
  1850. tristate "Intel(R) PRO/100+ support"
  1851. - depends on PCI
  1852. + depends on LEGACY_PCI
  1853. select MII
  1854. help
  1855. This driver supports Intel(R) PRO/100 family of adapters.
  1856. @@ -41,7 +41,7 @@ config E100
  1857.  
  1858. config E1000
  1859. tristate "Intel(R) PRO/1000 Gigabit Ethernet support"
  1860. - depends on PCI
  1861. + depends on LEGACY_PCI
  1862. help
  1863. This driver supports Intel(R) PRO/1000 gigabit ethernet family of
  1864. adapters. For more information on how to identify your adapter, go
  1865. diff --git a/drivers/net/ethernet/sis/Kconfig b/drivers/net/ethernet/sis/Kconfig
  1866. index 775d76d9890e..bd1b1b81b0e8 100644
  1867. --- a/drivers/net/ethernet/sis/Kconfig
  1868. +++ b/drivers/net/ethernet/sis/Kconfig
  1869. @@ -6,7 +6,7 @@
  1870. config NET_VENDOR_SIS
  1871. bool "Silicon Integrated Systems (SiS) devices"
  1872. default y
  1873. - depends on PCI
  1874. + depends on LEGACY_PCI
  1875. help
  1876. If you have a network (Ethernet) card belonging to this class, say Y.
  1877.  
  1878. @@ -19,7 +19,7 @@ if NET_VENDOR_SIS
  1879.  
  1880. config SIS900
  1881. tristate "SiS 900/7016 PCI Fast Ethernet Adapter support"
  1882. - depends on PCI
  1883. + depends on LEGACY_PCI
  1884. select CRC32
  1885. select MII
  1886. help
  1887. @@ -35,7 +35,7 @@ config SIS900
  1888.  
  1889. config SIS190
  1890. tristate "SiS190/SiS191 gigabit ethernet support"
  1891. - depends on PCI
  1892. + depends on LEGACY_PCI
  1893. select CRC32
  1894. select MII
  1895. help
  1896. diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
  1897. index affcf92cd3aa..8b1d67b00e68 100644
  1898. --- a/drivers/net/ethernet/ti/Kconfig
  1899. +++ b/drivers/net/ethernet/ti/Kconfig
  1900. @@ -6,7 +6,7 @@
  1901. config NET_VENDOR_TI
  1902. bool "Texas Instruments (TI) devices"
  1903. default y
  1904. - depends on PCI || EISA || AR7 || ARCH_DAVINCI || ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3
  1905. + depends on LEGACY_PCI || EISA || AR7 || ARCH_DAVINCI || ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3
  1906. help
  1907. If you have a network (Ethernet) card belonging to this class, say Y.
  1908.  
  1909. @@ -159,7 +159,7 @@ config TI_KEYSTONE_NETCP_ETHSS
  1910.  
  1911. config TLAN
  1912. tristate "TI ThunderLAN support"
  1913. - depends on (PCI || EISA)
  1914. + depends on (LEGACY_PCI || EISA)
  1915. help
  1916. If you have a PCI Ethernet network card based on the ThunderLAN chip
  1917. which is supported by this driver, say Y here.
  1918. diff --git a/drivers/net/ethernet/via/Kconfig b/drivers/net/ethernet/via/Kconfig
  1919. index da287ef65be7..25add3d64859 100644
  1920. --- a/drivers/net/ethernet/via/Kconfig
  1921. +++ b/drivers/net/ethernet/via/Kconfig
  1922. @@ -18,8 +18,9 @@ if NET_VENDOR_VIA
  1923.  
  1924. config VIA_RHINE
  1925. tristate "VIA Rhine support"
  1926. - depends on PCI || (OF_IRQ && GENERIC_PCI_IOMAP)
  1927. - depends on PCI || ARCH_VT8500 || COMPILE_TEST
  1928. + depends on LEGACY_PCI || (OF_IRQ && GENERIC_PCI_IOMAP)
  1929. + depends on LEGACY_PCI || ARCH_VT8500 || COMPILE_TEST
  1930. + depends on HAS_IOPORT
  1931. depends on HAS_DMA
  1932. select CRC32
  1933. select MII
  1934. diff --git a/drivers/net/fddi/Kconfig b/drivers/net/fddi/Kconfig
  1935. index 846bf41c2717..1753c08d6423 100644
  1936. --- a/drivers/net/fddi/Kconfig
  1937. +++ b/drivers/net/fddi/Kconfig
  1938. @@ -5,7 +5,7 @@
  1939.  
  1940. config FDDI
  1941. tristate "FDDI driver support"
  1942. - depends on PCI || EISA || TC
  1943. + depends on LEGACY_PCI || EISA || TC
  1944. help
  1945. Fiber Distributed Data Interface is a high speed local area network
  1946. design; essentially a replacement for high speed Ethernet. FDDI can
  1947. @@ -29,7 +29,7 @@ config DEFZA
  1948.  
  1949. config DEFXX
  1950. tristate "Digital DEFTA/DEFEA/DEFPA adapter support"
  1951. - depends on FDDI && (PCI || EISA || TC)
  1952. + depends on FDDI && (LEGACY_PCI || EISA || TC)
  1953. help
  1954. This is support for the DIGITAL series of TURBOchannel (DEFTA),
  1955. EISA (DEFEA) and PCI (DEFPA) controllers which can connect you
  1956. diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig
  1957. index f4843f9672c1..393d7dcdfbdb 100644
  1958. --- a/drivers/net/hamradio/Kconfig
  1959. +++ b/drivers/net/hamradio/Kconfig
  1960. @@ -116,7 +116,7 @@ config SCC_TRXECHO
  1961.  
  1962. config BAYCOM_SER_FDX
  1963. tristate "BAYCOM ser12 fullduplex driver for AX.25"
  1964. - depends on AX25 && !S390
  1965. + depends on AX25 && HAS_IOPORT
  1966. select CRC_CCITT
  1967. help
  1968. This is one of two drivers for Baycom style simple amateur radio
  1969. @@ -136,7 +136,7 @@ config BAYCOM_SER_FDX
  1970.  
  1971. config BAYCOM_SER_HDX
  1972. tristate "BAYCOM ser12 halfduplex driver for AX.25"
  1973. - depends on AX25 && !S390
  1974. + depends on AX25 && HAS_IOPORT
  1975. select CRC_CCITT
  1976. help
  1977. This is one of two drivers for Baycom style simple amateur radio
  1978. @@ -184,7 +184,7 @@ config BAYCOM_EPP
  1979.  
  1980. config YAM
  1981. tristate "YAM driver for AX.25"
  1982. - depends on AX25 && !S390
  1983. + depends on AX25 && HAS_IOPORT
  1984. help
  1985. The YAM is a modem for packet radio which connects to the serial
  1986. port and includes some of the functions of a Terminal Node
  1987. diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
  1988. index a187c814a4a6..a8f1aa6bfb89 100644
  1989. --- a/drivers/net/wan/Kconfig
  1990. +++ b/drivers/net/wan/Kconfig
  1991. @@ -250,7 +250,7 @@ config C101
  1992.  
  1993. config FARSYNC
  1994. tristate "FarSync T-Series support"
  1995. - depends on HDLC && PCI
  1996. + depends on HDLC && LEGACY_PCI
  1997. help
  1998. Support for the FarSync T-Series X.21 (and V.35/V.24) cards by
  1999. FarSite Communications Ltd.
  2000. diff --git a/drivers/net/wireless/atmel/Kconfig b/drivers/net/wireless/atmel/Kconfig
  2001. index ca45a1021cf4..9baa4a19dd38 100644
  2002. --- a/drivers/net/wireless/atmel/Kconfig
  2003. +++ b/drivers/net/wireless/atmel/Kconfig
  2004. @@ -14,7 +14,7 @@ if WLAN_VENDOR_ATMEL
  2005.  
  2006. config ATMEL
  2007. tristate "Atmel at76c50x chipset 802.11b support"
  2008. - depends on CFG80211 && (PCI || PCMCIA)
  2009. + depends on CFG80211 && (LEGACY_PCI || PCMCIA)
  2010. select WIRELESS_EXT
  2011. select WEXT_PRIV
  2012. select FW_LOADER
  2013. @@ -32,7 +32,7 @@ config ATMEL
  2014.  
  2015. config PCI_ATMEL
  2016. tristate "Atmel at76c506 PCI cards"
  2017. - depends on ATMEL && PCI
  2018. + depends on ATMEL && LEGACY_PCI
  2019. help
  2020. Enable support for PCI and mini-PCI cards containing the
  2021. Atmel at76c506 chip.
  2022. diff --git a/drivers/net/wireless/intersil/hostap/Kconfig b/drivers/net/wireless/intersil/hostap/Kconfig
  2023. index c865d3156cea..9bcd1c8546ff 100644
  2024. --- a/drivers/net/wireless/intersil/hostap/Kconfig
  2025. +++ b/drivers/net/wireless/intersil/hostap/Kconfig
  2026. @@ -56,7 +56,7 @@ config HOSTAP_FIRMWARE_NVRAM
  2027.  
  2028. config HOSTAP_PLX
  2029. tristate "Host AP driver for Prism2/2.5/3 in PLX9052 PCI adaptors"
  2030. - depends on PCI && HOSTAP
  2031. + depends on LEGACY_PCI && HOSTAP
  2032. help
  2033. Host AP driver's version for Prism2/2.5/3 PC Cards in PLX9052 based
  2034. PCI adaptors.
  2035. @@ -70,7 +70,7 @@ config HOSTAP_PLX
  2036.  
  2037. config HOSTAP_PCI
  2038. tristate "Host AP driver for Prism2.5 PCI adaptors"
  2039. - depends on PCI && HOSTAP
  2040. + depends on LEGACY_PCI && HOSTAP
  2041. help
  2042. Host AP driver's version for Prism2.5 PCI adaptors.
  2043.  
  2044. diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig
  2045. index e78a9f0302c7..d824f3069302 100644
  2046. --- a/drivers/parport/Kconfig
  2047. +++ b/drivers/parport/Kconfig
  2048. @@ -14,7 +14,6 @@ config ARCH_MIGHT_HAVE_PC_PARPORT
  2049.  
  2050. menuconfig PARPORT
  2051. tristate "Parallel port support"
  2052. - depends on HAS_IOMEM
  2053. help
  2054. If you want to use devices connected to your machine's parallel port
  2055. (the connector at the computer with 25 holes), e.g. printer, ZIP
  2056. @@ -43,6 +42,7 @@ if PARPORT
  2057. config PARPORT_PC
  2058. tristate "PC-style hardware"
  2059. depends on ARCH_MIGHT_HAVE_PC_PARPORT
  2060. + depends on HAS_IOPORT
  2061. help
  2062. You should say Y here if you have a PC-style parallel port. All
  2063. IBM PC compatible computers and some Alphas have PC-style
  2064. diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
  2065. index beb8d1f4fafe..308341728237 100644
  2066. --- a/drivers/pci/pci-sysfs.c
  2067. +++ b/drivers/pci/pci-sysfs.c
  2068. @@ -1076,6 +1076,7 @@ static int pci_mmap_resource_wc(struct file *filp, struct kobject *kobj,
  2069. return pci_mmap_resource(kobj, attr, vma, 1);
  2070. }
  2071.  
  2072. +#ifdef CONFIG_HAS_IOPORT
  2073. static ssize_t pci_resource_io(struct file *filp, struct kobject *kobj,
  2074. struct bin_attribute *attr, char *buf,
  2075. loff_t off, size_t count, bool write)
  2076. @@ -1134,6 +1135,21 @@ static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj,
  2077.  
  2078. return pci_resource_io(filp, kobj, attr, buf, off, count, true);
  2079. }
  2080. +#else
  2081. +static ssize_t pci_read_resource_io(struct file *filp, struct kobject *kobj,
  2082. + struct bin_attribute *attr, char *buf,
  2083. + loff_t off, size_t count)
  2084. +{
  2085. + return -ENXIO;
  2086. +}
  2087. +
  2088. +static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj,
  2089. + struct bin_attribute *attr, char *buf,
  2090. + loff_t off, size_t count)
  2091. +{
  2092. + return -ENXIO;
  2093. +}
  2094. +#endif
  2095.  
  2096. /**
  2097. * pci_remove_resource_files - cleanup resource files
  2098. diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
  2099. index dcb229de1acb..5cc0b01925ae 100644
  2100. --- a/drivers/pci/quirks.c
  2101. +++ b/drivers/pci/quirks.c
  2102. @@ -264,6 +264,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_1, quirk_isa_d
  2103. DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_dma_hangs);
  2104. DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs);
  2105.  
  2106. +#ifdef CONFIG_HAS_IOPORT
  2107. /*
  2108. * Intel NM10 "TigerPoint" LPC PM1a_STS.BM_STS must be clear
  2109. * for some HT machines to use C4 w/o hanging.
  2110. @@ -283,6 +284,7 @@ static void quirk_tigerpoint_bm_sts(struct pci_dev *dev)
  2111. }
  2112. }
  2113. DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGP_LPC, quirk_tigerpoint_bm_sts);
  2114. +#endif
  2115.  
  2116. /* Chipsets where PCI->PCI transfers vanish or hang */
  2117. static void quirk_nopcipci(struct pci_dev *dev)
  2118. diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
  2119. index 22865a111f0a..ba9306bcf647 100644
  2120. --- a/drivers/pcmcia/Kconfig
  2121. +++ b/drivers/pcmcia/Kconfig
  2122. @@ -5,7 +5,7 @@
  2123.  
  2124. menuconfig PCCARD
  2125. tristate "PCCard (PCMCIA/CardBus) support"
  2126. - depends on !UML
  2127. + depends on LEGACY_PCI || HAS_IOPORT
  2128. help
  2129. Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
  2130. computer. These are credit-card size devices such as network cards,
  2131. diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
  2132. index ccc23d8686e8..b43ef78e75d4 100644
  2133. --- a/drivers/platform/chrome/Kconfig
  2134. +++ b/drivers/platform/chrome/Kconfig
  2135. @@ -111,6 +111,7 @@ config CROS_EC_SPI
  2136. config CROS_EC_LPC
  2137. tristate "ChromeOS Embedded Controller (LPC)"
  2138. depends on CROS_EC && ACPI && (X86 || COMPILE_TEST)
  2139. + depends on HAS_IOPORT
  2140. help
  2141. If you say Y here, you get support for talking to the ChromeOS EC
  2142. over an LPC bus, including the LPC Microchip EC (MEC) variant.
  2143. diff --git a/drivers/platform/chrome/wilco_ec/Kconfig b/drivers/platform/chrome/wilco_ec/Kconfig
  2144. index 49e8530ca0ac..d1648fb099ac 100644
  2145. --- a/drivers/platform/chrome/wilco_ec/Kconfig
  2146. +++ b/drivers/platform/chrome/wilco_ec/Kconfig
  2147. @@ -3,6 +3,7 @@ config WILCO_EC
  2148. tristate "ChromeOS Wilco Embedded Controller"
  2149. depends on X86 || COMPILE_TEST
  2150. depends on ACPI && CROS_EC_LPC && LEDS_CLASS
  2151. + depends on HAS_IOPORT
  2152. help
  2153. If you say Y here, you get support for talking to the ChromeOS
  2154. Wilco EC over an eSPI bus. This uses a simple byte-level protocol
  2155. diff --git a/drivers/pnp/isapnp/Kconfig b/drivers/pnp/isapnp/Kconfig
  2156. index d0479a563123..79bd48f1dd94 100644
  2157. --- a/drivers/pnp/isapnp/Kconfig
  2158. +++ b/drivers/pnp/isapnp/Kconfig
  2159. @@ -4,7 +4,7 @@
  2160. #
  2161. config ISAPNP
  2162. bool "ISA Plug and Play support"
  2163. - depends on ISA || COMPILE_TEST
  2164. + depends on ISA || (HAS_IOPORT && COMPILE_TEST)
  2165. help
  2166. Say Y here if you would like support for ISA Plug and Play devices.
  2167. Some information is in <file:Documentation/driver-api/isapnp.rst>.
  2168. diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
  2169. index 4d1192062508..dbd3c0bbe30c 100644
  2170. --- a/drivers/power/reset/Kconfig
  2171. +++ b/drivers/power/reset/Kconfig
  2172. @@ -151,6 +151,7 @@ config POWER_RESET_OXNAS
  2173. config POWER_RESET_PIIX4_POWEROFF
  2174. tristate "Intel PIIX4 power-off driver"
  2175. depends on PCI
  2176. + depends on HAS_IOPORT
  2177. depends on MIPS || COMPILE_TEST
  2178. help
  2179. This driver supports powering off a system using the Intel PIIX4
  2180. diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
  2181. index 914497abeef9..9661459b8c75 100644
  2182. --- a/drivers/rtc/Kconfig
  2183. +++ b/drivers/rtc/Kconfig
  2184. @@ -949,6 +949,7 @@ comment "Platform RTC drivers"
  2185. config RTC_DRV_CMOS
  2186. tristate "PC-style 'CMOS'"
  2187. depends on X86 || ARM || PPC || MIPS || SPARC64
  2188. + depends on HAS_IOPORT
  2189. default y if X86
  2190. select RTC_MC146818_LIB
  2191. help
  2192. @@ -969,6 +970,7 @@ config RTC_DRV_CMOS
  2193. config RTC_DRV_ALPHA
  2194. bool "Alpha PC-style CMOS"
  2195. depends on ALPHA
  2196. + depends on HAS_IOPORT
  2197. select RTC_MC146818_LIB
  2198. default y
  2199. help
  2200. @@ -1186,7 +1188,7 @@ config RTC_DRV_MSM6242
  2201.  
  2202. config RTC_DRV_BQ4802
  2203. tristate "TI BQ4802"
  2204. - depends on HAS_IOMEM
  2205. + depends on HAS_IOMEM && HAS_IOPORT
  2206. help
  2207. If you say Y here you will get support for the TI
  2208. BQ4802 RTC chip.
  2209. diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
  2210. index 3d114be5b662..27356c2a4090 100644
  2211. --- a/drivers/scsi/Kconfig
  2212. +++ b/drivers/scsi/Kconfig
  2213. @@ -317,7 +317,7 @@ config SGIWD93_SCSI
  2214.  
  2215. config BLK_DEV_3W_XXXX_RAID
  2216. tristate "3ware 5/6/7/8xxx ATA-RAID support"
  2217. - depends on PCI && SCSI
  2218. + depends on LEGACY_PCI && SCSI
  2219. help
  2220. 3ware is the only hardware ATA-Raid product in Linux to date.
  2221. This card is 2,4, or 8 channel master mode support only.
  2222. @@ -364,7 +364,7 @@ config SCSI_3W_SAS
  2223.  
  2224. config SCSI_ACARD
  2225. tristate "ACARD SCSI support"
  2226. - depends on PCI && SCSI
  2227. + depends on LEGACY_PCI && SCSI
  2228. help
  2229. This driver supports the ACARD SCSI host adapter.
  2230. Support Chip <ATP870 ATP876 ATP880 ATP885>
  2231. @@ -456,7 +456,7 @@ config SCSI_DPT_I2O
  2232. config SCSI_ADVANSYS
  2233. tristate "AdvanSys SCSI support"
  2234. depends on SCSI
  2235. - depends on ISA || EISA || PCI
  2236. + depends on ISA || EISA || LEGACY_PCI
  2237. depends on ISA_DMA_API || !ISA
  2238. help
  2239. This is a driver for all SCSI host adapters manufactured by
  2240. @@ -626,7 +626,7 @@ config SCSI_SNIC_DEBUG_FS
  2241.  
  2242. config SCSI_DMX3191D
  2243. tristate "DMX3191D SCSI support"
  2244. - depends on PCI && SCSI
  2245. + depends on LEGACY_PCI && SCSI
  2246. select SCSI_SPI_ATTRS
  2247. help
  2248. This is support for Domex DMX3191D SCSI Host Adapters.
  2249. @@ -640,7 +640,7 @@ config SCSI_FDOMAIN
  2250.  
  2251. config SCSI_FDOMAIN_PCI
  2252. tristate "Future Domain TMC-3260/AHA-2920A PCI SCSI support"
  2253. - depends on PCI && SCSI
  2254. + depends on LEGACY_PCI && SCSI
  2255. select SCSI_FDOMAIN
  2256. help
  2257. This is support for Future Domain's PCI SCSI host adapters (TMC-3260)
  2258. @@ -693,7 +693,7 @@ config SCSI_GENERIC_NCR5380
  2259.  
  2260. config SCSI_IPS
  2261. tristate "IBM ServeRAID support"
  2262. - depends on PCI && SCSI
  2263. + depends on LEGACY_PCI && SCSI
  2264. help
  2265. This is support for the IBM ServeRAID hardware RAID controllers.
  2266. See <http://www.developer.ibm.com/welcome/netfinity/serveraid.html>
  2267. @@ -753,7 +753,7 @@ config SCSI_IBMVFC_TRACE
  2268.  
  2269. config SCSI_INITIO
  2270. tristate "Initio 9100U(W) support"
  2271. - depends on PCI && SCSI
  2272. + depends on LEGACY_PCI && SCSI
  2273. help
  2274. This is support for the Initio 91XXU(W) SCSI host adapter. Please
  2275. read the SCSI-HOWTO, available from
  2276. @@ -764,7 +764,7 @@ config SCSI_INITIO
  2277.  
  2278. config SCSI_INIA100
  2279. tristate "Initio INI-A100U2W support"
  2280. - depends on PCI && SCSI
  2281. + depends on LEGACY_PCI && SCSI
  2282. help
  2283. This is support for the Initio INI-A100U2W SCSI host adapter.
  2284. Please read the SCSI-HOWTO, available from
  2285. @@ -776,6 +776,7 @@ config SCSI_INIA100
  2286. config SCSI_PPA
  2287. tristate "IOMEGA parallel port (ppa - older drives)"
  2288. depends on SCSI && PARPORT_PC
  2289. + depends on HAS_IOPORT
  2290. help
  2291. This driver supports older versions of IOMEGA's parallel port ZIP
  2292. drive (a 100 MB removable media device).
  2293. @@ -1113,7 +1114,7 @@ config SCSI_QLOGIC_FAS
  2294.  
  2295. config SCSI_QLOGIC_1280
  2296. tristate "Qlogic QLA 1240/1x80/1x160 SCSI support"
  2297. - depends on PCI && SCSI
  2298. + depends on LEGACY_PCI && SCSI
  2299. help
  2300. Say Y if you have a QLogic ISP1240/1x80/1x160 SCSI host adapter.
  2301.  
  2302. @@ -1168,7 +1169,7 @@ config SCSI_SIM710
  2303.  
  2304. config SCSI_DC395x
  2305. tristate "Tekram DC395(U/UW/F) and DC315(U) SCSI support"
  2306. - depends on PCI && SCSI
  2307. + depends on LEGACY_PCI && SCSI
  2308. select SCSI_SPI_ATTRS
  2309. help
  2310. This driver supports PCI SCSI host adapters based on the ASIC
  2311. diff --git a/drivers/scsi/aic7xxx/Kconfig.aic79xx b/drivers/scsi/aic7xxx/Kconfig.aic79xx
  2312. index a47dbd500e9a..64332cc73ea0 100644
  2313. --- a/drivers/scsi/aic7xxx/Kconfig.aic79xx
  2314. +++ b/drivers/scsi/aic7xxx/Kconfig.aic79xx
  2315. @@ -5,7 +5,7 @@
  2316. #
  2317. config SCSI_AIC79XX
  2318. tristate "Adaptec AIC79xx U320 support"
  2319. - depends on PCI && SCSI
  2320. + depends on LEGACY_PCI && SCSI
  2321. select SCSI_SPI_ATTRS
  2322. help
  2323. This driver supports all of Adaptec's Ultra 320 PCI-X
  2324. diff --git a/drivers/scsi/aic7xxx/Kconfig.aic7xxx b/drivers/scsi/aic7xxx/Kconfig.aic7xxx
  2325. index 0cfd92ce750a..3fa5dc1d1186 100644
  2326. --- a/drivers/scsi/aic7xxx/Kconfig.aic7xxx
  2327. +++ b/drivers/scsi/aic7xxx/Kconfig.aic7xxx
  2328. @@ -5,7 +5,7 @@
  2329. #
  2330. config SCSI_AIC7XXX
  2331. tristate "Adaptec AIC7xxx Fast -> U160 support"
  2332. - depends on (PCI || EISA) && SCSI
  2333. + depends on (LEGACY_PCI || EISA) && SCSI
  2334. select SCSI_SPI_ATTRS
  2335. help
  2336. This driver supports all of Adaptec's Fast through Ultra 160 PCI
  2337. diff --git a/drivers/scsi/aic94xx/Kconfig b/drivers/scsi/aic94xx/Kconfig
  2338. index 71931c371b1c..b0cbf65dbe5b 100644
  2339. --- a/drivers/scsi/aic94xx/Kconfig
  2340. +++ b/drivers/scsi/aic94xx/Kconfig
  2341. @@ -8,7 +8,7 @@
  2342.  
  2343. config SCSI_AIC94XX
  2344. tristate "Adaptec AIC94xx SAS/SATA support"
  2345. - depends on PCI
  2346. + depends on LEGACY_PCI
  2347. select SCSI_SAS_LIBSAS
  2348. select FW_LOADER
  2349. help
  2350. diff --git a/drivers/scsi/megaraid/Kconfig.megaraid b/drivers/scsi/megaraid/Kconfig.megaraid
  2351. index 2adc2afd9f91..4ec46aede490 100644
  2352. --- a/drivers/scsi/megaraid/Kconfig.megaraid
  2353. +++ b/drivers/scsi/megaraid/Kconfig.megaraid
  2354. @@ -67,7 +67,7 @@ config MEGARAID_MAILBOX
  2355.  
  2356. config MEGARAID_LEGACY
  2357. tristate "LSI Logic Legacy MegaRAID Driver"
  2358. - depends on PCI && SCSI
  2359. + depends on LEGACY_PCI && SCSI
  2360. help
  2361. This driver supports the LSI MegaRAID 418, 428, 438, 466, 762, 490
  2362. and 467 SCSI host adapters. This driver also support the all U320
  2363. diff --git a/drivers/scsi/mvsas/Kconfig b/drivers/scsi/mvsas/Kconfig
  2364. index 79812b80743b..f41f3f4a9f34 100644
  2365. --- a/drivers/scsi/mvsas/Kconfig
  2366. +++ b/drivers/scsi/mvsas/Kconfig
  2367. @@ -9,7 +9,7 @@
  2368.  
  2369. config SCSI_MVSAS
  2370. tristate "Marvell 88SE64XX/88SE94XX SAS/SATA support"
  2371. - depends on PCI
  2372. + depends on LEGACY_PCI
  2373. select SCSI_SAS_LIBSAS
  2374. select FW_LOADER
  2375. help
  2376. diff --git a/drivers/scsi/qla2xxx/Kconfig b/drivers/scsi/qla2xxx/Kconfig
  2377. index 802c373fd6d9..93afb73858ce 100644
  2378. --- a/drivers/scsi/qla2xxx/Kconfig
  2379. +++ b/drivers/scsi/qla2xxx/Kconfig
  2380. @@ -1,7 +1,7 @@
  2381. # SPDX-License-Identifier: GPL-2.0-only
  2382. config SCSI_QLA_FC
  2383. tristate "QLogic QLA2XXX Fibre Channel Support"
  2384. - depends on PCI && SCSI
  2385. + depends on LEGACY_PCI && SCSI
  2386. depends on SCSI_FC_ATTRS
  2387. depends on NVME_FC || !NVME_FC
  2388. select FW_LOADER
  2389. diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
  2390. index db404323a3b3..53cdbb040a87 100644
  2391. --- a/drivers/spi/Kconfig
  2392. +++ b/drivers/spi/Kconfig
  2393. @@ -204,6 +204,7 @@ config SPI_BITBANG
  2394. config SPI_BUTTERFLY
  2395. tristate "Parallel port adapter for AVR Butterfly (DEVELOPMENT)"
  2396. depends on PARPORT
  2397. + depends on HAS_IOPORT
  2398. select SPI_BITBANG
  2399. help
  2400. This uses a custom parallel port cable to connect to an AVR
  2401. diff --git a/drivers/staging/kpc2000/Kconfig b/drivers/staging/kpc2000/Kconfig
  2402. index 897965359fcb..cd7a0af04f2f 100644
  2403. --- a/drivers/staging/kpc2000/Kconfig
  2404. +++ b/drivers/staging/kpc2000/Kconfig
  2405. @@ -3,7 +3,7 @@
  2406. config KPC2000
  2407. bool "Daktronics KPC Device support"
  2408. select MFD_CORE
  2409. - depends on PCI
  2410. + depends on LEGACY_PCI
  2411. depends on UIO
  2412. help
  2413. Select this if you wish to use the Daktronics KPC PCI devices
  2414. diff --git a/drivers/staging/sm750fb/Kconfig b/drivers/staging/sm750fb/Kconfig
  2415. index 8c0d8a873d5b..d332f912b964 100644
  2416. --- a/drivers/staging/sm750fb/Kconfig
  2417. +++ b/drivers/staging/sm750fb/Kconfig
  2418. @@ -1,7 +1,7 @@
  2419. # SPDX-License-Identifier: GPL-2.0
  2420. config FB_SM750
  2421. tristate "Silicon Motion SM750 framebuffer support"
  2422. - depends on FB && PCI
  2423. + depends on FB && LEGACY_PCI
  2424. select FB_MODE_HELPERS
  2425. select FB_CFB_FILLRECT
  2426. select FB_CFB_COPYAREA
  2427. diff --git a/drivers/staging/vt6655/Kconfig b/drivers/staging/vt6655/Kconfig
  2428. index d1cd5de46dcf..dd236f54d3a2 100644
  2429. --- a/drivers/staging/vt6655/Kconfig
  2430. +++ b/drivers/staging/vt6655/Kconfig
  2431. @@ -1,6 +1,6 @@
  2432. # SPDX-License-Identifier: GPL-2.0
  2433. config VT6655
  2434. tristate "VIA Technologies VT6655 support"
  2435. - depends on PCI && MAC80211 && m
  2436. + depends on LEGACY_PCI && MAC80211 && m
  2437. help
  2438. This is a vendor-written driver for VIA VT6655.
  2439. diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
  2440. index f6a7fd6d3bb6..b0a934b28386 100644
  2441. --- a/drivers/tty/Kconfig
  2442. +++ b/drivers/tty/Kconfig
  2443. @@ -204,7 +204,7 @@ config MOXA_INTELLIO
  2444.  
  2445. config MOXA_SMARTIO
  2446. tristate "Moxa SmartIO support v. 2.0"
  2447. - depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
  2448. + depends on SERIAL_NONSTANDARD && (LEGACY_PCI || EISA || ISA)
  2449. help
  2450. Say Y here if you have a Moxa SmartIO multiport serial card and/or
  2451. want to help develop a new version of this driver.
  2452. diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
  2453. index c171ce6db691..24bd1e6c24c6 100644
  2454. --- a/drivers/tty/serial/8250/8250_early.c
  2455. +++ b/drivers/tty/serial/8250/8250_early.c
  2456. @@ -48,8 +48,10 @@ static unsigned int serial8250_early_in(struct uart_port *port, int offset)
  2457. return readl(port->membase + offset);
  2458. case UPIO_MEM32BE:
  2459. return ioread32be(port->membase + offset);
  2460. +#ifdef CONFIG_HAS_IOPORT
  2461. case UPIO_PORT:
  2462. return inb(port->iobase + offset);
  2463. +#endif
  2464. case UPIO_AU:
  2465. return port->serial_in(port, reg_offset);
  2466. default:
  2467. @@ -75,9 +77,11 @@ static void serial8250_early_out(struct uart_port *port, int offset, int value)
  2468. case UPIO_MEM32BE:
  2469. iowrite32be(value, port->membase + offset);
  2470. break;
  2471. +#ifdef CONFIG_HAS_IOPORT
  2472. case UPIO_PORT:
  2473. outb(value, port->iobase + offset);
  2474. break;
  2475. +#endif
  2476. case UPIO_AU:
  2477. port->serial_out(port, reg_offset, value);
  2478. break;
  2479. diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
  2480. index 780cc99732b6..ac62a16cfd98 100644
  2481. --- a/drivers/tty/serial/8250/8250_pci.c
  2482. +++ b/drivers/tty/serial/8250/8250_pci.c
  2483. @@ -104,6 +104,9 @@ setup_port(struct serial_private *priv, struct uart_8250_port *port,
  2484. port->port.membase = pcim_iomap_table(dev)[bar] + offset;
  2485. port->port.regshift = regshift;
  2486. } else {
  2487. + if (!IS_ENABLED(CONFIG_HAS_IOPORT))
  2488. + return -ENXIO;
  2489. +
  2490. port->port.iotype = UPIO_PORT;
  2491. port->port.iobase = pci_resource_start(dev, bar) + offset;
  2492. port->port.mapbase = 0;
  2493. @@ -869,6 +872,7 @@ static int pci_netmos_init(struct pci_dev *dev)
  2494. return num_serial;
  2495. }
  2496.  
  2497. +#ifdef CONFIG_HAS_IOPORT
  2498. /*
  2499. * These chips are available with optionally one parallel port and up to
  2500. * two serial ports. Unfortunately they all have the same product id.
  2501. @@ -999,6 +1003,7 @@ static void pci_ite887x_exit(struct pci_dev *dev)
  2502. ioport &= 0xffff;
  2503. release_region(ioport, ITE_887x_IOSIZE);
  2504. }
  2505. +#endif
  2506.  
  2507. /*
  2508. * EndRun Technologies.
  2509. @@ -1096,7 +1101,7 @@ struct quatech_feature {
  2510. #define QOPR_CLOCK_X8 0x0003
  2511. #define QOPR_CLOCK_RATE_MASK 0x0003
  2512.  
  2513. -
  2514. +#ifdef CONFIG_HAS_IOPORT
  2515. static struct quatech_feature quatech_cards[] = {
  2516. { PCI_DEVICE_ID_QUATECH_QSC100, 1 },
  2517. { PCI_DEVICE_ID_QUATECH_DSC100, 1 },
  2518. @@ -1322,6 +1327,7 @@ static int pci_quatech_setup(struct serial_private *priv,
  2519. static void pci_quatech_exit(struct pci_dev *dev)
  2520. {
  2521. }
  2522. +#endif
  2523.  
  2524. static int pci_default_setup(struct serial_private *priv,
  2525. const struct pciserial_board *board,
  2526. @@ -1697,6 +1703,7 @@ static int skip_tx_en_setup(struct serial_private *priv,
  2527. return pci_default_setup(priv, board, port, idx);
  2528. }
  2529.  
  2530. +#ifdef CONFIG_HAS_IOPORT
  2531. static void kt_handle_break(struct uart_port *p)
  2532. {
  2533. struct uart_8250_port *up = up_to_u8250p(p);
  2534. @@ -1740,6 +1747,7 @@ static int kt_serial_setup(struct serial_private *priv,
  2535. port->port.handle_break = kt_handle_break;
  2536. return skip_tx_en_setup(priv, board, port, idx);
  2537. }
  2538. +#endif
  2539.  
  2540. static int pci_eg20t_init(struct pci_dev *dev)
  2541. {
  2542. @@ -1770,6 +1778,7 @@ pci_wch_ch355_setup(struct serial_private *priv,
  2543. return pci_default_setup(priv, board, port, idx);
  2544. }
  2545.  
  2546. +#ifdef CONFIG_HAS_IOPORT
  2547. static int
  2548. pci_wch_ch38x_setup(struct serial_private *priv,
  2549. const struct pciserial_board *board,
  2550. @@ -1811,7 +1820,7 @@ static void pci_wch_ch38x_exit(struct pci_dev *dev)
  2551. iobase = pci_resource_start(dev, 0);
  2552. outb(0x0, iobase + CH384_XINT_ENABLE_REG);
  2553. }
  2554. -
  2555. +#endif
  2556.  
  2557. static int
  2558. pci_sunix_setup(struct serial_private *priv,
  2559. @@ -2050,6 +2059,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
  2560. .subdevice = PCI_ANY_ID,
  2561. .setup = ce4100_serial_setup,
  2562. },
  2563. +#ifdef CONFIG_HAS_IOPORT
  2564. {
  2565. .vendor = PCI_VENDOR_ID_INTEL,
  2566. .device = PCI_DEVICE_ID_INTEL_PATSBURG_KT,
  2567. @@ -2069,6 +2079,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
  2568. .setup = pci_default_setup,
  2569. .exit = pci_ite887x_exit,
  2570. },
  2571. +#endif
  2572. /*
  2573. * National Instruments
  2574. */
  2575. @@ -2189,6 +2200,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
  2576. .setup = pci_ni8430_setup,
  2577. .exit = pci_ni8430_exit,
  2578. },
  2579. +#ifdef CONFIG_HAS_IOPORT
  2580. /* Quatech */
  2581. {
  2582. .vendor = PCI_VENDOR_ID_QUATECH,
  2583. @@ -2199,6 +2211,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
  2584. .setup = pci_quatech_setup,
  2585. .exit = pci_quatech_exit,
  2586. },
  2587. +#endif
  2588. /*
  2589. * Panacom
  2590. */
  2591. @@ -2666,6 +2679,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
  2592. .subdevice = PCI_ANY_ID,
  2593. .setup = pci_wch_ch355_setup,
  2594. },
  2595. +#ifdef CONFIG_HAS_IOPORT
  2596. /* WCH CH382 2S card (16850 clone) */
  2597. {
  2598. .vendor = PCIE_VENDOR_ID_WCH,
  2599. @@ -2700,6 +2714,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
  2600. .exit = pci_wch_ch38x_exit,
  2601. .setup = pci_wch_ch38x_setup,
  2602. },
  2603. +#endif
  2604. /*
  2605. * ASIX devices with FIFO bug
  2606. */
  2607. diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
  2608. index fc5ab2032282..fcfb0923adae 100644
  2609. --- a/drivers/tty/serial/8250/8250_port.c
  2610. +++ b/drivers/tty/serial/8250/8250_port.c
  2611. @@ -379,6 +379,7 @@ static void au_serial_dl_write(struct uart_8250_port *up, int value)
  2612.  
  2613. #endif
  2614.  
  2615. +#ifdef CONFIG_HAS_IOPORT
  2616. static unsigned int hub6_serial_in(struct uart_port *p, int offset)
  2617. {
  2618. offset = offset << p->regshift;
  2619. @@ -392,6 +393,7 @@ static void hub6_serial_out(struct uart_port *p, int offset, int value)
  2620. outb(p->hub6 - 1 + offset, p->iobase);
  2621. outb(value, p->iobase + 1);
  2622. }
  2623. +#endif
  2624.  
  2625. static unsigned int mem_serial_in(struct uart_port *p, int offset)
  2626. {
  2627. @@ -441,6 +443,7 @@ static unsigned int mem32be_serial_in(struct uart_port *p, int offset)
  2628. return ioread32be(p->membase + offset);
  2629. }
  2630.  
  2631. +#ifdef CONFIG_HAS_IOPORT
  2632. static unsigned int io_serial_in(struct uart_port *p, int offset)
  2633. {
  2634. offset = offset << p->regshift;
  2635. @@ -452,6 +455,7 @@ static void io_serial_out(struct uart_port *p, int offset, int value)
  2636. offset = offset << p->regshift;
  2637. outb(value, p->iobase + offset);
  2638. }
  2639. +#endif
  2640.  
  2641. static int serial8250_default_handle_irq(struct uart_port *port);
  2642.  
  2643. @@ -463,10 +467,12 @@ static void set_io_from_upio(struct uart_port *p)
  2644. up->dl_write = default_serial_dl_write;
  2645.  
  2646. switch (p->iotype) {
  2647. +#ifdef CONFIG_HAS_IOPORT
  2648. case UPIO_HUB6:
  2649. p->serial_in = hub6_serial_in;
  2650. p->serial_out = hub6_serial_out;
  2651. break;
  2652. +#endif
  2653.  
  2654. case UPIO_MEM:
  2655. p->serial_in = mem_serial_in;
  2656. @@ -496,11 +502,12 @@ static void set_io_from_upio(struct uart_port *p)
  2657. up->dl_write = au_serial_dl_write;
  2658. break;
  2659. #endif
  2660. -
  2661. +#ifdef CONFIG_HAS_IOPORT
  2662. default:
  2663. p->serial_in = io_serial_in;
  2664. p->serial_out = io_serial_out;
  2665. break;
  2666. +#endif
  2667. }
  2668. /* Remember loaded iotype */
  2669. up->cur_iotype = p->iotype;
  2670. @@ -1370,17 +1377,20 @@ static void autoconfig_irq(struct uart_8250_port *up)
  2671. {
  2672. struct uart_port *port = &up->port;
  2673. unsigned char save_mcr, save_ier;
  2674. - unsigned char save_ICP = 0;
  2675. - unsigned int ICP = 0;
  2676. unsigned long irqs;
  2677. int irq;
  2678.  
  2679. +#ifdef CONFIG_SERIAL_8250_FOURPORT
  2680. + unsigned char save_ICP = 0;
  2681. + unsigned int ICP = 0;
  2682. +
  2683. if (port->flags & UPF_FOURPORT) {
  2684. ICP = (port->iobase & 0xfe0) | 0x1f;
  2685. save_ICP = inb_p(ICP);
  2686. outb_p(0x80, ICP);
  2687. inb_p(ICP);
  2688. }
  2689. +#endif
  2690.  
  2691. if (uart_console(port))
  2692. console_lock();
  2693. @@ -1412,8 +1422,10 @@ static void autoconfig_irq(struct uart_8250_port *up)
  2694. serial8250_out_MCR(up, save_mcr);
  2695. serial_out(up, UART_IER, save_ier);
  2696.  
  2697. +#ifdef CONFIG_SERIAL_8250_FOURPORT
  2698. if (port->flags & UPF_FOURPORT)
  2699. outb_p(save_ICP, ICP);
  2700. +#endif
  2701.  
  2702. if (uart_console(port))
  2703. console_unlock();
  2704. @@ -2413,6 +2425,7 @@ int serial8250_do_startup(struct uart_port *port)
  2705. */
  2706. up->ier = UART_IER_RLSI | UART_IER_RDI;
  2707.  
  2708. +#ifdef CONFIG_SERIAL_8250_FOURPORT
  2709. if (port->flags & UPF_FOURPORT) {
  2710. unsigned int icp;
  2711. /*
  2712. @@ -2422,6 +2435,7 @@ int serial8250_do_startup(struct uart_port *port)
  2713. outb_p(0x80, icp);
  2714. inb_p(icp);
  2715. }
  2716. +#endif
  2717. retval = 0;
  2718. out:
  2719. serial8250_rpm_put(up);
  2720. @@ -2456,11 +2470,13 @@ void serial8250_do_shutdown(struct uart_port *port)
  2721. serial8250_release_dma(up);
  2722.  
  2723. spin_lock_irqsave(&port->lock, flags);
  2724. +#ifdef CONFIG_SERIAL_8250_FOURPORT
  2725. if (port->flags & UPF_FOURPORT) {
  2726. /* reset interrupts on the AST Fourport board */
  2727. inb((port->iobase & 0xfe0) | 0x1f);
  2728. port->mctrl |= TIOCM_OUT1;
  2729. } else
  2730. +#endif
  2731. port->mctrl &= ~TIOCM_OUT2;
  2732.  
  2733. serial8250_set_mctrl(port, port->mctrl);
  2734. diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
  2735. index d1b3c2373fa4..618c1b5767a4 100644
  2736. --- a/drivers/tty/serial/8250/Kconfig
  2737. +++ b/drivers/tty/serial/8250/Kconfig
  2738. @@ -73,6 +73,7 @@ config SERIAL_8250_16550A_VARIANTS
  2739. config SERIAL_8250_FINTEK
  2740. bool "Support for Fintek F81216A LPC to 4 UART RS485 API"
  2741. depends on SERIAL_8250
  2742. + depends on HAS_IOPORT
  2743. help
  2744. Selecting this option will add support for the RS485 capabilities
  2745. of the Fintek F81216A LPC to 4 UART.
  2746. diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
  2747. index 682f9171c82c..086a03a6bdad 100644
  2748. --- a/drivers/tty/serial/Kconfig
  2749. +++ b/drivers/tty/serial/Kconfig
  2750. @@ -907,7 +907,7 @@ config SERIAL_VR41XX_CONSOLE
  2751.  
  2752. config SERIAL_JSM
  2753. tristate "Digi International NEO and Classic PCI Support"
  2754. - depends on PCI
  2755. + depends on LEGACY_PCI
  2756. select SERIAL_CORE
  2757. help
  2758. This is a driver for Digi International's Neo and Classic series
  2759. diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
  2760. index d630cccd2e6e..422a28ede4de 100644
  2761. --- a/drivers/usb/core/hcd-pci.c
  2762. +++ b/drivers/usb/core/hcd-pci.c
  2763. @@ -20,7 +20,6 @@
  2764.  
  2765. #include "usb.h"
  2766.  
  2767. -
  2768. /* PCI-based HCs are common, but plenty of non-PCI HCs are used too */
  2769.  
  2770. /*
  2771. @@ -212,7 +211,8 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id,
  2772. goto free_irq_vectors;
  2773. }
  2774.  
  2775. - hcd->amd_resume_bug = (usb_hcd_amd_remote_wakeup_quirk(dev) &&
  2776. + hcd->amd_resume_bug = (IS_ENABLED(CONFIG_USB_PCI_AMD) &&
  2777. + usb_hcd_amd_remote_wakeup_quirk(dev) &&
  2778. driver->flags & (HCD_USB11 | HCD_USB3)) ? 1 : 0;
  2779.  
  2780. if (driver->flags & HCD_MEMORY) {
  2781. diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
  2782. index c7f2a2cbad66..b22e2200c2cf 100644
  2783. --- a/drivers/usb/host/Kconfig
  2784. +++ b/drivers/usb/host/Kconfig
  2785. @@ -377,7 +377,7 @@ config USB_ISP116X_HCD
  2786.  
  2787. config USB_ISP1362_HCD
  2788. tristate "ISP1362 HCD support"
  2789. - depends on HAS_IOMEM
  2790. + depends on HAS_IOPORT
  2791. depends on COMPILE_TEST # nothing uses this
  2792. help
  2793. Supports the Philips ISP1362 chip as a host controller
  2794. @@ -612,7 +612,7 @@ endif # USB_OHCI_HCD
  2795.  
  2796. config USB_UHCI_HCD
  2797. tristate "UHCI HCD (most Intel and VIA) support"
  2798. - depends on USB_PCI || USB_UHCI_SUPPORT_NON_PCI_HC
  2799. + depends on (USB_PCI && HAS_IOPORT) || USB_UHCI_SUPPORT_NON_PCI_HC
  2800. help
  2801. The Universal Host Controller Interface is a standard by Intel for
  2802. accessing the USB hardware in the PC (which is also called the USB
  2803. diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
  2804. index ef08d68b9714..01471902c274 100644
  2805. --- a/drivers/usb/host/pci-quirks.c
  2806. +++ b/drivers/usb/host/pci-quirks.c
  2807. @@ -60,6 +60,23 @@
  2808. #define EHCI_USBLEGCTLSTS 4 /* legacy control/status */
  2809. #define EHCI_USBLEGCTLSTS_SOOE (1 << 13) /* SMI on ownership change */
  2810.  
  2811. +/* ASMEDIA quirk use */
  2812. +#define ASMT_DATA_WRITE0_REG 0xF8
  2813. +#define ASMT_DATA_WRITE1_REG 0xFC
  2814. +#define ASMT_CONTROL_REG 0xE0
  2815. +#define ASMT_CONTROL_WRITE_BIT 0x02
  2816. +#define ASMT_WRITEREG_CMD 0x10423
  2817. +#define ASMT_FLOWCTL_ADDR 0xFA30
  2818. +#define ASMT_FLOWCTL_DATA 0xBA
  2819. +#define ASMT_PSEUDO_DATA 0
  2820. +
  2821. +/* Intel quirk use */
  2822. +#define USB_INTEL_XUSB2PR 0xD0
  2823. +#define USB_INTEL_USB2PRM 0xD4
  2824. +#define USB_INTEL_USB3_PSSEN 0xD8
  2825. +#define USB_INTEL_USB3PRM 0xDC
  2826. +
  2827. +#ifdef CONFIG_USB_PCI_AMD
  2828. /* AMD quirk use */
  2829. #define AB_REG_BAR_LOW 0xe0
  2830. #define AB_REG_BAR_HIGH 0xe1
  2831. @@ -93,21 +110,6 @@
  2832. #define NB_PIF0_PWRDOWN_0 0x01100012
  2833. #define NB_PIF0_PWRDOWN_1 0x01100013
  2834.  
  2835. -#define USB_INTEL_XUSB2PR 0xD0
  2836. -#define USB_INTEL_USB2PRM 0xD4
  2837. -#define USB_INTEL_USB3_PSSEN 0xD8
  2838. -#define USB_INTEL_USB3PRM 0xDC
  2839. -
  2840. -/* ASMEDIA quirk use */
  2841. -#define ASMT_DATA_WRITE0_REG 0xF8
  2842. -#define ASMT_DATA_WRITE1_REG 0xFC
  2843. -#define ASMT_CONTROL_REG 0xE0
  2844. -#define ASMT_CONTROL_WRITE_BIT 0x02
  2845. -#define ASMT_WRITEREG_CMD 0x10423
  2846. -#define ASMT_FLOWCTL_ADDR 0xFA30
  2847. -#define ASMT_FLOWCTL_DATA 0xBA
  2848. -#define ASMT_PSEUDO_DATA 0
  2849. -
  2850. /*
  2851. * amd_chipset_gen values represent AMD different chipset generations
  2852. */
  2853. @@ -460,50 +462,6 @@ void usb_amd_quirk_pll_disable(void)
  2854. }
  2855. EXPORT_SYMBOL_GPL(usb_amd_quirk_pll_disable);
  2856.  
  2857. -static int usb_asmedia_wait_write(struct pci_dev *pdev)
  2858. -{
  2859. - unsigned long retry_count;
  2860. - unsigned char value;
  2861. -
  2862. - for (retry_count = 1000; retry_count > 0; --retry_count) {
  2863. -
  2864. - pci_read_config_byte(pdev, ASMT_CONTROL_REG, &value);
  2865. -
  2866. - if (value == 0xff) {
  2867. - dev_err(&pdev->dev, "%s: check_ready ERROR", __func__);
  2868. - return -EIO;
  2869. - }
  2870. -
  2871. - if ((value & ASMT_CONTROL_WRITE_BIT) == 0)
  2872. - return 0;
  2873. -
  2874. - udelay(50);
  2875. - }
  2876. -
  2877. - dev_warn(&pdev->dev, "%s: check_write_ready timeout", __func__);
  2878. - return -ETIMEDOUT;
  2879. -}
  2880. -
  2881. -void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev)
  2882. -{
  2883. - if (usb_asmedia_wait_write(pdev) != 0)
  2884. - return;
  2885. -
  2886. - /* send command and address to device */
  2887. - pci_write_config_dword(pdev, ASMT_DATA_WRITE0_REG, ASMT_WRITEREG_CMD);
  2888. - pci_write_config_dword(pdev, ASMT_DATA_WRITE1_REG, ASMT_FLOWCTL_ADDR);
  2889. - pci_write_config_byte(pdev, ASMT_CONTROL_REG, ASMT_CONTROL_WRITE_BIT);
  2890. -
  2891. - if (usb_asmedia_wait_write(pdev) != 0)
  2892. - return;
  2893. -
  2894. - /* send data to device */
  2895. - pci_write_config_dword(pdev, ASMT_DATA_WRITE0_REG, ASMT_FLOWCTL_DATA);
  2896. - pci_write_config_dword(pdev, ASMT_DATA_WRITE1_REG, ASMT_PSEUDO_DATA);
  2897. - pci_write_config_byte(pdev, ASMT_CONTROL_REG, ASMT_CONTROL_WRITE_BIT);
  2898. -}
  2899. -EXPORT_SYMBOL_GPL(usb_asmedia_modifyflowcontrol);
  2900. -
  2901. void usb_amd_quirk_pll_enable(void)
  2902. {
  2903. usb_amd_quirk_pll(0);
  2904. @@ -632,7 +590,53 @@ bool usb_amd_pt_check_port(struct device *device, int port)
  2905. return !(value & BIT(port_shift));
  2906. }
  2907. EXPORT_SYMBOL_GPL(usb_amd_pt_check_port);
  2908. +#endif
  2909. +
  2910. +static int usb_asmedia_wait_write(struct pci_dev *pdev)
  2911. +{
  2912. + unsigned long retry_count;
  2913. + unsigned char value;
  2914. +
  2915. + for (retry_count = 1000; retry_count > 0; --retry_count) {
  2916. +
  2917. + pci_read_config_byte(pdev, ASMT_CONTROL_REG, &value);
  2918. +
  2919. + if (value == 0xff) {
  2920. + dev_err(&pdev->dev, "%s: check_ready ERROR", __func__);
  2921. + return -EIO;
  2922. + }
  2923. +
  2924. + if ((value & ASMT_CONTROL_WRITE_BIT) == 0)
  2925. + return 0;
  2926. +
  2927. + udelay(50);
  2928. + }
  2929. +
  2930. + dev_warn(&pdev->dev, "%s: check_write_ready timeout", __func__);
  2931. + return -ETIMEDOUT;
  2932. +}
  2933. +
  2934. +void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev)
  2935. +{
  2936. + if (usb_asmedia_wait_write(pdev) != 0)
  2937. + return;
  2938. +
  2939. + /* send command and address to device */
  2940. + pci_write_config_dword(pdev, ASMT_DATA_WRITE0_REG, ASMT_WRITEREG_CMD);
  2941. + pci_write_config_dword(pdev, ASMT_DATA_WRITE1_REG, ASMT_FLOWCTL_ADDR);
  2942. + pci_write_config_byte(pdev, ASMT_CONTROL_REG, ASMT_CONTROL_WRITE_BIT);
  2943.  
  2944. + if (usb_asmedia_wait_write(pdev) != 0)
  2945. + return;
  2946. +
  2947. + /* send data to device */
  2948. + pci_write_config_dword(pdev, ASMT_DATA_WRITE0_REG, ASMT_FLOWCTL_DATA);
  2949. + pci_write_config_dword(pdev, ASMT_DATA_WRITE1_REG, ASMT_PSEUDO_DATA);
  2950. + pci_write_config_byte(pdev, ASMT_CONTROL_REG, ASMT_CONTROL_WRITE_BIT);
  2951. +}
  2952. +EXPORT_SYMBOL_GPL(usb_asmedia_modifyflowcontrol);
  2953. +
  2954. +#if IS_ENABLED(CONFIG_USB_UHCI_HCD) && defined(CONFIG_HAS_IOPORT)
  2955. /*
  2956. * Make sure the controller is completely inactive, unable to
  2957. * generate interrupts or do DMA.
  2958. @@ -713,6 +717,7 @@ int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base)
  2959. return 1;
  2960. }
  2961. EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc);
  2962. +#endif
  2963.  
  2964. static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask)
  2965. {
  2966. @@ -728,7 +733,7 @@ static void quirk_usb_handoff_uhci(struct pci_dev *pdev)
  2967. unsigned long base = 0;
  2968. int i;
  2969.  
  2970. - if (!pio_enabled(pdev))
  2971. + if (!IS_ENABLED(CONFIG_HAS_IOPORT) || !pio_enabled(pdev))
  2972. return;
  2973.  
  2974. for (i = 0; i < PCI_STD_NUM_BARS; i++)
  2975. @@ -1273,7 +1278,8 @@ static void quirk_usb_early_handoff(struct pci_dev *pdev)
  2976. "Can't enable PCI device, BIOS handoff failed.\n");
  2977. return;
  2978. }
  2979. - if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
  2980. + if (IS_ENABLED(CONFIG_USB_UHCI_HCD) &&
  2981. + pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
  2982. quirk_usb_handoff_uhci(pdev);
  2983. else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI)
  2984. quirk_usb_handoff_ohci(pdev);
  2985. diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h
  2986. index e729de21fad7..42eb18be37af 100644
  2987. --- a/drivers/usb/host/pci-quirks.h
  2988. +++ b/drivers/usb/host/pci-quirks.h
  2989. @@ -2,33 +2,50 @@
  2990. #ifndef __LINUX_USB_PCI_QUIRKS_H
  2991. #define __LINUX_USB_PCI_QUIRKS_H
  2992.  
  2993. -#ifdef CONFIG_USB_PCI
  2994. void uhci_reset_hc(struct pci_dev *pdev, unsigned long base);
  2995. int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base);
  2996. -int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev);
  2997. +
  2998. +struct pci_dev;
  2999. +
  3000. +#ifdef CONFIG_USB_PCI_AMD
  3001. bool usb_amd_hang_symptom_quirk(void);
  3002. bool usb_amd_prefetch_quirk(void);
  3003. void usb_amd_dev_put(void);
  3004. bool usb_amd_quirk_pll_check(void);
  3005. void usb_amd_quirk_pll_disable(void);
  3006. void usb_amd_quirk_pll_enable(void);
  3007. -void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev);
  3008. -void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev);
  3009. -void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
  3010. void sb800_prefetch(struct device *dev, int on);
  3011. bool usb_amd_pt_check_port(struct device *device, int port);
  3012. #else
  3013. -struct pci_dev;
  3014. +static inline bool usb_amd_hang_symptom_quirk(void)
  3015. +{
  3016. + return false;
  3017. +};
  3018. +static inline bool usb_amd_prefetch_quirk(void)
  3019. +{
  3020. + return false;
  3021. +}
  3022. +static inline bool usb_amd_quirk_pll_check(void)
  3023. +{
  3024. + return false;
  3025. +}
  3026. static inline void usb_amd_quirk_pll_disable(void) {}
  3027. static inline void usb_amd_quirk_pll_enable(void) {}
  3028. -static inline void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) {}
  3029. static inline void usb_amd_dev_put(void) {}
  3030. -static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}
  3031. static inline void sb800_prefetch(struct device *dev, int on) {}
  3032. static inline bool usb_amd_pt_check_port(struct device *device, int port)
  3033. {
  3034. return false;
  3035. }
  3036. +#endif /* CONFIG_USB_PCI_AMD */
  3037. +
  3038. +#ifdef CONFIG_USB_PCI
  3039. +void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev);
  3040. +void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev);
  3041. +void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
  3042. +#else
  3043. +static inline void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) {}
  3044. +static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}
  3045. #endif /* CONFIG_USB_PCI */
  3046.  
  3047. #endif /* __LINUX_USB_PCI_QUIRKS_H */
  3048. diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
  3049. index d90b869f5f40..a3b0d3d3b395 100644
  3050. --- a/drivers/usb/host/uhci-hcd.c
  3051. +++ b/drivers/usb/host/uhci-hcd.c
  3052. @@ -841,7 +841,7 @@ static int uhci_count_ports(struct usb_hcd *hcd)
  3053.  
  3054. static const char hcd_name[] = "uhci_hcd";
  3055.  
  3056. -#ifdef CONFIG_USB_PCI
  3057. +#if defined(CONFIG_USB_PCI) && defined(CONFIG_HAS_IOPORT)
  3058. #include "uhci-pci.c"
  3059. #define PCI_DRIVER uhci_pci_driver
  3060. #endif
  3061. diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h
  3062. index 8ae5ccd26753..8e30116b6fd2 100644
  3063. --- a/drivers/usb/host/uhci-hcd.h
  3064. +++ b/drivers/usb/host/uhci-hcd.h
  3065. @@ -586,12 +586,14 @@ static inline int uhci_aspeed_reg(unsigned int reg)
  3066.  
  3067. static inline u32 uhci_readl(const struct uhci_hcd *uhci, int reg)
  3068. {
  3069. +#ifdef CONFIG_HAS_IOPORT
  3070. if (uhci_has_pci_registers(uhci))
  3071. return inl(uhci->io_addr + reg);
  3072. - else if (uhci_is_aspeed(uhci))
  3073. +#endif
  3074. + if (uhci_is_aspeed(uhci))
  3075. return readl(uhci->regs + uhci_aspeed_reg(reg));
  3076. #ifdef CONFIG_USB_UHCI_BIG_ENDIAN_MMIO
  3077. - else if (uhci_big_endian_mmio(uhci))
  3078. + if (uhci_big_endian_mmio(uhci))
  3079. return readl_be(uhci->regs + reg);
  3080. #endif
  3081. else
  3082. @@ -600,72 +602,97 @@ static inline u32 uhci_readl(const struct uhci_hcd *uhci, int reg)
  3083.  
  3084. static inline void uhci_writel(const struct uhci_hcd *uhci, u32 val, int reg)
  3085. {
  3086. - if (uhci_has_pci_registers(uhci))
  3087. +#ifdef CONFIG_HAS_IOPORT
  3088. + if (uhci_has_pci_registers(uhci)) {
  3089. outl(val, uhci->io_addr + reg);
  3090. - else if (uhci_is_aspeed(uhci))
  3091. + return;
  3092. + }
  3093. +#endif
  3094. + if (uhci_is_aspeed(uhci)) {
  3095. writel(val, uhci->regs + uhci_aspeed_reg(reg));
  3096. + return;
  3097. + }
  3098. #ifdef CONFIG_USB_UHCI_BIG_ENDIAN_MMIO
  3099. - else if (uhci_big_endian_mmio(uhci))
  3100. + if (uhci_big_endian_mmio(uhci)) {
  3101. writel_be(val, uhci->regs + reg);
  3102. + return;
  3103. + }
  3104. #endif
  3105. - else
  3106. - writel(val, uhci->regs + reg);
  3107. + writel(val, uhci->regs + reg);
  3108. }
  3109.  
  3110. static inline u16 uhci_readw(const struct uhci_hcd *uhci, int reg)
  3111. {
  3112. +#ifdef CONFIG_HAS_IOPORT
  3113. if (uhci_has_pci_registers(uhci))
  3114. return inw(uhci->io_addr + reg);
  3115. - else if (uhci_is_aspeed(uhci))
  3116. +#endif
  3117. + if (uhci_is_aspeed(uhci))
  3118. return readl(uhci->regs + uhci_aspeed_reg(reg));
  3119. #ifdef CONFIG_USB_UHCI_BIG_ENDIAN_MMIO
  3120. - else if (uhci_big_endian_mmio(uhci))
  3121. + if (uhci_big_endian_mmio(uhci))
  3122. return readw_be(uhci->regs + reg);
  3123. #endif
  3124. - else
  3125. - return readw(uhci->regs + reg);
  3126. + return readw(uhci->regs + reg);
  3127. }
  3128.  
  3129. static inline void uhci_writew(const struct uhci_hcd *uhci, u16 val, int reg)
  3130. {
  3131. - if (uhci_has_pci_registers(uhci))
  3132. +#ifdef CONFIG_HAS_IOPORT
  3133. + if (uhci_has_pci_registers(uhci)) {
  3134. outw(val, uhci->io_addr + reg);
  3135. - else if (uhci_is_aspeed(uhci))
  3136. + return;
  3137. + }
  3138. +#endif
  3139. + if (uhci_is_aspeed(uhci)) {
  3140. writel(val, uhci->regs + uhci_aspeed_reg(reg));
  3141. + return;
  3142. + }
  3143. #ifdef CONFIG_USB_UHCI_BIG_ENDIAN_MMIO
  3144. - else if (uhci_big_endian_mmio(uhci))
  3145. + if (uhci_big_endian_mmio(uhci)) {
  3146. writew_be(val, uhci->regs + reg);
  3147. + return;
  3148. + }
  3149. #endif
  3150. - else
  3151. - writew(val, uhci->regs + reg);
  3152. +
  3153. + writew(val, uhci->regs + reg);
  3154. }
  3155.  
  3156. static inline u8 uhci_readb(const struct uhci_hcd *uhci, int reg)
  3157. {
  3158. +#ifdef CONFIG_HAS_IOPORT
  3159. if (uhci_has_pci_registers(uhci))
  3160. return inb(uhci->io_addr + reg);
  3161. - else if (uhci_is_aspeed(uhci))
  3162. +#endif
  3163. + if (uhci_is_aspeed(uhci))
  3164. return readl(uhci->regs + uhci_aspeed_reg(reg));
  3165. #ifdef CONFIG_USB_UHCI_BIG_ENDIAN_MMIO
  3166. - else if (uhci_big_endian_mmio(uhci))
  3167. + if (uhci_big_endian_mmio(uhci))
  3168. return readb_be(uhci->regs + reg);
  3169. #endif
  3170. - else
  3171. - return readb(uhci->regs + reg);
  3172. +
  3173. + return readb(uhci->regs + reg);
  3174. }
  3175.  
  3176. static inline void uhci_writeb(const struct uhci_hcd *uhci, u8 val, int reg)
  3177. {
  3178. - if (uhci_has_pci_registers(uhci))
  3179. +#ifdef CONFIG_HAS_IOPORT
  3180. + if (uhci_has_pci_registers(uhci)) {
  3181. outb(val, uhci->io_addr + reg);
  3182. - else if (uhci_is_aspeed(uhci))
  3183. + return;
  3184. + }
  3185. +#endif
  3186. + if (uhci_is_aspeed(uhci)) {
  3187. writel(val, uhci->regs + uhci_aspeed_reg(reg));
  3188. + return;
  3189. + }
  3190. #ifdef CONFIG_USB_UHCI_BIG_ENDIAN_MMIO
  3191. - else if (uhci_big_endian_mmio(uhci))
  3192. + if (uhci_big_endian_mmio(uhci)) {
  3193. writeb_be(val, uhci->regs + reg);
  3194. + return;
  3195. + }
  3196. #endif
  3197. - else
  3198. - writeb(val, uhci->regs + reg);
  3199. + writeb(val, uhci->regs + reg);
  3200. }
  3201. #endif /* CONFIG_USB_UHCI_SUPPORT_NON_PCI_HC */
  3202.  
  3203. diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
  3204. index ee33b8ec62bb..4ed4c0ca9e9b 100644
  3205. --- a/drivers/video/console/Kconfig
  3206. +++ b/drivers/video/console/Kconfig
  3207. @@ -10,6 +10,7 @@ config VGA_CONSOLE
  3208. depends on !4xx && !PPC_8xx && !SPARC && !M68K && !PARISC && !SUPERH && \
  3209. (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \
  3210. !ARM64 && !ARC && !MICROBLAZE && !OPENRISC && !NDS32 && !S390
  3211. + depends on HAS_IOPORT
  3212. default y
  3213. help
  3214. Saying Y here will allow you to use Linux in text mode through a
  3215. @@ -23,8 +24,9 @@ config VGA_CONSOLE
  3216. Say Y.
  3217.  
  3218. config MDA_CONSOLE
  3219. - depends on !M68K && !PARISC && ISA
  3220. tristate "MDA text console (dual-headed)"
  3221. + depends on !M68K && !PARISC && ISA
  3222. + depends on HAS_IOPORT
  3223. help
  3224. Say Y here if you have an old MDA or monochrome Hercules graphics
  3225. adapter in your system acting as a second head ( = video card). You
  3226. diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
  3227. index 79b0cb9c2820..e4e62cd32a1a 100644
  3228. --- a/drivers/video/fbdev/Kconfig
  3229. +++ b/drivers/video/fbdev/Kconfig
  3230. @@ -342,7 +342,7 @@ config FB_IMX
  3231.  
  3232. config FB_CYBER2000
  3233. tristate "CyberPro 2000/2010/5000 support"
  3234. - depends on FB && PCI && (BROKEN || !SPARC64)
  3235. + depends on FB && LEGACY_PCI && (BROKEN || !SPARC64)
  3236. select FB_CFB_FILLRECT
  3237. select FB_CFB_COPYAREA
  3238. select FB_CFB_IMAGEBLIT
  3239. @@ -436,6 +436,7 @@ config FB_FM2
  3240. config FB_ARC
  3241. tristate "Arc Monochrome LCD board support"
  3242. depends on FB && (X86 || COMPILE_TEST)
  3243. + depends on HAS_IOPORT
  3244. select FB_SYS_FILLRECT
  3245. select FB_SYS_COPYAREA
  3246. select FB_SYS_IMAGEBLIT
  3247. @@ -1260,7 +1261,6 @@ config FB_ATY128
  3248. This driver supports graphics boards with the ATI Rage128 chips.
  3249. Say Y if you have such a graphics board and read
  3250. <file:Documentation/fb/aty128fb.rst>.
  3251. -
  3252. To compile this driver as a module, choose M here: the
  3253. module will be called aty128fb.
  3254.  
  3255. @@ -1273,7 +1273,7 @@ config FB_ATY128_BACKLIGHT
  3256. Say Y here if you want to control the backlight of your display.
  3257.  
  3258. config FB_ATY
  3259. - tristate "ATI Mach64 display support" if PCI || ATARI
  3260. + tristate "ATI Mach64 display support" if LEGACY_PCI || ATARI
  3261. depends on FB && !SPARC32
  3262. select FB_CFB_FILLRECT
  3263. select FB_CFB_COPYAREA
  3264. @@ -1325,7 +1325,7 @@ config FB_ATY_BACKLIGHT
  3265.  
  3266. config FB_S3
  3267. tristate "S3 Trio/Virge support"
  3268. - depends on FB && PCI
  3269. + depends on FB && LEGACY_PCI
  3270. select FB_CFB_FILLRECT
  3271. select FB_CFB_COPYAREA
  3272. select FB_CFB_IMAGEBLIT
  3273. @@ -1386,7 +1386,7 @@ config FB_SAVAGE_ACCEL
  3274.  
  3275. config FB_SIS
  3276. tristate "SiS/XGI display support"
  3277. - depends on FB && PCI
  3278. + depends on FB && LEGACY_PCI
  3279. select FB_CFB_FILLRECT
  3280. select FB_CFB_COPYAREA
  3281. select FB_CFB_IMAGEBLIT
  3282. @@ -1416,7 +1416,7 @@ config FB_SIS_315
  3283.  
  3284. config FB_VIA
  3285. tristate "VIA UniChrome (Pro) and Chrome9 display support"
  3286. - depends on FB && PCI && GPIOLIB && I2C && (X86 || COMPILE_TEST)
  3287. + depends on FB && LEGACY_PCI && GPIOLIB && I2C && (X86 || COMPILE_TEST)
  3288. select FB_CFB_FILLRECT
  3289. select FB_CFB_COPYAREA
  3290. select FB_CFB_IMAGEBLIT
  3291. @@ -1454,7 +1454,7 @@ endif
  3292.  
  3293. config FB_NEOMAGIC
  3294. tristate "NeoMagic display support"
  3295. - depends on FB && PCI
  3296. + depends on FB && LEGACY_PCI
  3297. select FB_MODE_HELPERS
  3298. select FB_CFB_FILLRECT
  3299. select FB_CFB_COPYAREA
  3300. @@ -1482,7 +1482,7 @@ config FB_KYRO
  3301.  
  3302. config FB_3DFX
  3303. tristate "3Dfx Banshee/Voodoo3/Voodoo5 display support"
  3304. - depends on FB && PCI
  3305. + depends on FB && LEGACY_PCI
  3306. select FB_CFB_IMAGEBLIT
  3307. select FB_CFB_FILLRECT
  3308. select FB_CFB_COPYAREA
  3309. @@ -1531,7 +1531,7 @@ config FB_VOODOO1
  3310.  
  3311. config FB_VT8623
  3312. tristate "VIA VT8623 support"
  3313. - depends on FB && PCI
  3314. + depends on FB && LEGACY_PCI
  3315. select FB_CFB_FILLRECT
  3316. select FB_CFB_COPYAREA
  3317. select FB_CFB_IMAGEBLIT
  3318. @@ -1545,7 +1545,7 @@ config FB_VT8623
  3319.  
  3320. config FB_TRIDENT
  3321. tristate "Trident/CyberXXX/CyberBlade support"
  3322. - depends on FB && PCI && I2C
  3323. + depends on FB && LEGACY_PCI && I2C
  3324. select FB_CFB_FILLRECT
  3325. select FB_CFB_COPYAREA
  3326. select FB_CFB_IMAGEBLIT
  3327. @@ -1567,7 +1567,7 @@ config FB_TRIDENT
  3328.  
  3329. config FB_ARK
  3330. tristate "ARK 2000PV support"
  3331. - depends on FB && PCI
  3332. + depends on FB && LEGACY_PCI
  3333. select FB_CFB_FILLRECT
  3334. select FB_CFB_COPYAREA
  3335. select FB_CFB_IMAGEBLIT
  3336. @@ -2241,7 +2241,7 @@ config FB_SSD1307
  3337.  
  3338. config FB_SM712
  3339. tristate "Silicon Motion SM712 framebuffer support"
  3340. - depends on FB && PCI
  3341. + depends on FB && LEGACY_PCI
  3342. select FB_CFB_FILLRECT
  3343. select FB_CFB_COPYAREA
  3344. select FB_CFB_IMAGEBLIT
  3345. diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
  3346. index e77b7351c799..f42242e5f7b0 100644
  3347. --- a/drivers/watchdog/Kconfig
  3348. +++ b/drivers/watchdog/Kconfig
  3349. @@ -456,6 +456,7 @@ config 21285_WATCHDOG
  3350. config 977_WATCHDOG
  3351. tristate "NetWinder WB83C977 watchdog"
  3352. depends on (FOOTBRIDGE && ARCH_NETWINDER) || (ARM && COMPILE_TEST)
  3353. + depends on HAS_IOPORT
  3354. help
  3355. Say Y here to include support for the WB977 watchdog included in
  3356. NetWinder machines. Alternatively say M to compile the driver as
  3357. @@ -1199,6 +1200,7 @@ config ITCO_WDT
  3358. select WATCHDOG_CORE
  3359. depends on I2C || I2C=n
  3360. depends on MFD_INTEL_PMC_BXT || !MFD_INTEL_PMC_BXT
  3361. + depends on HAS_IOPORT # for I2C_I801
  3362. select LPC_ICH if !EXPERT
  3363. select I2C_I801 if !EXPERT && I2C
  3364. help
  3365. @@ -2056,7 +2058,7 @@ comment "PCI-based Watchdog Cards"
  3366.  
  3367. config PCIPCWATCHDOG
  3368. tristate "Berkshire Products PCI-PC Watchdog"
  3369. - depends on PCI
  3370. + depends on LEGACY_PCI
  3371. help
  3372. This is the driver for the Berkshire Products PCI-PC Watchdog card.
  3373. This card simply watches your kernel to make sure it doesn't freeze,
  3374. @@ -2071,7 +2073,7 @@ config PCIPCWATCHDOG
  3375.  
  3376. config WDTPCI
  3377. tristate "PCI-WDT500/501 Watchdog timer"
  3378. - depends on PCI
  3379. + depends on LEGACY_PCI
  3380. help
  3381. If you have a PCI-WDT500/501 watchdog board, say Y here, otherwise N.
  3382.  
  3383. diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
  3384. index e93375c710b9..ed2ea6a4a17d 100644
  3385. --- a/include/asm-generic/io.h
  3386. +++ b/include/asm-generic/io.h
  3387. @@ -448,6 +448,8 @@ static inline void writesq(volatile void __iomem *addr, const void *buffer,
  3388. #define IO_SPACE_LIMIT 0xffff
  3389. #endif
  3390.  
  3391. +#ifdef CONFIG_IOPORT
  3392. +
  3393. /*
  3394. * {in,out}{b,w,l}() access little endian I/O. {in,out}{b,w,l}_p() can be
  3395. * implemented on hardware that needs an additional delay for I/O accesses to
  3396. @@ -522,9 +524,12 @@ static inline void _outl(u32 value, unsigned long addr)
  3397. __io_paw();
  3398. }
  3399. #endif
  3400. +#endif
  3401.  
  3402. #include <linux/logic_pio.h>
  3403.  
  3404. +#ifdef CONFIG_HAS_IOPORT
  3405. +
  3406. #ifndef inb
  3407. #define inb _inb
  3408. #endif
  3409. @@ -703,6 +708,7 @@ static inline void outsl_p(unsigned long addr, const void *buffer,
  3410. outsl(addr, buffer, count);
  3411. }
  3412. #endif
  3413. +#endif /* CONFIG_IOPORT */
  3414.  
  3415. #ifndef CONFIG_GENERIC_IOMAP
  3416. #ifndef ioread8
  3417. diff --git a/include/linux/gameport.h b/include/linux/gameport.h
  3418. index 69081d899492..9e55ac748a86 100644
  3419. --- a/include/linux/gameport.h
  3420. +++ b/include/linux/gameport.h
  3421. @@ -167,16 +167,21 @@ static inline void gameport_trigger(struct gameport *gameport)
  3422. {
  3423. if (gameport->trigger)
  3424. gameport->trigger(gameport);
  3425. +#ifdef CONFIG_HAS_IOPORT
  3426. else
  3427. outb(0xff, gameport->io);
  3428. +#endif
  3429. }
  3430.  
  3431. static inline unsigned char gameport_read(struct gameport *gameport)
  3432. {
  3433. if (gameport->read)
  3434. return gameport->read(gameport);
  3435. - else
  3436. - return inb(gameport->io);
  3437. +#ifdef CONFIG_HAS_IOPORT
  3438. + return inb(gameport->io);
  3439. +#else
  3440. + return 0xff;
  3441. +#endif
  3442. }
  3443.  
  3444. static inline int gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons)
  3445. diff --git a/include/linux/parport.h b/include/linux/parport.h
  3446. index 1c16ffb8b908..04ca5dc597a1 100644
  3447. --- a/include/linux/parport.h
  3448. +++ b/include/linux/parport.h
  3449. @@ -519,7 +519,7 @@ extern int parport_device_proc_register(struct pardevice *device);
  3450. extern int parport_device_proc_unregister(struct pardevice *device);
  3451.  
  3452. /* If PC hardware is the only type supported, we can optimise a bit. */
  3453. -#if !defined(CONFIG_PARPORT_NOT_PC)
  3454. +#if !defined(CONFIG_PARPORT_NOT_PC) && defined(CONFIG_PARPORT_PC)
  3455.  
  3456. #include <linux/parport_pc.h>
  3457. #define parport_write_data(p,x) parport_pc_write_data(p,x)
  3458. diff --git a/include/video/vga.h b/include/video/vga.h
  3459. index d334e64c1c19..53cb52c0fddb 100644
  3460. --- a/include/video/vga.h
  3461. +++ b/include/video/vga.h
  3462. @@ -201,18 +201,26 @@ extern int restore_vga(struct vgastate *state);
  3463.  
  3464. static inline unsigned char vga_io_r (unsigned short port)
  3465. {
  3466. +#ifdef CONFIG_HAS_IOPORT
  3467. return inb_p(port);
  3468. +#else
  3469. + return 0xff;
  3470. +#endif
  3471. }
  3472.  
  3473. static inline void vga_io_w (unsigned short port, unsigned char val)
  3474. {
  3475. +#ifdef CONFIG_HAS_IOPORT
  3476. outb_p(val, port);
  3477. +#endif
  3478. }
  3479.  
  3480. static inline void vga_io_w_fast (unsigned short port, unsigned char reg,
  3481. unsigned char val)
  3482. {
  3483. +#ifdef CONFIG_HAS_IOPORT
  3484. outw(VGA_OUT16VAL (val, reg), port);
  3485. +#endif
  3486. }
  3487.  
  3488. static inline unsigned char vga_mm_r (void __iomem *regbase, unsigned short port)
  3489. diff --git a/lib/Kconfig b/lib/Kconfig
  3490. index 1b68074809d2..2efd015f6ff6 100644
  3491. --- a/lib/Kconfig
  3492. +++ b/lib/Kconfig
  3493. @@ -95,6 +95,7 @@ config ARCH_USE_SYM_ANNOTATIONS
  3494. config INDIRECT_PIO
  3495. bool "Access I/O in non-MMIO mode"
  3496. depends on ARM64
  3497. + depends on HAS_IOPORT
  3498. help
  3499. On some platforms where no separate I/O space exists, there are I/O
  3500. hosts which can not be accessed in MMIO mode. Using the logical PIO
  3501. @@ -472,6 +473,9 @@ config HAS_IOMEM
  3502. depends on !NO_IOMEM
  3503. default y
  3504.  
  3505. +config HAS_IOPORT
  3506. + def_bool ISA || LEGACY_PCI
  3507. +
  3508. config HAS_IOPORT_MAP
  3509. bool
  3510. depends on HAS_IOMEM && !NO_IOPORT_MAP
  3511. diff --git a/lib/Kconfig.kgdb b/lib/Kconfig.kgdb
  3512. index 05dae05b6cc9..c68e4d9dcecb 100644
  3513. --- a/lib/Kconfig.kgdb
  3514. +++ b/lib/Kconfig.kgdb
  3515. @@ -121,6 +121,7 @@ config KDB_DEFAULT_ENABLE
  3516.  
  3517. config KDB_KEYBOARD
  3518. bool "KGDB_KDB: keyboard as input device"
  3519. + depends on HAS_IOPORT
  3520. depends on VT && KGDB_KDB
  3521. default n
  3522. help
  3523. diff --git a/sound/drivers/Kconfig b/sound/drivers/Kconfig
  3524. index 7141f73cddd3..c324ab90aaba 100644
  3525. --- a/sound/drivers/Kconfig
  3526. +++ b/sound/drivers/Kconfig
  3527. @@ -128,6 +128,7 @@ config SND_VIRMIDI
  3528.  
  3529. config SND_MTPAV
  3530. tristate "MOTU MidiTimePiece AV multiport MIDI"
  3531. + depends on HAS_IOPORT
  3532. select SND_RAWMIDI
  3533. help
  3534. To use a MOTU MidiTimePiece AV multiport MIDI adapter
  3535. @@ -152,6 +153,7 @@ config SND_MTS64
  3536.  
  3537. config SND_SERIAL_U16550
  3538. tristate "UART16550 serial MIDI driver"
  3539. + depends on HAS_IOPORT
  3540. select SND_RAWMIDI
  3541. help
  3542. To include support for MIDI serial port interfaces, say Y here
  3543. @@ -167,6 +169,7 @@ config SND_SERIAL_U16550
  3544.  
  3545. config SND_MPU401
  3546. tristate "Generic MPU-401 UART driver"
  3547. + depends on HAS_IOPORT
  3548. select SND_MPU401_UART
  3549. help
  3550. Say Y here to include support for MIDI ports compatible with
  3551. diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
  3552. index 6ffa48dd5983..f8159179e38d 100644
  3553. --- a/sound/isa/Kconfig
  3554. +++ b/sound/isa/Kconfig
  3555. @@ -23,6 +23,7 @@ menuconfig SND_ISA
  3556. bool "ISA sound devices"
  3557. depends on ISA || COMPILE_TEST
  3558. depends on ISA_DMA_API
  3559. + depends on HAS_IOPORT
  3560. default y
  3561. help
  3562. Support for sound devices connected via the ISA bus.
  3563. diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
  3564. index 93bc9bef7641..9f8f9e808cc6 100644
  3565. --- a/sound/pci/Kconfig
  3566. +++ b/sound/pci/Kconfig
  3567. @@ -23,10 +23,10 @@ config SND_AD1889
  3568.  
  3569. config SND_ALS300
  3570. tristate "Avance Logic ALS300/ALS300+"
  3571. + depends on LEGACY_PCI && ZONE_DMA
  3572. select SND_PCM
  3573. select SND_AC97_CODEC
  3574. select SND_OPL3_LIB
  3575. - depends on ZONE_DMA
  3576. help
  3577. Say 'Y' or 'M' to include support for Avance Logic ALS300/ALS300+
  3578.  
  3579. @@ -35,6 +35,7 @@ config SND_ALS300
  3580.  
  3581. config SND_ALS4000
  3582. tristate "Avance Logic ALS4000"
  3583. + depends on LEGACY_PCI
  3584. depends on ISA_DMA_API
  3585. select SND_OPL3_LIB
  3586. select SND_MPU401_UART
  3587. @@ -49,6 +50,7 @@ config SND_ALS4000
  3588.  
  3589. config SND_ALI5451
  3590. tristate "ALi M5451 PCI Audio Controller"
  3591. + depends on LEGACY_PCI
  3592. select SND_MPU401_UART
  3593. select SND_AC97_CODEC
  3594. depends on ZONE_DMA
  3595. @@ -96,6 +98,7 @@ config SND_ATIIXP_MODEM
  3596.  
  3597. config SND_AU8810
  3598. tristate "Aureal Advantage"
  3599. + depends on LEGACY_PCI
  3600. select SND_MPU401_UART
  3601. select SND_AC97_CODEC
  3602. help
  3603. @@ -110,6 +113,7 @@ config SND_AU8810
  3604.  
  3605. config SND_AU8820
  3606. tristate "Aureal Vortex"
  3607. + depends on LEGACY_PCI
  3608. select SND_MPU401_UART
  3609. select SND_AC97_CODEC
  3610. help
  3611. @@ -123,6 +127,7 @@ config SND_AU8820
  3612.  
  3613. config SND_AU8830
  3614. tristate "Aureal Vortex 2"
  3615. + depends on LEGACY_PCI
  3616. select SND_MPU401_UART
  3617. select SND_AC97_CODEC
  3618. help
  3619. @@ -151,13 +156,13 @@ config SND_AW2
  3620.  
  3621. config SND_AZT3328
  3622. tristate "Aztech AZF3328 / PCI168"
  3623. + depends on LEGACY_PCI && ZONE_DMA
  3624. select SND_OPL3_LIB
  3625. select SND_MPU401_UART
  3626. select SND_PCM
  3627. select SND_RAWMIDI
  3628. select SND_AC97_CODEC
  3629. select SND_TIMER
  3630. - depends on ZONE_DMA
  3631. help
  3632. Say Y here to include support for Aztech AZF3328 (PCI168)
  3633. soundcards.
  3634. @@ -172,6 +177,7 @@ config SND_AZT3328
  3635.  
  3636. config SND_BT87X
  3637. tristate "Bt87x Audio Capture"
  3638. + depends on LEGACY_PCI
  3639. select SND_PCM
  3640. help
  3641. If you want to record audio from TV cards based on
  3642. @@ -193,6 +199,7 @@ config SND_BT87X_OVERCLOCK
  3643.  
  3644. config SND_CA0106
  3645. tristate "SB Audigy LS / Live 24bit"
  3646. + depends on LEGACY_PCI
  3647. select SND_AC97_CODEC
  3648. select SND_RAWMIDI
  3649. select SND_VMASTER
  3650. @@ -205,6 +212,7 @@ config SND_CA0106
  3651.  
  3652. config SND_CMIPCI
  3653. tristate "C-Media 8338, 8738, 8768, 8770"
  3654. + depends on LEGACY_PCI
  3655. select SND_OPL3_LIB
  3656. select SND_MPU401_UART
  3657. select SND_PCM
  3658. @@ -221,6 +229,7 @@ config SND_OXYGEN_LIB
  3659.  
  3660. config SND_OXYGEN
  3661. tristate "C-Media 8786, 8787, 8788 (Oxygen)"
  3662. + depends on LEGACY_PCI
  3663. select SND_OXYGEN_LIB
  3664. select SND_PCM
  3665. select SND_MPU401_UART
  3666. @@ -246,6 +255,7 @@ config SND_OXYGEN
  3667.  
  3668. config SND_CS4281
  3669. tristate "Cirrus Logic (Sound Fusion) CS4281"
  3670. + depends on LEGACY_PCI
  3671. select SND_OPL3_LIB
  3672. select SND_RAWMIDI
  3673. select SND_AC97_CODEC
  3674. @@ -257,6 +267,7 @@ config SND_CS4281
  3675.  
  3676. config SND_CS46XX
  3677. tristate "Cirrus Logic (Sound Fusion) CS4280/CS461x/CS462x/CS463x"
  3678. + depends on LEGACY_PCI
  3679. select SND_RAWMIDI
  3680. select SND_AC97_CODEC
  3681. select FW_LOADER
  3682. @@ -279,6 +290,7 @@ config SND_CS46XX_NEW_DSP
  3683. config SND_CS5530
  3684. tristate "CS5530 Audio"
  3685. depends on ISA_DMA_API && (X86_32 || COMPILE_TEST)
  3686. + depends on LEGACY_PCI
  3687. select SND_SB16_DSP
  3688. help
  3689. Say Y here to include support for audio on Cyrix/NatSemi CS5530 chips.
  3690. @@ -289,6 +301,7 @@ config SND_CS5530
  3691. config SND_CS5535AUDIO
  3692. tristate "CS5535/CS5536 Audio"
  3693. depends on X86_32 || MIPS || COMPILE_TEST
  3694. + depends on LEGACY_PCI
  3695. select SND_PCM
  3696. select SND_AC97_CODEC
  3697. help
  3698. @@ -306,6 +319,7 @@ config SND_CS5535AUDIO
  3699.  
  3700. config SND_CTXFI
  3701. tristate "Creative Sound Blaster X-Fi"
  3702. + depends on LEGACY_PCI
  3703. select SND_PCM
  3704. help
  3705. If you want to use soundcards based on Creative Sound Blastr X-Fi
  3706. @@ -461,13 +475,13 @@ config SND_INDIGODJX
  3707.  
  3708. config SND_EMU10K1
  3709. tristate "Emu10k1 (SB Live!, Audigy, E-mu APS)"
  3710. + depends on LEGACY_PCI && ZONE_DMA
  3711. select FW_LOADER
  3712. select SND_HWDEP
  3713. select SND_RAWMIDI
  3714. select SND_AC97_CODEC
  3715. select SND_TIMER
  3716. select SND_SEQ_DEVICE if SND_SEQUENCER != n
  3717. - depends on ZONE_DMA
  3718. help
  3719. Say Y to include support for Sound Blaster PCI 512, Live!,
  3720. Audigy and E-mu APS (partially supported) soundcards.
  3721. @@ -488,6 +502,7 @@ config SND_EMU10K1_SEQ
  3722.  
  3723. config SND_EMU10K1X
  3724. tristate "Emu10k1X (Dell OEM Version)"
  3725. + depends on LEGACY_PCI
  3726. select SND_AC97_CODEC
  3727. select SND_RAWMIDI
  3728. depends on ZONE_DMA
  3729. @@ -500,6 +515,7 @@ config SND_EMU10K1X
  3730.  
  3731. config SND_ENS1370
  3732. tristate "(Creative) Ensoniq AudioPCI 1370"
  3733. + depends on LEGACY_PCI
  3734. select SND_RAWMIDI
  3735. select SND_PCM
  3736. help
  3737. @@ -510,6 +526,7 @@ config SND_ENS1370
  3738.  
  3739. config SND_ENS1371
  3740. tristate "(Creative) Ensoniq AudioPCI 1371/1373"
  3741. + depends on LEGACY_PCI
  3742. select SND_RAWMIDI
  3743. select SND_AC97_CODEC
  3744. help
  3745. @@ -521,10 +538,10 @@ config SND_ENS1371
  3746.  
  3747. config SND_ES1938
  3748. tristate "ESS ES1938/1946/1969 (Solo-1)"
  3749. + depends on LEGACY_PCI && ZONE_DMA
  3750. select SND_OPL3_LIB
  3751. select SND_MPU401_UART
  3752. select SND_AC97_CODEC
  3753. - depends on ZONE_DMA
  3754. help
  3755. Say Y here to include support for soundcards based on ESS Solo-1
  3756. (ES1938, ES1946, ES1969) chips.
  3757. @@ -534,9 +551,9 @@ config SND_ES1938
  3758.  
  3759. config SND_ES1968
  3760. tristate "ESS ES1968/1978 (Maestro-1/2/2E)"
  3761. + depends on LEGACY_PCI && ZONE_DMA
  3762. select SND_MPU401_UART
  3763. select SND_AC97_CODEC
  3764. - depends on ZONE_DMA
  3765. help
  3766. Say Y here to include support for soundcards based on ESS Maestro
  3767. 1/2/2E chips.
  3768. @@ -568,6 +585,7 @@ config SND_ES1968_RADIO
  3769.  
  3770. config SND_FM801
  3771. tristate "ForteMedia FM801"
  3772. + depends on LEGACY_PCI
  3773. select SND_OPL3_LIB
  3774. select SND_MPU401_UART
  3775. select SND_AC97_CODEC
  3776. @@ -620,10 +638,10 @@ config SND_HDSPM
  3777.  
  3778. config SND_ICE1712
  3779. tristate "ICEnsemble ICE1712 (Envy24)"
  3780. + depends on LEGACY_PCI && ZONE_DMA
  3781. select SND_MPU401_UART
  3782. select SND_AC97_CODEC
  3783. select BITREVERSE
  3784. - depends on ZONE_DMA
  3785. help
  3786. Say Y here to include support for soundcards based on the
  3787. ICE1712 (Envy24) chip.
  3788. @@ -639,6 +657,7 @@ config SND_ICE1712
  3789.  
  3790. config SND_ICE1724
  3791. tristate "ICE/VT1724/1720 (Envy24HT/PT)"
  3792. + depends on LEGACY_PCI && ZONE_DMA
  3793. select SND_RAWMIDI
  3794. select SND_AC97_CODEC
  3795. select SND_VMASTER
  3796. @@ -711,6 +730,7 @@ config SND_LX6464ES
  3797. config SND_MAESTRO3
  3798. tristate "ESS Allegro/Maestro3"
  3799. select SND_AC97_CODEC
  3800. + depends on LEGACY_PCI
  3801. depends on ZONE_DMA
  3802. help
  3803. Say Y here to include support for soundcards based on ESS Maestro 3
  3804. @@ -752,6 +772,7 @@ config SND_NM256
  3805.  
  3806. config SND_PCXHR
  3807. tristate "Digigram PCXHR"
  3808. + depends on LEGACY_PCI
  3809. select FW_LOADER
  3810. select SND_PCM
  3811. select SND_HWDEP
  3812. @@ -763,6 +784,7 @@ config SND_PCXHR
  3813.  
  3814. config SND_RIPTIDE
  3815. tristate "Conexant Riptide"
  3816. + depends on LEGACY_PCI
  3817. select FW_LOADER
  3818. select SND_OPL3_LIB
  3819. select SND_MPU401_UART
  3820. @@ -807,6 +829,7 @@ config SND_RME9652
  3821. config SND_SE6X
  3822. tristate "Studio Evolution SE6X"
  3823. depends on SND_OXYGEN=n && SND_VIRTUOSO=n # PCI ID conflict
  3824. + depends on LEGACY_PCI
  3825. select SND_OXYGEN_LIB
  3826. select SND_PCM
  3827. select SND_MPU401_UART
  3828. @@ -826,10 +849,10 @@ config SND_SIS7019
  3829.  
  3830. config SND_SONICVIBES
  3831. tristate "S3 SonicVibes"
  3832. + depends on LEGACY_PCI && ZONE_DMA
  3833. select SND_OPL3_LIB
  3834. select SND_MPU401_UART
  3835. select SND_AC97_CODEC
  3836. - depends on ZONE_DMA
  3837. help
  3838. Say Y here to include support for soundcards based on the S3
  3839. SonicVibes chip.
  3840. @@ -839,9 +862,9 @@ config SND_SONICVIBES
  3841.  
  3842. config SND_TRIDENT
  3843. tristate "Trident 4D-Wave DX/NX; SiS 7018"
  3844. + depends on LEGACY_PCI && ZONE_DMA
  3845. select SND_MPU401_UART
  3846. select SND_AC97_CODEC
  3847. - depends on ZONE_DMA
  3848. help
  3849. Say Y here to include support for soundcards based on Trident
  3850. 4D-Wave DX/NX or SiS 7018 chips.
  3851. @@ -851,6 +874,7 @@ config SND_TRIDENT
  3852.  
  3853. config SND_VIA82XX
  3854. tristate "VIA 82C686A/B, 8233/8235 AC97 Controller"
  3855. + depends on LEGACY_PCI
  3856. select SND_MPU401_UART
  3857. select SND_AC97_CODEC
  3858. help
  3859. @@ -862,6 +886,7 @@ config SND_VIA82XX
  3860.  
  3861. config SND_VIA82XX_MODEM
  3862. tristate "VIA 82C686A/B, 8233 based Modems"
  3863. + depends on LEGACY_PCI
  3864. select SND_AC97_CODEC
  3865. help
  3866. Say Y here to include support for the integrated MC97 modem on
  3867. @@ -872,6 +897,7 @@ config SND_VIA82XX_MODEM
  3868.  
  3869. config SND_VIRTUOSO
  3870. tristate "Asus Virtuoso 66/100/200 (Xonar)"
  3871. + depends on LEGACY_PCI
  3872. select SND_OXYGEN_LIB
  3873. select SND_PCM
  3874. select SND_MPU401_UART
  3875. @@ -888,6 +914,7 @@ config SND_VIRTUOSO
  3876.  
  3877. config SND_VX222
  3878. tristate "Digigram VX222"
  3879. + depends on LEGACY_PCI
  3880. select SND_VX_LIB
  3881. help
  3882. Say Y here to include support for Digigram VX222 soundcards.
  3883. @@ -897,6 +924,7 @@ config SND_VX222
  3884.  
  3885. config SND_YMFPCI
  3886. tristate "Yamaha YMF724/740/744/754"
  3887. + depends on LEGACY_PCI
  3888. select SND_OPL3_LIB
  3889. select SND_MPU401_UART
  3890. select SND_AC97_CODEC
  3891.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement