aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>2016-05-27 18:08:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-17 23:21:12 -0400
commit3a4955111ad46a022f05b51f91306d864f989625 (patch)
tree7853caf07ff990df9d2948faf821d890f41e381a
parent7e1b1fc4dabd6ec8e28baa0708866e13fa93c9b3 (diff)
isa: Allow ISA-style drivers on modern systems
Several modern devices, such as PC/104 cards, are expected to run on modern systems via an ISA bus interface. Since ISA is a legacy interface for most modern architectures, ISA support should remain disabled in general. Support for ISA-style drivers should be enabled on a per driver basis. To allow ISA-style drivers on modern systems, this patch introduces the ISA_BUS_API and ISA_BUS Kconfig options. The ISA bus driver will now build conditionally on the ISA_BUS_API Kconfig option, which defaults to the legacy ISA Kconfig option. The ISA_BUS Kconfig option allows the ISA_BUS_API Kconfig option to be selected on architectures which do not enable ISA (e.g. X86_64). The ISA_BUS Kconfig option is currently only implemented for X86 architectures. Other architectures may have their own ISA_BUS Kconfig options added as required. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/Kconfig3
-rw-r--r--arch/x86/Kconfig9
-rw-r--r--drivers/base/Makefile2
-rw-r--r--include/linux/isa.h2
4 files changed, 14 insertions, 2 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index d794384a0404..e9734796531f 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -606,6 +606,9 @@ config HAVE_ARCH_HASH
606 file which provides platform-specific implementations of some 606 file which provides platform-specific implementations of some
607 functions in <linux/hash.h> or fs/namei.c. 607 functions in <linux/hash.h> or fs/namei.c.
608 608
609config ISA_BUS_API
610 def_bool ISA
611
609# 612#
610# ABI hall of shame 613# ABI hall of shame
611# 614#
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 0a7b885964ba..d9a94da0c29f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2439,6 +2439,15 @@ config PCI_CNB20LE_QUIRK
2439 2439
2440source "drivers/pci/Kconfig" 2440source "drivers/pci/Kconfig"
2441 2441
2442config ISA_BUS
2443 bool "ISA-style bus support on modern systems" if EXPERT
2444 select ISA_BUS_API
2445 help
2446 Enables ISA-style drivers on modern systems. This is necessary to
2447 support PC/104 devices on X86_64 platforms.
2448
2449 If unsure, say N.
2450
2442# x86_64 have no ISA slots, but can have ISA-style DMA. 2451# x86_64 have no ISA slots, but can have ISA-style DMA.
2443config ISA_DMA_API 2452config ISA_DMA_API
2444 bool "ISA-style DMA support" if (X86_64 && EXPERT) 2453 bool "ISA-style DMA support" if (X86_64 && EXPERT)
diff --git a/drivers/base/Makefile b/drivers/base/Makefile
index 6b2a84e7f2be..2609ba20b396 100644
--- a/drivers/base/Makefile
+++ b/drivers/base/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_DMA_CMA) += dma-contiguous.o
10obj-y += power/ 10obj-y += power/
11obj-$(CONFIG_HAS_DMA) += dma-mapping.o 11obj-$(CONFIG_HAS_DMA) += dma-mapping.o
12obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o 12obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o
13obj-$(CONFIG_ISA) += isa.o 13obj-$(CONFIG_ISA_BUS_API) += isa.o
14obj-$(CONFIG_FW_LOADER) += firmware_class.o 14obj-$(CONFIG_FW_LOADER) += firmware_class.o
15obj-$(CONFIG_NUMA) += node.o 15obj-$(CONFIG_NUMA) += node.o
16obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o 16obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
diff --git a/include/linux/isa.h b/include/linux/isa.h
index 5ab85281230b..384ab9b7d79a 100644
--- a/include/linux/isa.h
+++ b/include/linux/isa.h
@@ -22,7 +22,7 @@ struct isa_driver {
22 22
23#define to_isa_driver(x) container_of((x), struct isa_driver, driver) 23#define to_isa_driver(x) container_of((x), struct isa_driver, driver)
24 24
25#ifdef CONFIG_ISA 25#ifdef CONFIG_ISA_BUS_API
26int isa_register_driver(struct isa_driver *, unsigned int); 26int isa_register_driver(struct isa_driver *, unsigned int);
27void isa_unregister_driver(struct isa_driver *); 27void isa_unregister_driver(struct isa_driver *);
28#else 28#else