Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1408335 > unrolled thread
| Started by | William Breathitt Gray <vilhelm.gray@gmail.com> |
|---|---|
| First post | 2016-05-28 00:10 +0200 |
| Last post | 2016-05-31 10:50 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v5 0/4] Allow ISA-style drivers on modern systems William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-05-28 00:10 +0200
[PATCH v5 1/4] isa: Allow ISA-style drivers on modern systems William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-05-28 00:10 +0200
Re: [PATCH v5 1/4] isa: Allow ISA-style drivers on modern systems Linus Torvalds <torvalds@linux-foundation.org> - 2016-05-28 21:40 +0200
[PATCH v5 2/4] gpio: Allow PC/104 devices on X86_64 William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-05-28 00:10 +0200
Re: [PATCH v5 2/4] gpio: Allow PC/104 devices on X86_64 Linus Walleij <linus.walleij@linaro.org> - 2016-05-31 10:50 +0200
| From | William Breathitt Gray <vilhelm.gray@gmail.com> |
|---|---|
| Date | 2016-05-28 00:10 +0200 |
| Subject | [PATCH v5 0/4] Allow ISA-style drivers on modern systems |
| Message-ID | <rDy77-FP-5@gated-at.bofh.it> |
Changes in v5:
- Add explicit X86 dependency to CONFIG_STX104 and CONFIG_EBC_C384_WDT
since these drivers were developed with X86 architectures in mind
Changes in v4:
- Remove unnecessary explicit "default n" from the X86 ISA_BUS Kconfig
option since Kconfig options are disabled by default
Changes in v3:
- Remove redundant X86 dependency from the X86 ISA_BUS Kconfig option
Changes in v2:
- Adjusted preprocessor compilation conditional in include/linux/isa.h
to use CONFIG_ISA_BUS_API in order to link the correct ISA bus
driver function definitions when available
- Move ISA_BUS_API Kconfig option to arch/Kconfig, thus making it
available to all architectures instead of just X86
- X86 ISA_BUS Kconfig option should be disabled by default; ISA
devices typically do not have a way to be probed, so users should
be required to explicitly enable ISA bus driver support, lest a
selected driver be loaded with the misguided expectation of a safe
hardware probe
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 patchset 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
option added as required.
An earlier attempt to allow the ISA bus driver to build for X86_64 took
an inappropriate approach resulting in legacy ISA drivers becoming
enabled unconditionally on untested and unsupported architectures.
Commit 51e68d055cba ("x86 isa: add back X86_32 dependency on
CONFIG_ISA"), added to restrict the ISA bus driver to only X86_32,
causes several drivers intended for X86_64 to be restricted to X86_32 as
well.
This patchset replaces the ISA Kconfig option dependency of several
drivers to ISA_BUS_API, so that they may build for X86_64 as intended.
The respective drivers are as follows:
* ACCES 104-IDIO-16 GPIO driver
* ACCES 104-IDI-48 GPIO driver
* ACCES 104-DIO-48E GPIO driver
* Apex Embedded Systems STX104 DAC driver
* WinSystems EBC-C384 watchdog timer driver
* WinSystems WS16C48 GPIO driver
William Breathitt Gray (4):
isa: Allow ISA-style drivers on modern systems
gpio: Allow PC/104 devices on X86_64
iio: stx104: Allow build for X86_64
watchdog: ebc-c384_wdt: Allow build for X86_64
arch/Kconfig | 3 +++
arch/x86/Kconfig | 9 +++++++++
drivers/base/Makefile | 2 +-
drivers/gpio/Kconfig | 8 ++++----
drivers/iio/dac/Kconfig | 2 +-
drivers/watchdog/Kconfig | 2 +-
include/linux/isa.h | 2 +-
7 files changed, 20 insertions(+), 8 deletions(-)
--
2.7.3
[toc] | [next] | [standalone]
| From | William Breathitt Gray <vilhelm.gray@gmail.com> |
|---|---|
| Date | 2016-05-28 00:10 +0200 |
| Subject | [PATCH v5 1/4] isa: Allow ISA-style drivers on modern systems |
| Message-ID | <rDy77-FP-13@gated-at.bofh.it> |
| In reply to | #1408335 |
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.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
arch/Kconfig | 3 +++
arch/x86/Kconfig | 9 +++++++++
drivers/base/Makefile | 2 +-
include/linux/isa.h | 2 +-
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index b16e74e..9d9942f 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -598,6 +598,9 @@ config HAVE_STACK_VALIDATION
Architecture supports the 'objtool check' host tool command, which
performs compile-time stack metadata validation.
+config ISA_BUS_API
+ def_bool ISA
+
#
# ABI hall of shame
#
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 0a7b885..d9a94da 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2439,6 +2439,15 @@ config PCI_CNB20LE_QUIRK
source "drivers/pci/Kconfig"
+config ISA_BUS
+ bool "ISA-style bus support on modern systems" if EXPERT
+ select ISA_BUS_API
+ help
+ Enables ISA-style drivers on modern systems. This is necessary to
+ support PC/104 devices on X86_64 platforms.
+
+ If unsure, say N.
+
# x86_64 have no ISA slots, but can have ISA-style DMA.
config ISA_DMA_API
bool "ISA-style DMA support" if (X86_64 && EXPERT)
diff --git a/drivers/base/Makefile b/drivers/base/Makefile
index 6b2a84e..2609ba2 100644
--- a/drivers/base/Makefile
+++ b/drivers/base/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_DMA_CMA) += dma-contiguous.o
obj-y += power/
obj-$(CONFIG_HAS_DMA) += dma-mapping.o
obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o
-obj-$(CONFIG_ISA) += isa.o
+obj-$(CONFIG_ISA_BUS_API) += isa.o
obj-$(CONFIG_FW_LOADER) += firmware_class.o
obj-$(CONFIG_NUMA) += node.o
obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
diff --git a/include/linux/isa.h b/include/linux/isa.h
index 5ab8528..384ab9b 100644
--- a/include/linux/isa.h
+++ b/include/linux/isa.h
@@ -22,7 +22,7 @@ struct isa_driver {
#define to_isa_driver(x) container_of((x), struct isa_driver, driver)
-#ifdef CONFIG_ISA
+#ifdef CONFIG_ISA_BUS_API
int isa_register_driver(struct isa_driver *, unsigned int);
void isa_unregister_driver(struct isa_driver *);
#else
--
2.7.3
[toc] | [prev] | [next] | [standalone]
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Date | 2016-05-28 21:40 +0200 |
| Subject | Re: [PATCH v5 1/4] isa: Allow ISA-style drivers on modern systems |
| Message-ID | <rDSfv-4vZ-11@gated-at.bofh.it> |
| In reply to | #1408336 |
On Fri, May 27, 2016 at 3:08 PM, William Breathitt Gray
<vilhelm.gray@gmail.com> wrote:
> 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.
>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
This version seems fine and safe. I didn't see the other patches in
the series (not cc'd to me), but at least this one would seem to do
the right thing and expose part of the ISA code without causing other
architectures to possibly lose it.
Linus
[toc] | [prev] | [next] | [standalone]
| From | William Breathitt Gray <vilhelm.gray@gmail.com> |
|---|---|
| Date | 2016-05-28 00:10 +0200 |
| Subject | [PATCH v5 2/4] gpio: Allow PC/104 devices on X86_64 |
| Message-ID | <rDy78-FP-31@gated-at.bofh.it> |
| In reply to | #1408335 |
With the introduction of the ISA_BUS_API Kconfig option, ISA-style drivers may be built for X86_64 architectures. This patch changes the ISA Kconfig option dependency of the PC/104 drivers to ISA_BUS_API, thus allowing them to build for X86_64 as they are expected to. Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> --- drivers/gpio/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 48da857..dc6da77 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -530,7 +530,7 @@ menu "Port-mapped I/O GPIO drivers" config GPIO_104_DIO_48E tristate "ACCES 104-DIO-48E GPIO support" - depends on ISA + depends on ISA_BUS_API select GPIOLIB_IRQCHIP help Enables GPIO support for the ACCES 104-DIO-48E series (104-DIO-48E, @@ -540,7 +540,7 @@ config GPIO_104_DIO_48E config GPIO_104_IDIO_16 tristate "ACCES 104-IDIO-16 GPIO support" - depends on ISA + depends on ISA_BUS_API select GPIOLIB_IRQCHIP help Enables GPIO support for the ACCES 104-IDIO-16 family (104-IDIO-16, @@ -551,7 +551,7 @@ config GPIO_104_IDIO_16 config GPIO_104_IDI_48 tristate "ACCES 104-IDI-48 GPIO support" - depends on ISA + depends on ISA_BUS_API select GPIOLIB_IRQCHIP help Enables GPIO support for the ACCES 104-IDI-48 family (104-IDI-48A, @@ -627,7 +627,7 @@ config GPIO_TS5500 config GPIO_WS16C48 tristate "WinSystems WS16C48 GPIO support" - depends on ISA + depends on ISA_BUS_API select GPIOLIB_IRQCHIP help Enables GPIO support for the WinSystems WS16C48. The base port -- 2.7.3
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-05-31 10:50 +0200 |
| Subject | Re: [PATCH v5 2/4] gpio: Allow PC/104 devices on X86_64 |
| Message-ID | <rENx7-m9-15@gated-at.bofh.it> |
| In reply to | #1408337 |
On Sat, May 28, 2016 at 12:08 AM, William Breathitt Gray <vilhelm.gray@gmail.com> wrote: > With the introduction of the ISA_BUS_API Kconfig option, ISA-style > drivers may be built for X86_64 architectures. This patch changes the > ISA Kconfig option dependency of the PC/104 drivers to ISA_BUS_API, thus > allowing them to build for X86_64 as they are expected to. > > Cc: Alexandre Courbot <gnurou@gmail.com> > Cc: Linus Walleij <linus.walleij@linaro.org> > Reviewed-by: Guenter Roeck <linux@roeck-us.net> > Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Or should I apply this directly to the GPIO tree? Yours, Linus Walleij
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web