From patchwork Fri May 27 22:08:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 627368 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rGgCH1c3fz9t69 for ; Sat, 28 May 2016 08:08:59 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=nJmOuALb; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756807AbcE0WIj (ORCPT ); Fri, 27 May 2016 18:08:39 -0400 Received: from mail-yw0-f194.google.com ([209.85.161.194]:36399 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753979AbcE0WIg (ORCPT ); Fri, 27 May 2016 18:08:36 -0400 Received: by mail-yw0-f194.google.com with SMTP id l126so8001519ywe.3; Fri, 27 May 2016 15:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LAtbyd1b+DPlALacfu7FFX8+604Tw50awDHpNI0Tp+8=; b=nJmOuALbJV7gwx6ZRSckSHJ4wOY/qoSL4x6ZrxkMRKkGcluibzSX9V797HqVqn/14N CjcRgZaPQjYC89m4JJY2O1FxMkj/sP8UJG5LNSEU1TpyE2OOq8oKqqaNqFLCCRJeIVNd /CCJLPKOyqfqzHfLVqNiLhI1Qdy5Bt4jKeGs2evJS15Xx5tC4vvDFSOKPwEoU4XZY4uB ND1axVeoZ5AnI9xJj/MnbLizSuk0ywTmqb6pXlUHkr7cCzulowcMoWKEeslEn/gdpU2i /nEBUJYE2SWuaZehVa5CBPSoIOd2NlprJo8V2jQHoOzFbKMC7BqLUzbVj5uiHkD9JPE6 WH/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LAtbyd1b+DPlALacfu7FFX8+604Tw50awDHpNI0Tp+8=; b=CMANu80pnqEHNw70LFleIo3mo6+nfpSg/dzMTqsZipdXvZ3/F4eJG0FbZpcWut1YKk U8TsbZmYGOgGqudRghOE/S0fw5uDyCbKv/XyGqlWzmNRR1oKXvSjQTwwth2l7MMb1gn8 S1+gTQKzUONv9fmiZQCCxeQGJuMGLGTWz9TQXUF4Rj4XlVz5q2cz7YYuWLTgM6/paOuu g6xlaZuwmH9J1bX74hfC66KzdtcpboLx0m47vHfN3Haq5rizUstm06wxqY7fwziWiY/M r0PxXPHONgdd7VMWTlrRBoTYyM8g7uZhaTOGnhMGiyVv+6utrIz9pNn66Pa1gNhbooht tIaA== X-Gm-Message-State: ALyK8tLNZZqkB+3tZ6L/3WkkWQJjvnrEnBJzcqyOR0R9EnANgmsTzRuTMJ2jGX3kN51unw== X-Received: by 10.129.74.86 with SMTP id x83mr11302160ywa.38.1464386914974; Fri, 27 May 2016 15:08:34 -0700 (PDT) Received: from localhost (71-47-58-73.res.bhn.net. [71.47.58.73]) by smtp.gmail.com with ESMTPSA id w185sm6531298ywe.1.2016.05.27.15.08.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 May 2016 15:08:34 -0700 (PDT) From: William Breathitt Gray To: gregkh@linuxfoundation.org, akpm@linux-foundation.org Cc: x86@kernel.org, linux-next@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, sfr@canb.auug.org.au, linux@roeck-us.net, William Breathitt Gray , Linus Torvalds Subject: [PATCH v5 1/4] isa: Allow ISA-style drivers on modern systems Date: Fri, 27 May 2016 18:08:27 -0400 Message-Id: X-Mailer: git-send-email 2.7.3 In-Reply-To: References: Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 Reviewed-by: Guenter Roeck Signed-off-by: William Breathitt Gray Acked-by: Linus Torvalds --- 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