From patchwork Mon Jul 22 19:15:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 169420 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp7888346ilk; Mon, 22 Jul 2019 12:17:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqjEBXusy5DAfprmtB5C7u2Mv5slEX1OxmzH4F1Sa89IHNmQp4obkefIWcqtDlRmWNLOR0 X-Received: by 2002:a65:6288:: with SMTP id f8mr67683743pgv.292.1563823027280; Mon, 22 Jul 2019 12:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563823027; cv=none; d=google.com; s=arc-20160816; b=kCjoGPkxTkzTviFY5SdKYJwFRfhf2JOpk0JfFP7w+TiqApoRJy/CXVVNsNTz6Jp/eN IS5q0MxA8nT23C7g9JZ89YzUlfkeXgmDgpaayVC63bEyUC/xUjADrTWfjO23js/4nFJc xufO2x592opEiRQiv9IiMwlwn8Z3SAfsviy2Z+39E/DoEFiOG3o1pGlQqQLNBxllARex OFteCDI2+XK3wcjLSeRVgmXpNGVE0iP2kFgUundUqss+uTUloWrXg2iICR+KP+oaPuL8 xfjCB3HHKbQWVeExfQidcUpLMOVQswl91a8FOL3OVwK1sqLlWClvzpx7bnGWgeRbXDZ8 gukQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FBOwIMYCPVwDdmcWOxZbmYzw9c7QWKYq/lJ1ofeicPg=; b=dK4ZHJk6MwOah98Ejj1H+lan7EcWb9TLN4Rc+345LdQOMiqB495s0xYyE8aaAQtKfv tUOMSLRWRkumAFzMeSa2XSW38C/RUQ/D/h0Dunx5nBvLzyG+vq2ieS7trvUKcInzu70W 8GXkiw60Sk5WbPkt9B6zRfIIGPiHtVvEZNUuE2gFDlZCc2kfGXWZciuoypbhsaaPEvMV KGOasE8FtPdmsXLyqMmkIQtVQiF9Sc0tv+3FSEYix2m3RMmOopNk44gorKCkPsnzvRrP Q7xWcjWUeHUMB9XlHdwJ1vNaXo4UtwEDEpl9vYLfXsPjQXsEQT+xEMpGBUDNDSVcFU9r /8fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9si9771949pgv.531.2019.07.22.12.17.07; Mon, 22 Jul 2019 12:17:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727297AbfGVTRG (ORCPT + 1 other); Mon, 22 Jul 2019 15:17:06 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:35147 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727082AbfGVTRG (ORCPT ); Mon, 22 Jul 2019 15:17:06 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MGA0o-1hdaZz2K44-00Gd6p; Mon, 22 Jul 2019 21:16:51 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: netdev@vger.kernel.org, linux-serial@vger.kernel.org, tglx@linutronix.de, davem@davemloft.net, Sascha Hauer , Michael Trensch , Linus Walleij , Robert Schwebel , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] uio: remove netx driver Date: Mon, 22 Jul 2019 21:15:05 +0200 Message-Id: <20190722191552.252805-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190722191552.252805-1-arnd@arndb.de> References: <20190722191552.252805-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:00sVbYfrpoKwOnMbAleVAvbSIJM5BWQIsOng1dX0ePzyszDnE0p /3CLzCNzgue1lSUEvLBSBh9c26J3ym78MdKTtcDg0lrr+o46P+hNSh3wqqiscPusb00Key4 UCe3rn2D5Afu6oWjAERKqTSyhskx4M4nohjCLFwwLoN4pa3ThokAdgzMmYbtGn99Vx/YKlQ gLOx8kNwl8eEg5UlHQauA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:fhQWfFvCMCo=:wffhrZiYImFmn2Ebqh2eut qNoDKZfsBLGfI5/BXxQX19GMz60sK5ODqBmu6HLHNTUUztRW+8tPq8+U1Ktl0VC/YTT+abX7M kqy7QoEDbS7R8ctvaluiw4ZmXxp6S5j//sAeBkgFjIhM1zsZbVA8RVlIDnbW8AUi67UmFBE/A aOaOKZ14IL/d+4HW4/LTL3J0yS7Oh7luk08OprbmQCV6RTj9dmtYplUBzTfAjkpuXuDFCQBNN lL1ig3SC0UAG+iTxnvod7R1tiCSP4qZIV4hqEuiF3UxUpI4y6RGFu2VEqNHGS86BTao1hUm0u 4sFSHPgdKO33h1sD5zYPcSTzPEBUpRcw6L2Msv4uqc8QIgecCf0rgdQXZZ0M6tfYcKqQsfnfP O/8zRj6bAwDmaVUJyTZs5nBHKceBGQdHY3F6aHs0mNZcsKOYvaJmVQnMZHaPF143Cl/RQzRoY iEeUpj1CotLsPmy+fTUgyKJp4JPgq1ppcnZv19+iX7I/9cA96P9nVwiYSfbmdeRF1sgnlrGFk BpJJdfZVOdcFot0QxISiIRvFToET6vc2/jJoT4n7Gt0oPnEuQ6StPdGyLFO628s8IGplYmqe3 d60jBSh0tgkevXcVUoGQke5WBqjgV1Hyn6a2rE49SQwwv7+uj5vWZBwQXTD47xcB/HXDcEYdk rv6qJiHAY6VkA+Za2a7s4BlLhpCROJr2mDd43h4UW7KadYEJ4MTSY3aYkk7Rd56ddJYYjxmP0 Rx00hifgbMI9DjhyvDKyMIw19H9hLELpxND/VQ== Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org The netx platform got removed, so this driver is now useless. Signed-off-by: Arnd Bergmann --- drivers/uio/Kconfig | 11 --- drivers/uio/Makefile | 1 - drivers/uio/uio_netx.c | 178 ----------------------------------------- 3 files changed, 190 deletions(-) delete mode 100644 drivers/uio/uio_netx.c -- 2.20.0 diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig index 202ee81cfc2b..abc8dd97b474 100644 --- a/drivers/uio/Kconfig +++ b/drivers/uio/Kconfig @@ -94,17 +94,6 @@ config UIO_PCI_GENERIC primarily, for virtualization scenarios. If you compile this as a module, it will be called uio_pci_generic. -config UIO_NETX - tristate "Hilscher NetX Card driver" - depends on PCI - help - Driver for Hilscher NetX based fieldbus cards (cifX, comX). - This driver requires a userspace component that comes with the card - or is available from Hilscher (http://www.hilscher.com). - - To compile this driver as a module, choose M here; the module - will be called uio_netx. - config UIO_FSL_ELBC_GPCM tristate "eLBC/GPCM driver" depends on FSL_LBC diff --git a/drivers/uio/Makefile b/drivers/uio/Makefile index c285dd2a4539..d94012263a42 100644 --- a/drivers/uio/Makefile +++ b/drivers/uio/Makefile @@ -6,7 +6,6 @@ obj-$(CONFIG_UIO_DMEM_GENIRQ) += uio_dmem_genirq.o obj-$(CONFIG_UIO_AEC) += uio_aec.o obj-$(CONFIG_UIO_SERCOS3) += uio_sercos3.o obj-$(CONFIG_UIO_PCI_GENERIC) += uio_pci_generic.o -obj-$(CONFIG_UIO_NETX) += uio_netx.o obj-$(CONFIG_UIO_PRUSS) += uio_pruss.o obj-$(CONFIG_UIO_MF624) += uio_mf624.o obj-$(CONFIG_UIO_FSL_ELBC_GPCM) += uio_fsl_elbc_gpcm.o diff --git a/drivers/uio/uio_netx.c b/drivers/uio/uio_netx.c deleted file mode 100644 index 9ae29ffde410..000000000000 --- a/drivers/uio/uio_netx.c +++ /dev/null @@ -1,178 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * UIO driver for Hilscher NetX based fieldbus cards (cifX, comX). - * See http://www.hilscher.com for details. - * - * (C) 2007 Hans J. Koch - * (C) 2008 Manuel Traut - * - */ - -#include -#include -#include -#include -#include -#include - -#define PCI_VENDOR_ID_HILSCHER 0x15CF -#define PCI_DEVICE_ID_HILSCHER_NETX 0x0000 -#define PCI_DEVICE_ID_HILSCHER_NETPLC 0x0010 -#define PCI_SUBDEVICE_ID_NETPLC_RAM 0x0000 -#define PCI_SUBDEVICE_ID_NETPLC_FLASH 0x0001 -#define PCI_SUBDEVICE_ID_NXSB_PCA 0x3235 -#define PCI_SUBDEVICE_ID_NXPCA 0x3335 - -#define DPM_HOST_INT_EN0 0xfff0 -#define DPM_HOST_INT_STAT0 0xffe0 - -#define DPM_HOST_INT_MASK 0xe600ffff -#define DPM_HOST_INT_GLOBAL_EN 0x80000000 - -static irqreturn_t netx_handler(int irq, struct uio_info *dev_info) -{ - void __iomem *int_enable_reg = dev_info->mem[0].internal_addr - + DPM_HOST_INT_EN0; - void __iomem *int_status_reg = dev_info->mem[0].internal_addr - + DPM_HOST_INT_STAT0; - - /* Is one of our interrupts enabled and active ? */ - if (!(ioread32(int_enable_reg) & ioread32(int_status_reg) - & DPM_HOST_INT_MASK)) - return IRQ_NONE; - - /* Disable interrupt */ - iowrite32(ioread32(int_enable_reg) & ~DPM_HOST_INT_GLOBAL_EN, - int_enable_reg); - return IRQ_HANDLED; -} - -static int netx_pci_probe(struct pci_dev *dev, - const struct pci_device_id *id) -{ - struct uio_info *info; - int bar; - - info = kzalloc(sizeof(struct uio_info), GFP_KERNEL); - if (!info) - return -ENOMEM; - - if (pci_enable_device(dev)) - goto out_free; - - if (pci_request_regions(dev, "netx")) - goto out_disable; - - switch (id->device) { - case PCI_DEVICE_ID_HILSCHER_NETX: - bar = 0; - info->name = "netx"; - break; - case PCI_DEVICE_ID_HILSCHER_NETPLC: - bar = 0; - info->name = "netplc"; - break; - default: - bar = 2; - info->name = "netx_plx"; - } - - /* BAR0 or 2 points to the card's dual port memory */ - info->mem[0].addr = pci_resource_start(dev, bar); - if (!info->mem[0].addr) - goto out_release; - info->mem[0].internal_addr = ioremap(pci_resource_start(dev, bar), - pci_resource_len(dev, bar)); - - if (!info->mem[0].internal_addr) - goto out_release; - - info->mem[0].size = pci_resource_len(dev, bar); - info->mem[0].memtype = UIO_MEM_PHYS; - info->irq = dev->irq; - info->irq_flags = IRQF_SHARED; - info->handler = netx_handler; - info->version = "0.0.1"; - - /* Make sure all interrupts are disabled */ - iowrite32(0, info->mem[0].internal_addr + DPM_HOST_INT_EN0); - - if (uio_register_device(&dev->dev, info)) - goto out_unmap; - - pci_set_drvdata(dev, info); - dev_info(&dev->dev, "Found %s card, registered UIO device.\n", - info->name); - - return 0; - -out_unmap: - iounmap(info->mem[0].internal_addr); -out_release: - pci_release_regions(dev); -out_disable: - pci_disable_device(dev); -out_free: - kfree(info); - return -ENODEV; -} - -static void netx_pci_remove(struct pci_dev *dev) -{ - struct uio_info *info = pci_get_drvdata(dev); - - /* Disable all interrupts */ - iowrite32(0, info->mem[0].internal_addr + DPM_HOST_INT_EN0); - uio_unregister_device(info); - pci_release_regions(dev); - pci_disable_device(dev); - iounmap(info->mem[0].internal_addr); - - kfree(info); -} - -static struct pci_device_id netx_pci_ids[] = { - { - .vendor = PCI_VENDOR_ID_HILSCHER, - .device = PCI_DEVICE_ID_HILSCHER_NETX, - .subvendor = 0, - .subdevice = 0, - }, - { - .vendor = PCI_VENDOR_ID_HILSCHER, - .device = PCI_DEVICE_ID_HILSCHER_NETPLC, - .subvendor = PCI_VENDOR_ID_HILSCHER, - .subdevice = PCI_SUBDEVICE_ID_NETPLC_RAM, - }, - { - .vendor = PCI_VENDOR_ID_HILSCHER, - .device = PCI_DEVICE_ID_HILSCHER_NETPLC, - .subvendor = PCI_VENDOR_ID_HILSCHER, - .subdevice = PCI_SUBDEVICE_ID_NETPLC_FLASH, - }, - { - .vendor = PCI_VENDOR_ID_PLX, - .device = PCI_DEVICE_ID_PLX_9030, - .subvendor = PCI_VENDOR_ID_PLX, - .subdevice = PCI_SUBDEVICE_ID_NXSB_PCA, - }, - { - .vendor = PCI_VENDOR_ID_PLX, - .device = PCI_DEVICE_ID_PLX_9030, - .subvendor = PCI_VENDOR_ID_PLX, - .subdevice = PCI_SUBDEVICE_ID_NXPCA, - }, - { 0, } -}; - -static struct pci_driver netx_pci_driver = { - .name = "netx", - .id_table = netx_pci_ids, - .probe = netx_pci_probe, - .remove = netx_pci_remove, -}; - -module_pci_driver(netx_pci_driver); -MODULE_DEVICE_TABLE(pci, netx_pci_ids); -MODULE_LICENSE("GPL v2"); -MODULE_AUTHOR("Hans J. Koch, Manuel Traut");