From patchwork Thu Feb 4 13:44:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 578943 X-Patchwork-Delegate: davem@davemloft.net 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 1F4D7140322 for ; Fri, 5 Feb 2016 00:52:10 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965945AbcBDNqP (ORCPT ); Thu, 4 Feb 2016 08:46:15 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:55251 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965174AbcBDNqL (ORCPT ); Thu, 4 Feb 2016 08:46:11 -0500 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O2001S0VZKMBL70@mailout1.samsung.com>; Thu, 04 Feb 2016 22:46:10 +0900 (KST) X-AuditID: cbfee61b-f793c6d00000236c-14-56b3562116f9 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id CC.F0.09068.12653B65; Thu, 4 Feb 2016 22:46:10 +0900 (KST) Received: from AMDC1976.DIGITAL.local ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O20008WTZIX2L80@mmp2.samsung.com>; Thu, 04 Feb 2016 22:46:09 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: "David S. Miller" Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Tejun Heo , Alan Cox , Sergei Shtylyov , b.zolnierkie@samsung.com Subject: [RFC PATCH 07/19] ide: remove deprecated delkin_cb host driver Date: Thu, 04 Feb 2016 14:44:04 +0100 Message-id: <1454593456-3162-8-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1454593456-3162-1-git-send-email-b.zolnierkie@samsung.com> References: <1454593456-3162-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLLMWRmVeSWpSXmKPExsVy+t9jQV2lsM1hBv1fmSw2zljPajHnfAuL xaQpf9ksju14xGRxedccNoszq26xW/xafpTRgd3jwdT/TB5bVt5k8ti0qpPNo/XkJlaPvi2r GD0+b5ILYIvisklJzcksSy3St0vgypjycxlLwUnTigPvt7I1MF7V7mLk5JAQMJE48/gCK4Qt JnHh3nq2LkYuDiGBWYwS6/edYoZwfjFKvL15jxGkik3ASmJi+yowW0RAW2LdgR5WkCJmgYuM EsdunmcHSQgLuEvcfLIWbCyLgKrE46sn2EBsXqD47de/oNbJSZw8NhnM5hTwkNh0t4EJxBYC qmk6fIl5AiPvAkaGVYwSqQXJBcVJ6blGeanlesWJucWleel6yfm5mxjBgfZMegfj4V3uhxgF OBiVeHgbPDeFCbEmlhVX5h5ilOBgVhLhfRG4OUyINyWxsiq1KD++qDQntfgQozQHi5I47+P/ 68KEBNITS1KzU1MLUotgskwcnFINjKHVzHFcf1Rf9S5gEFION6g9uFdl84bAaxmubLxZdy6u tVGQcKzWMD9xTUG5mtOPpf9DjrbYutKTbgkz0iVuRC14Unb7xqe3D7vfVZfqdX0wNG1b0NS7 tr/4gJ6hmUb89Ot/5ayEXNO8r55Rq0hILpZ119/NXr2M7eMUcRf241I/aqek/otSYinOSDTU Yi4qTgQAspfIVDACAAA= Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org IDE subsystem has been deprecated since 2009 and the majority (if not all) of Linux distributions have switched to use libata for ATA support exclusively. The replacement driver (pata_ninja32) has been available since 2007 and it supports all the hardware supported by the old delkin_cb host driver. Remove the deprecated delkin_cb host driver. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/Kconfig | 7 -- drivers/ide/Makefile | 1 - drivers/ide/delkin_cb.c | 181 ------------------------------------------------ 3 files changed, 189 deletions(-) delete mode 100644 drivers/ide/delkin_cb.c diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 2af2425..6c16375 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -107,13 +107,6 @@ config BLK_DEV_IDECS Support for Compact Flash cards, outboard IDE disks, tape drives, and CD-ROM drives connected through a PCMCIA card. -config BLK_DEV_DELKIN - tristate "Cardbus IDE support (Delkin/ASKA/Workbit)" - depends on CARDBUS && PCI - help - Support for Delkin, ASKA, and Workbit Cardbus CompactFlash - Adapters. This may also work for similar SD and XD adapters. - config BLK_DEV_IDECD tristate "Include IDE/ATAPI CDROM support" select IDE_ATAPI diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index df2c031..e582431 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile @@ -39,7 +39,6 @@ obj-$(CONFIG_BLK_DEV_ALI15X3) += alim15x3.o obj-$(CONFIG_BLK_DEV_AMD74XX) += amd74xx.o obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o obj-$(CONFIG_BLK_DEV_CY82C693) += cy82c693.o -obj-$(CONFIG_BLK_DEV_DELKIN) += delkin_cb.o obj-$(CONFIG_BLK_DEV_HPT366) += hpt366.o obj-$(CONFIG_BLK_DEV_IT8172) += it8172.o obj-$(CONFIG_BLK_DEV_IT8213) += it8213.o diff --git a/drivers/ide/delkin_cb.c b/drivers/ide/delkin_cb.c deleted file mode 100644 index 300daab..0000000 --- a/drivers/ide/delkin_cb.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Created 20 Oct 2004 by Mark Lord - * - * Basic support for Delkin/ASKA/Workbit Cardbus CompactFlash adapter - * - * Modeled after the 16-bit PCMCIA driver: ide-cs.c - * - * This is slightly peculiar, in that it is a PCI driver, - * but is NOT an IDE PCI driver -- the IDE layer does not directly - * support hot insertion/removal of PCI interfaces, so this driver - * is unable to use the IDE PCI interfaces. Instead, it uses the - * same interfaces as the ide-cs (PCMCIA) driver uses. - * On the plus side, the driver is also smaller/simpler this way. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive for - * more details. - */ - -#include -#include -#include -#include -#include - -#include - -/* - * No chip documentation has yet been found, - * so these configuration values were pulled from - * a running Win98 system using "debug". - * This gives around 3MByte/second read performance, - * which is about 2/3 of what the chip is capable of. - * - * There is also a 4KByte mmio region on the card, - * but its purpose has yet to be reverse-engineered. - */ -static const u8 setup[] = { - 0x00, 0x05, 0xbe, 0x01, 0x20, 0x8f, 0x00, 0x00, - 0xa4, 0x1f, 0xb3, 0x1b, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xa4, 0x83, 0x02, 0x13, -}; - -static const struct ide_port_ops delkin_cb_port_ops = { - .quirkproc = ide_undecoded_slave, -}; - -static int delkin_cb_init_chipset(struct pci_dev *dev) -{ - unsigned long base = pci_resource_start(dev, 0); - int i; - - outb(0x02, base + 0x1e); /* set nIEN to block interrupts */ - inb(base + 0x17); /* read status to clear interrupts */ - - for (i = 0; i < sizeof(setup); ++i) { - if (setup[i]) - outb(setup[i], base + i); - } - - return 0; -} - -static const struct ide_port_info delkin_cb_port_info = { - .port_ops = &delkin_cb_port_ops, - .host_flags = IDE_HFLAG_IO_32BIT | IDE_HFLAG_UNMASK_IRQS | - IDE_HFLAG_NO_DMA, - .irq_flags = IRQF_SHARED, - .init_chipset = delkin_cb_init_chipset, - .chipset = ide_pci, -}; - -static int delkin_cb_probe(struct pci_dev *dev, const struct pci_device_id *id) -{ - struct ide_host *host; - unsigned long base; - int rc; - struct ide_hw hw, *hws[] = { &hw }; - - rc = pci_enable_device(dev); - if (rc) { - printk(KERN_ERR "delkin_cb: pci_enable_device failed (%d)\n", rc); - return rc; - } - rc = pci_request_regions(dev, "delkin_cb"); - if (rc) { - printk(KERN_ERR "delkin_cb: pci_request_regions failed (%d)\n", rc); - pci_disable_device(dev); - return rc; - } - base = pci_resource_start(dev, 0); - - delkin_cb_init_chipset(dev); - - memset(&hw, 0, sizeof(hw)); - ide_std_init_ports(&hw, base + 0x10, base + 0x1e); - hw.irq = dev->irq; - hw.dev = &dev->dev; - - rc = ide_host_add(&delkin_cb_port_info, hws, 1, &host); - if (rc) - goto out_disable; - - pci_set_drvdata(dev, host); - - return 0; - -out_disable: - pci_release_regions(dev); - pci_disable_device(dev); - return rc; -} - -static void -delkin_cb_remove (struct pci_dev *dev) -{ - struct ide_host *host = pci_get_drvdata(dev); - - ide_host_remove(host); - - pci_release_regions(dev); - pci_disable_device(dev); -} - -#ifdef CONFIG_PM -static int delkin_cb_suspend(struct pci_dev *dev, pm_message_t state) -{ - pci_save_state(dev); - pci_disable_device(dev); - pci_set_power_state(dev, pci_choose_state(dev, state)); - - return 0; -} - -static int delkin_cb_resume(struct pci_dev *dev) -{ - struct ide_host *host = pci_get_drvdata(dev); - int rc; - - pci_set_power_state(dev, PCI_D0); - - rc = pci_enable_device(dev); - if (rc) - return rc; - - pci_restore_state(dev); - pci_set_master(dev); - - if (host->init_chipset) - host->init_chipset(dev); - - return 0; -} -#else -#define delkin_cb_suspend NULL -#define delkin_cb_resume NULL -#endif - -static struct pci_device_id delkin_cb_pci_tbl[] = { - { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, - { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, - { 0, }, -}; -MODULE_DEVICE_TABLE(pci, delkin_cb_pci_tbl); - -static struct pci_driver delkin_cb_pci_driver = { - .name = "Delkin-ASKA-Workbit Cardbus IDE", - .id_table = delkin_cb_pci_tbl, - .probe = delkin_cb_probe, - .remove = delkin_cb_remove, - .suspend = delkin_cb_suspend, - .resume = delkin_cb_resume, -}; - -module_pci_driver(delkin_cb_pci_driver); - -MODULE_AUTHOR("Mark Lord"); -MODULE_DESCRIPTION("Basic support for Delkin/ASKA/Workbit Cardbus IDE"); -MODULE_LICENSE("GPL"); -