From patchwork Mon Feb 27 13:34:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 61960 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2424549wrd; Mon, 27 Feb 2023 05:44:50 -0800 (PST) X-Google-Smtp-Source: AK7set/co5C8Bfg45i6+NSy4oYeyRWOCPAKCDoJmehuD65+SGhaP20ytiag/BhWslqJD9GJuMHk0 X-Received: by 2002:a17:906:e10e:b0:8b1:7569:b51a with SMTP id gj14-20020a170906e10e00b008b17569b51amr37784178ejb.53.1677505490109; Mon, 27 Feb 2023 05:44:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677505490; cv=none; d=google.com; s=arc-20160816; b=rWGKy79E7PdUcQfufO6j2Cj5q01en2sF1Kyh0BLEVj02h46eAY+B+FMOayfOQUZw8Q Pz0vzXICsiU0XJy5uFyw6wpqBdlmUI37/l0RfqaEQPSoAGggKfNyY70C5xzuvyTvyhe2 Oh8DJOGOzsfjplkkQ0/t5K1bc+iXRivRpVEU/lrgoSZr/hNJ6GfbZEkTtyDgUohUWqQE 7n4AcGrzRAPUyGApfqCjvytiZSGHp9hQQnADjWEkOwMVzF1p6JD+y65x/4pLwmlv29OP VbZCozlGc+M/jIFYeJJEFEfT4Qp1SKu4s+pCpJsK+pHJullVcv3YSxuDjqyAqbEUgoRT 05hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8KOomFcE+94okb3ZPDcdaXWFmS6OnT2F07m5PE62TBk=; b=r6g9EFm4wONMeKnsnQyEtF5fDoPZNxSkkFiISCHTpisIeetkZz1z3D5kuMAraf0HG4 1rLBA7usbf1IbtzaWAjcRaWy1SmBMezxmPFbddmuqC6n0lxnpJuoUc646MBBxohaMcEd 1aVHqL+GYHZ429I/XQEvYXY8OBbfpebH9y0l5d/zIsWOT87LZp2Dv7VZ7W1wJcL533yF sN8fh1yz1UfrNmau5hRX9M5gfVZy2aYIPAEsWkPLYnfKRHcrZbAizIW0edG8u+kWk7Yt 6zWNVbwFsfQH7P4sS7TtLNkNiqb4VtJjUhnJvmUjj5eCmH4ikBSDis2ilGkXBdu1r5h0 3q/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pB5p/z8z"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i19-20020a17090685d300b008c86dd47e82si8317482ejy.581.2023.02.27.05.44.27; Mon, 27 Feb 2023 05:44:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pB5p/z8z"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230220AbjB0NhF (ORCPT + 99 others); Mon, 27 Feb 2023 08:37:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230234AbjB0Ngu (ORCPT ); Mon, 27 Feb 2023 08:36:50 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EB432195E; Mon, 27 Feb 2023 05:35:58 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A80D7B80D1F; Mon, 27 Feb 2023 13:35:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAB1AC433EF; Mon, 27 Feb 2023 13:35:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677504952; bh=b9HrZOsZ0t1HTiFoX7ydm1tiygWOLP83zg9nAfNZ1yw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pB5p/z8zHfkoobffWNCngXWOTxAEZxBf8BJR8ukTfFakmvaT5brl++TVnvCgLnqIz V0a0lbAKirRTFwqbTgUxIP99kEN36fP+v0w9leayMeqi+KDLnroY1rZksb3nEVpb4g Txoj5inxcnxhRcYF03mzK249tBVstnL+txTarvCp4Sy9PXCvWC1oPUim1+wN8Y0IRf HtBQ/EGSN6EfeCBudpB+caa4CLl1GiC1lVDXF3Qq0jCLsq4lncEjos3fm1d8raTQQI hWrD1dAyO5UtKEbMJ5xYXM4Wsnbp/VxPZLisb/EABgdhUgIZHG+0iX3kYie1AVkM5C fjp00cc2uzyPw== From: Arnd Bergmann To: Dominik Brodowski , linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Bjorn Helgaas , Florian Fainelli , H Hartley Sweeten , Ian Abbott , Jakub Kicinski , Kevin Cernekee , Lukas Wunner , Manuel Lauss , Oliver Hartkopp , Olof Johansson , Robert Jarzmik , YOKOTA Hiroshi , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org, linux-mips@vger.kernel.org, linux-pci@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [RFC 6/6] pci: hotplug: move cardbus code from drivers/pcmcia Date: Mon, 27 Feb 2023 14:34:57 +0100 Message-Id: <20230227133457.431729-7-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230227133457.431729-1-arnd@kernel.org> References: <20230227133457.431729-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758991996808169056?= X-GMAIL-MSGID: =?utf-8?q?1758991996808169056?= From: Arnd Bergmann 16-bit pcmcia and 32-bit cardbus code are now completely separate code bases, with the cardbus implementation just interfacig with the PCI core for hotplugging cards, so move it to the same place as the other PCI hotplug drivers. The pcmcia/i82365.h header file is the only bit that contains shared definitions for common registers. Signed-off-by: Arnd Bergmann --- drivers/Makefile | 2 +- drivers/pci/hotplug/Kconfig | 56 +++++++++++++++++++ drivers/pci/hotplug/Makefile | 1 + .../{pcmcia => pci/hotplug}/yenta_socket.c | 2 +- drivers/pcmcia/Kconfig | 56 ------------------- drivers/pcmcia/Makefile | 3 - drivers/pcmcia/i82092.c | 2 +- drivers/pcmcia/i82365.c | 2 +- drivers/pcmcia/pd6729.c | 3 +- {drivers => include}/pcmcia/i82365.h | 0 10 files changed, 62 insertions(+), 65 deletions(-) rename drivers/{pcmcia => pci/hotplug}/yenta_socket.c (99%) rename {drivers => include}/pcmcia/i82365.h (100%) diff --git a/drivers/Makefile b/drivers/Makefile index bdf1c66141c9..900a37a1b401 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -93,7 +93,7 @@ obj-$(CONFIG_UIO) += uio/ obj-$(CONFIG_VFIO) += vfio/ obj-y += cdrom/ obj-y += auxdisplay/ -obj-$(CONFIG_PCCARD) += pcmcia/ +obj-$(CONFIG_PCMCIA) += pcmcia/ obj-$(CONFIG_DIO) += dio/ obj-$(CONFIG_SBUS) += sbus/ obj-$(CONFIG_ZORRO) += zorro/ diff --git a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig index 48113b210cf9..83941cb45291 100644 --- a/drivers/pci/hotplug/Kconfig +++ b/drivers/pci/hotplug/Kconfig @@ -161,4 +161,60 @@ config HOTPLUG_PCI_S390 When in doubt, say Y. +config CARDBUS + tristate "32-bit CardBus support" + depends on PCI + select YENTA + default PCCARD + help + CardBus is a bus mastering architecture for PC-cards, which allows + for 32 bit PC-cards (the original PCMCIA standard specifies only + a 16 bit wide bus). Many newer PC-cards are actually CardBus cards. + + To use 32 bit PC-cards, you also need a CardBus compatible host + bridge. Virtually all modern PCMCIA bridges do this, and most of + them are "yenta-compatible", so say Y or M there, too. + + If unsure, say Y. + +config YENTA + tristate "CardBus yenta-compatible bridge support" if EXPERT + depends on PCI && CARDBUS + default y + help + This option enables support for CardBus host bridges. Virtually + all modern PCMCIA bridges are CardBus compatible. A "bridge" is + the hardware inside your computer that PCMCIA cards are plugged + into. + + To compile this driver as modules, choose M here: the + module will be called yenta_socket. + + If unsure, say Y. + +config YENTA_O2 + default y + bool "Special initialization for O2Micro bridges" if EXPERT + depends on YENTA + +config YENTA_RICOH + default y + bool "Special initialization for Ricoh bridges" if EXPERT + depends on YENTA + +config YENTA_TI + default y + bool "Special initialization for TI and EnE bridges" if EXPERT + depends on YENTA + +config YENTA_ENE_TUNE + default y + bool "Auto-tune EnE bridges for CB cards" if EXPERT + depends on YENTA_TI && CARDBUS + +config YENTA_TOSHIBA + default y + bool "Special initialization for Toshiba ToPIC bridges" if EXPERT + depends on YENTA + endif # HOTPLUG_PCI diff --git a/drivers/pci/hotplug/Makefile b/drivers/pci/hotplug/Makefile index 5196983220df..8b655c283565 100644 --- a/drivers/pci/hotplug/Makefile +++ b/drivers/pci/hotplug/Makefile @@ -20,6 +20,7 @@ obj-$(CONFIG_HOTPLUG_PCI_RPA) += rpaphp.o obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR) += rpadlpar_io.o obj-$(CONFIG_HOTPLUG_PCI_ACPI) += acpiphp.o obj-$(CONFIG_HOTPLUG_PCI_S390) += s390_pci_hpc.o +obj-$(CONFIG_CARDBUS) += yenta_socket.o # acpiphp_ibm extends acpiphp, so should be linked afterwards. diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pci/hotplug/yenta_socket.c similarity index 99% rename from drivers/pcmcia/yenta_socket.c rename to drivers/pci/hotplug/yenta_socket.c index 68b852f18cbb..3b530ce76809 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pci/hotplug/yenta_socket.c @@ -34,7 +34,7 @@ #include #include #include -#include "i82365.h" +#include /* Definitions for card status flags for GetStatus */ #define SS_WRPROT 0x0001 diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index c05d95cf7d3e..3c4b895dba80 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig @@ -53,67 +53,11 @@ config PCMCIA_LOAD_CIS If unsure, say Y. -config CARDBUS - tristate "32-bit CardBus support" - depends on PCI - select YENTA - default y - help - CardBus is a bus mastering architecture for PC-cards, which allows - for 32 bit PC-cards (the original PCMCIA standard specifies only - a 16 bit wide bus). Many newer PC-cards are actually CardBus cards. - - To use 32 bit PC-cards, you also need a CardBus compatible host - bridge. Virtually all modern PCMCIA bridges do this, and most of - them are "yenta-compatible", so say Y or M there, too. - - If unsure, say Y. - config PCMCIA_MAX1600 tristate comment "PC-card bridges" -config YENTA - tristate "CardBus yenta-compatible bridge support" if EXPERT - depends on PCI && CARDBUS - default y - help - This option enables support for CardBus host bridges. Virtually - all modern PCMCIA bridges are CardBus compatible. A "bridge" is - the hardware inside your computer that PCMCIA cards are plugged - into. - - To compile this driver as modules, choose M here: the - module will be called yenta_socket. - - If unsure, say Y. - -config YENTA_O2 - default y - bool "Special initialization for O2Micro bridges" if EXPERT - depends on YENTA - -config YENTA_RICOH - default y - bool "Special initialization for Ricoh bridges" if EXPERT - depends on YENTA - -config YENTA_TI - default y - bool "Special initialization for TI and EnE bridges" if EXPERT - depends on YENTA - -config YENTA_ENE_TUNE - default y - bool "Auto-tune EnE bridges for CB cards" if EXPERT - depends on YENTA_TI && CARDBUS - -config YENTA_TOSHIBA - default y - bool "Special initialization for Toshiba ToPIC bridges" if EXPERT - depends on YENTA - config PD6729 tristate "Cirrus PD6729 compatible bridge support" depends on PCMCIA && PCI diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index 4d0af3e27c1c..481468778f46 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -14,9 +14,6 @@ obj-$(CONFIG_PCMCIA) += pcmcia_rsrc.o # socket drivers - -obj-$(CONFIG_YENTA) += yenta_socket.o - obj-$(CONFIG_PD6729) += pd6729.o obj-$(CONFIG_I82365) += i82365.o obj-$(CONFIG_I82092) += i82092.o diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c index a335748bdef5..b74eb77e7489 100644 --- a/drivers/pcmcia/i82092.c +++ b/drivers/pcmcia/i82092.c @@ -17,11 +17,11 @@ #include #include +#include #include #include "i82092aa.h" -#include "i82365.h" MODULE_LICENSE("GPL"); diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index 891ccea2cccb..bb4045b4613a 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c @@ -54,7 +54,7 @@ #include /* ISA-bus controllers */ -#include "i82365.h" +#include #include "cirrus.h" #include "vg468.h" #include "ricoh.h" diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index a0a2e7f18356..ec8c093e7fd0 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c @@ -18,10 +18,9 @@ #include #include - +#include #include "pd6729.h" -#include "i82365.h" #include "cirrus.h" MODULE_LICENSE("GPL"); diff --git a/drivers/pcmcia/i82365.h b/include/pcmcia/i82365.h similarity index 100% rename from drivers/pcmcia/i82365.h rename to include/pcmcia/i82365.h