From patchwork Mon Jul 22 19:15:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 169418 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp7887517ilk; Mon, 22 Jul 2019 12:16:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwoGJnrzDWfiTmD2RiQGy1Fz/IyOTlDtK4JqFTAoTBAYRo5ZudwPTYUunG4O/Kn0WOyyn1T X-Received: by 2002:a63:3147:: with SMTP id x68mr8906052pgx.212.1563822974273; Mon, 22 Jul 2019 12:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563822974; cv=none; d=google.com; s=arc-20160816; b=fn4OScRF4DDl9Pa2LIODnkl0z0A7tuj2x7ihu15tsgrnBO+EvMytGhcvcGsbOi+k3E 6k8gKXobwuqYabvk9xHCALfNsKVGiJJAeNsUbEg9RHGxp87z9t6C7rzT+YnxL8xaE+7p 32YYd695srSQEKQgWaYMOYepzbwbSrF0ojoT1rZgSDkO6uJKJu4y2WJ1cB0NKeOQIOB5 Hc0gI3ZSos/Xzmce5V+CUITMKxWtrwei/2Z7PYfbsblGQNdhTj4gXjCoDJAgY8BBbSjk DFn+Rjj5s0KLKHfgaTJmfbKZADDyR8i0j7vjjsUBHHLqWBjiSHLLgnk2c7+g1PDCsuqY uOxA== 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 :message-id:date:subject:cc:to:from; bh=5VLN39bfhTxP/MTDX9Su0aD5GfS2CA7PgJLXIf90so8=; b=zPanzPEfnA8wVfRuRWJQ270SQ/61CSs0x6kSS5VK817MOpLdnYEBa/50/Hi/WZArrI /GiPs+zZkY0hAb3ROThjuDFgoM4cLgTXaX8cnYo1yUjkDccPTG32fQ8h/HUwQAYdQ7R0 N19r6Es8/wEMyakx58gOCExYbf7zAt4tG7fhzF8rgR0IOtgmelOt4DP7jXh3re5fjP6n NgzPGNh92QHvjfHnuJzFeWzg77Fl4a5xENdKOPlzX0u4Bi4UOZsLQz8H0Z5tG2meUITz avOJPSB7l0ZXW/ogQA7qjV59kfO6hu2Q8Y1DFTqQHjREhNGX50ijen1IsLQrp8oCg1yN CBvA== 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 r15si9208358pgj.71.2019.07.22.12.16.13; Mon, 22 Jul 2019 12:16:14 -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 S1730612AbfGVTQN (ORCPT + 1 other); Mon, 22 Jul 2019 15:16:13 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:45085 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729110AbfGVTQN (ORCPT ); Mon, 22 Jul 2019 15:16:13 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MoOty-1iE1J53yWW-00orvr; Mon, 22 Jul 2019 21:15:56 +0200 From: Arnd Bergmann To: "David S. Miller" Cc: netdev@vger.kernel.org, linux-serial@vger.kernel.org, tglx@linutronix.de, gregkh@linuxfoundation.org, Sascha Hauer , Michael Trensch , Linus Walleij , Robert Schwebel , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] [net-next] net: remove netx ethernet driver Date: Mon, 22 Jul 2019 21:15:03 +0200 Message-Id: <20190722191552.252805-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:THfSje7TX/hTWLKdoJzi53l+VE4wOzd1ZOCnTQJXOEcjN0qrVf+ D3OadE3kBzjZlGGnidF8xtA4BDbpsJeMm63ZTHZK20at2RrlE23uiIDS81DdJ57X6uNhDDX pSZ2Ef7EGuu2QUXROBbKaDywfNyzGu6MW2K1itDzf9x6jGKBgS+CfJ8dhVB+V57mtV88cTN 2hktEmhvJAag/T2XYrUMQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:1OCaGb3wbO4=:+E/d6lTzN77Ug1Eeaqihh+ 7s3fnRR9TKE8QtKnEVGSZArI9onhcWybr1MoHpAdpzJtT1eWqPfmUSmFD/PcGm+vickEm+f9E 2KGzfRyxKq7ugRkdy/zSRK3rEaCsk/EgIvZcQA1TlRwT1dTEWmPiyyCxdDKRkmo6Fd6bsM5/M dxR5OBNh1XF8L9le4JglVIBtFQoQ1om/uXa8p8/Jsc4f9RM5FUwCQ2H6FNTlm0fKJqsW4Ro2o LeJazz2nQiQQyhJgXD8kb6sSUBsEJZn9mTbMGppYhqpDww1gtNIMJv1deOrzD24nczQgJ7nAr PPjKSpTPBo8MC3h4vQY5dmDgwwbqaKpZ9yCinJweYRFGU7odZLPDMbN71VMuo1VZ16TGOEkgz tqVMERtVpIbi0A8/BeOgpbmN6DrUcd9ywp3R4vXPlRjP5TwoiJdOxq7jsOU+j0TT2Na+E+90D WbuaCkd1QHY6lu3qdgYWn8D3V4gUiXff7Ub1c+JM9BwF0YZFXmNxG3JFU59KX13yn7/RdO12W ApLSjRCy7K2J37Ddpzb3tDb08sC2y16tG+1gOwQRjsfVFycrDYE4TC23a7wSCipFTiYuhQ1TJ EBzceGJAKabQLkLJ6kdTTCCmWGBxSFQAq3JAVLLOH5vfrLlnEPDveNLpQdwdrW63ZM7e3YK/a MmSPN8hx8/jxWp5MoJRrSPZNw/cDb4M+jant/U7aBUDTjqbh5xX7di7yX0pXvebpL4aRtp5TM rEBSoYOexf2hcKr34AdR8HVW4flKntKhQ12P9A== Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org The ARM netx platform got removed in 5.3, so this driver is now useless. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/Kconfig | 11 - drivers/net/ethernet/Makefile | 1 - drivers/net/ethernet/netx-eth.c | 497 ------------------------- include/linux/platform_data/eth-netx.h | 13 - 4 files changed, 522 deletions(-) delete mode 100644 drivers/net/ethernet/netx-eth.c delete mode 100644 include/linux/platform_data/eth-netx.h -- 2.20.0 diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig index 93a2d4deb27c..4a7ab1c2e22c 100644 --- a/drivers/net/ethernet/Kconfig +++ b/drivers/net/ethernet/Kconfig @@ -140,17 +140,6 @@ source "drivers/net/ethernet/neterion/Kconfig" source "drivers/net/ethernet/netronome/Kconfig" source "drivers/net/ethernet/ni/Kconfig" source "drivers/net/ethernet/8390/Kconfig" - -config NET_NETX - tristate "NetX Ethernet support" - select MII - depends on ARCH_NETX - ---help--- - This is support for the Hilscher netX builtin Ethernet ports - - To compile this driver as a module, choose M here. The module - will be called netx-eth. - source "drivers/net/ethernet/nuvoton/Kconfig" source "drivers/net/ethernet/nvidia/Kconfig" source "drivers/net/ethernet/nxp/Kconfig" diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile index fb9155cffcff..36fca4563201 100644 --- a/drivers/net/ethernet/Makefile +++ b/drivers/net/ethernet/Makefile @@ -64,7 +64,6 @@ obj-$(CONFIG_NET_VENDOR_NATSEMI) += natsemi/ obj-$(CONFIG_NET_VENDOR_NETERION) += neterion/ obj-$(CONFIG_NET_VENDOR_NETRONOME) += netronome/ obj-$(CONFIG_NET_VENDOR_NI) += ni/ -obj-$(CONFIG_NET_NETX) += netx-eth.o obj-$(CONFIG_NET_VENDOR_NUVOTON) += nuvoton/ obj-$(CONFIG_NET_VENDOR_NVIDIA) += nvidia/ obj-$(CONFIG_LPC_ENET) += nxp/ diff --git a/drivers/net/ethernet/netx-eth.c b/drivers/net/ethernet/netx-eth.c deleted file mode 100644 index cf6e7eb1b1e1..000000000000 --- a/drivers/net/ethernet/netx-eth.c +++ /dev/null @@ -1,497 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * drivers/net/ethernet/netx-eth.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/* XC Fifo Offsets */ -#define EMPTY_PTR_FIFO(xcno) (0 + ((xcno) << 3)) /* Index of the empty pointer FIFO */ -#define IND_FIFO_PORT_HI(xcno) (1 + ((xcno) << 3)) /* Index of the FIFO where received */ - /* Data packages are indicated by XC */ -#define IND_FIFO_PORT_LO(xcno) (2 + ((xcno) << 3)) /* Index of the FIFO where received */ - /* Data packages are indicated by XC */ -#define REQ_FIFO_PORT_HI(xcno) (3 + ((xcno) << 3)) /* Index of the FIFO where Data packages */ - /* have to be indicated by ARM which */ - /* shall be sent */ -#define REQ_FIFO_PORT_LO(xcno) (4 + ((xcno) << 3)) /* Index of the FIFO where Data packages */ - /* have to be indicated by ARM which shall */ - /* be sent */ -#define CON_FIFO_PORT_HI(xcno) (5 + ((xcno) << 3)) /* Index of the FIFO where sent Data packages */ - /* are confirmed */ -#define CON_FIFO_PORT_LO(xcno) (6 + ((xcno) << 3)) /* Index of the FIFO where sent Data */ - /* packages are confirmed */ -#define PFIFO_MASK(xcno) (0x7f << (xcno*8)) - -#define FIFO_PTR_FRAMELEN_SHIFT 0 -#define FIFO_PTR_FRAMELEN_MASK (0x7ff << 0) -#define FIFO_PTR_FRAMELEN(len) (((len) << 0) & FIFO_PTR_FRAMELEN_MASK) -#define FIFO_PTR_TIMETRIG (1<<11) -#define FIFO_PTR_MULTI_REQ -#define FIFO_PTR_ORIGIN (1<<14) -#define FIFO_PTR_VLAN (1<<15) -#define FIFO_PTR_FRAMENO_SHIFT 16 -#define FIFO_PTR_FRAMENO_MASK (0x3f << 16) -#define FIFO_PTR_FRAMENO(no) (((no) << 16) & FIFO_PTR_FRAMENO_MASK) -#define FIFO_PTR_SEGMENT_SHIFT 22 -#define FIFO_PTR_SEGMENT_MASK (0xf << 22) -#define FIFO_PTR_SEGMENT(seg) (((seg) & 0xf) << 22) -#define FIFO_PTR_ERROR_SHIFT 28 -#define FIFO_PTR_ERROR_MASK (0xf << 28) - -#define ISR_LINK_STATUS_CHANGE (1<<4) -#define ISR_IND_LO (1<<3) -#define ISR_CON_LO (1<<2) -#define ISR_IND_HI (1<<1) -#define ISR_CON_HI (1<<0) - -#define ETH_MAC_LOCAL_CONFIG 0x1560 -#define ETH_MAC_4321 0x1564 -#define ETH_MAC_65 0x1568 - -#define MAC_TRAFFIC_CLASS_ARRANGEMENT_SHIFT 16 -#define MAC_TRAFFIC_CLASS_ARRANGEMENT_MASK (0xf<data; - unsigned int len = skb->len; - - spin_lock_irq(&priv->lock); - memcpy_toio(priv->sram_base + 1560, (void *)buf, len); - if (len < 60) { - memset_io(priv->sram_base + 1560 + len, 0, 60 - len); - len = 60; - } - - pfifo_push(REQ_FIFO_PORT_LO(priv->id), - FIFO_PTR_SEGMENT(priv->id) | - FIFO_PTR_FRAMENO(1) | - FIFO_PTR_FRAMELEN(len)); - - ndev->stats.tx_packets++; - ndev->stats.tx_bytes += skb->len; - - netif_stop_queue(ndev); - spin_unlock_irq(&priv->lock); - dev_kfree_skb(skb); - - return NETDEV_TX_OK; -} - -static void netx_eth_receive(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - unsigned int val, frameno, seg, len; - unsigned char *data; - struct sk_buff *skb; - - val = pfifo_pop(IND_FIFO_PORT_LO(priv->id)); - - frameno = (val & FIFO_PTR_FRAMENO_MASK) >> FIFO_PTR_FRAMENO_SHIFT; - seg = (val & FIFO_PTR_SEGMENT_MASK) >> FIFO_PTR_SEGMENT_SHIFT; - len = (val & FIFO_PTR_FRAMELEN_MASK) >> FIFO_PTR_FRAMELEN_SHIFT; - - skb = netdev_alloc_skb(ndev, len); - if (unlikely(skb == NULL)) { - ndev->stats.rx_dropped++; - return; - } - - data = skb_put(skb, len); - - memcpy_fromio(data, priv->sram_base + frameno * 1560, len); - - pfifo_push(EMPTY_PTR_FIFO(priv->id), - FIFO_PTR_SEGMENT(seg) | FIFO_PTR_FRAMENO(frameno)); - - skb->protocol = eth_type_trans(skb, ndev); - netif_rx(skb); - ndev->stats.rx_packets++; - ndev->stats.rx_bytes += len; -} - -static irqreturn_t -netx_eth_interrupt(int irq, void *dev_id) -{ - struct net_device *ndev = dev_id; - struct netx_eth_priv *priv = netdev_priv(ndev); - int status; - unsigned long flags; - - spin_lock_irqsave(&priv->lock, flags); - - status = readl(NETX_PFIFO_XPEC_ISR(priv->id)); - while (status) { - int fill_level; - writel(status, NETX_PFIFO_XPEC_ISR(priv->id)); - - if ((status & ISR_CON_HI) || (status & ISR_IND_HI)) - printk("%s: unexpected status: 0x%08x\n", - __func__, status); - - fill_level = - readl(NETX_PFIFO_FILL_LEVEL(IND_FIFO_PORT_LO(priv->id))); - while (fill_level--) - netx_eth_receive(ndev); - - if (status & ISR_CON_LO) - netif_wake_queue(ndev); - - if (status & ISR_LINK_STATUS_CHANGE) - mii_check_media(&priv->mii, netif_msg_link(priv), 1); - - status = readl(NETX_PFIFO_XPEC_ISR(priv->id)); - } - spin_unlock_irqrestore(&priv->lock, flags); - return IRQ_HANDLED; -} - -static int netx_eth_open(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - - if (request_irq - (ndev->irq, netx_eth_interrupt, IRQF_SHARED, ndev->name, ndev)) - return -EAGAIN; - - writel(ndev->dev_addr[0] | - ndev->dev_addr[1]<<8 | - ndev->dev_addr[2]<<16 | - ndev->dev_addr[3]<<24, - priv->xpec_base + NETX_XPEC_RAM_START_OFS + ETH_MAC_4321); - writel(ndev->dev_addr[4] | - ndev->dev_addr[5]<<8, - priv->xpec_base + NETX_XPEC_RAM_START_OFS + ETH_MAC_65); - - writel(LOCAL_CONFIG_LINK_STATUS_IRQ_EN | - LOCAL_CONFIG_CON_LO_IRQ_EN | - LOCAL_CONFIG_CON_HI_IRQ_EN | - LOCAL_CONFIG_IND_LO_IRQ_EN | - LOCAL_CONFIG_IND_HI_IRQ_EN, - priv->xpec_base + NETX_XPEC_RAM_START_OFS + - ETH_MAC_LOCAL_CONFIG); - - mii_check_media(&priv->mii, netif_msg_link(priv), 1); - netif_start_queue(ndev); - - return 0; -} - -static int netx_eth_close(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - - netif_stop_queue(ndev); - - writel(0, - priv->xpec_base + NETX_XPEC_RAM_START_OFS + ETH_MAC_LOCAL_CONFIG); - - free_irq(ndev->irq, ndev); - - return 0; -} - -static void netx_eth_timeout(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - int i; - - printk(KERN_ERR "%s: transmit timed out, resetting\n", ndev->name); - - spin_lock_irq(&priv->lock); - - xc_reset(priv->xc); - xc_start(priv->xc); - - for (i=2; i<=18; i++) - pfifo_push(EMPTY_PTR_FIFO(priv->id), - FIFO_PTR_FRAMENO(i) | FIFO_PTR_SEGMENT(priv->id)); - - spin_unlock_irq(&priv->lock); - - netif_wake_queue(ndev); -} - -static int -netx_eth_phy_read(struct net_device *ndev, int phy_id, int reg) -{ - unsigned int val; - - val = MIIMU_SNRDY | MIIMU_PREAMBLE | MIIMU_PHYADDR(phy_id) | - MIIMU_REGADDR(reg) | MIIMU_PHY_NRES; - - writel(val, NETX_MIIMU); - while (readl(NETX_MIIMU) & MIIMU_SNRDY); - - return readl(NETX_MIIMU) >> 16; - -} - -static void -netx_eth_phy_write(struct net_device *ndev, int phy_id, int reg, int value) -{ - unsigned int val; - - val = MIIMU_SNRDY | MIIMU_PREAMBLE | MIIMU_PHYADDR(phy_id) | - MIIMU_REGADDR(reg) | MIIMU_PHY_NRES | MIIMU_OPMODE_WRITE | - MIIMU_DATA(value); - - writel(val, NETX_MIIMU); - while (readl(NETX_MIIMU) & MIIMU_SNRDY); -} - -static const struct net_device_ops netx_eth_netdev_ops = { - .ndo_open = netx_eth_open, - .ndo_stop = netx_eth_close, - .ndo_start_xmit = netx_eth_hard_start_xmit, - .ndo_tx_timeout = netx_eth_timeout, - .ndo_set_rx_mode = netx_eth_set_multicast_list, - .ndo_validate_addr = eth_validate_addr, - .ndo_set_mac_address = eth_mac_addr, -}; - -static int netx_eth_enable(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - unsigned int mac4321, mac65; - int running, i, ret; - bool inv_mac_addr = false; - - ndev->netdev_ops = &netx_eth_netdev_ops; - ndev->watchdog_timeo = msecs_to_jiffies(5000); - - priv->msg_enable = NETIF_MSG_LINK; - priv->mii.phy_id_mask = 0x1f; - priv->mii.reg_num_mask = 0x1f; - priv->mii.force_media = 0; - priv->mii.full_duplex = 0; - priv->mii.dev = ndev; - priv->mii.mdio_read = netx_eth_phy_read; - priv->mii.mdio_write = netx_eth_phy_write; - priv->mii.phy_id = INTERNAL_PHY_ADR + priv->id; - - running = xc_running(priv->xc); - xc_stop(priv->xc); - - /* if the xc engine is already running, assume the bootloader has - * loaded the firmware for us - */ - if (running) { - /* get Node Address from hardware */ - mac4321 = readl(priv->xpec_base + - NETX_XPEC_RAM_START_OFS + ETH_MAC_4321); - mac65 = readl(priv->xpec_base + - NETX_XPEC_RAM_START_OFS + ETH_MAC_65); - - ndev->dev_addr[0] = mac4321 & 0xff; - ndev->dev_addr[1] = (mac4321 >> 8) & 0xff; - ndev->dev_addr[2] = (mac4321 >> 16) & 0xff; - ndev->dev_addr[3] = (mac4321 >> 24) & 0xff; - ndev->dev_addr[4] = mac65 & 0xff; - ndev->dev_addr[5] = (mac65 >> 8) & 0xff; - } else { - if (xc_request_firmware(priv->xc)) { - printk(CARDNAME ": requesting firmware failed\n"); - return -ENODEV; - } - } - - xc_reset(priv->xc); - xc_start(priv->xc); - - if (!is_valid_ether_addr(ndev->dev_addr)) - inv_mac_addr = true; - - for (i=2; i<=18; i++) - pfifo_push(EMPTY_PTR_FIFO(priv->id), - FIFO_PTR_FRAMENO(i) | FIFO_PTR_SEGMENT(priv->id)); - - ret = register_netdev(ndev); - if (inv_mac_addr) - printk("%s: Invalid ethernet MAC address. Please set using ip\n", - ndev->name); - - return ret; -} - -static int netx_eth_drv_probe(struct platform_device *pdev) -{ - struct netx_eth_priv *priv; - struct net_device *ndev; - struct netxeth_platform_data *pdata; - int ret; - - ndev = alloc_etherdev(sizeof (struct netx_eth_priv)); - if (!ndev) { - ret = -ENOMEM; - goto exit; - } - SET_NETDEV_DEV(ndev, &pdev->dev); - - platform_set_drvdata(pdev, ndev); - - priv = netdev_priv(ndev); - - pdata = dev_get_platdata(&pdev->dev); - priv->xc = request_xc(pdata->xcno, &pdev->dev); - if (!priv->xc) { - dev_err(&pdev->dev, "unable to request xc engine\n"); - ret = -ENODEV; - goto exit_free_netdev; - } - - ndev->irq = priv->xc->irq; - priv->id = pdev->id; - priv->xpec_base = priv->xc->xpec_base; - priv->xmac_base = priv->xc->xmac_base; - priv->sram_base = priv->xc->sram_base; - - spin_lock_init(&priv->lock); - - ret = pfifo_request(PFIFO_MASK(priv->id)); - if (ret) { - printk("unable to request PFIFO\n"); - goto exit_free_xc; - } - - ret = netx_eth_enable(ndev); - if (ret) - goto exit_free_pfifo; - - return 0; -exit_free_pfifo: - pfifo_free(PFIFO_MASK(priv->id)); -exit_free_xc: - free_xc(priv->xc); -exit_free_netdev: - free_netdev(ndev); -exit: - return ret; -} - -static int netx_eth_drv_remove(struct platform_device *pdev) -{ - struct net_device *ndev = platform_get_drvdata(pdev); - struct netx_eth_priv *priv = netdev_priv(ndev); - - unregister_netdev(ndev); - xc_stop(priv->xc); - free_xc(priv->xc); - free_netdev(ndev); - pfifo_free(PFIFO_MASK(priv->id)); - - return 0; -} - -static int netx_eth_drv_suspend(struct platform_device *pdev, pm_message_t state) -{ - dev_err(&pdev->dev, "suspend not implemented\n"); - return 0; -} - -static int netx_eth_drv_resume(struct platform_device *pdev) -{ - dev_err(&pdev->dev, "resume not implemented\n"); - return 0; -} - -static struct platform_driver netx_eth_driver = { - .probe = netx_eth_drv_probe, - .remove = netx_eth_drv_remove, - .suspend = netx_eth_drv_suspend, - .resume = netx_eth_drv_resume, - .driver = { - .name = CARDNAME, - }, -}; - -static int __init netx_eth_init(void) -{ - unsigned int phy_control, val; - - printk("NetX Ethernet driver\n"); - - phy_control = PHY_CONTROL_PHY_ADDRESS(INTERNAL_PHY_ADR>>1) | - PHY_CONTROL_PHY1_MODE(PHY_MODE_ALL) | - PHY_CONTROL_PHY1_AUTOMDIX | - PHY_CONTROL_PHY1_EN | - PHY_CONTROL_PHY0_MODE(PHY_MODE_ALL) | - PHY_CONTROL_PHY0_AUTOMDIX | - PHY_CONTROL_PHY0_EN | - PHY_CONTROL_CLK_XLATIN; - - val = readl(NETX_SYSTEM_IOC_ACCESS_KEY); - writel(val, NETX_SYSTEM_IOC_ACCESS_KEY); - - writel(phy_control | PHY_CONTROL_RESET, NETX_SYSTEM_PHY_CONTROL); - udelay(100); - - val = readl(NETX_SYSTEM_IOC_ACCESS_KEY); - writel(val, NETX_SYSTEM_IOC_ACCESS_KEY); - - writel(phy_control, NETX_SYSTEM_PHY_CONTROL); - - return platform_driver_register(&netx_eth_driver); -} - -static void __exit netx_eth_cleanup(void) -{ - platform_driver_unregister(&netx_eth_driver); -} - -module_init(netx_eth_init); -module_exit(netx_eth_cleanup); - -MODULE_AUTHOR("Sascha Hauer, Pengutronix"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" CARDNAME); -MODULE_FIRMWARE("xc0.bin"); -MODULE_FIRMWARE("xc1.bin"); -MODULE_FIRMWARE("xc2.bin"); diff --git a/include/linux/platform_data/eth-netx.h b/include/linux/platform_data/eth-netx.h deleted file mode 100644 index a3a6322668d8..000000000000 --- a/include/linux/platform_data/eth-netx.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2005 Sascha Hauer , Pengutronix - */ - -#ifndef __ETH_NETX_H -#define __ETH_NETX_H - -struct netxeth_platform_data { - unsigned int xcno; /* number of xmac/xpec engine this eth uses */ -}; - -#endif From patchwork Mon Jul 22 19:15:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 169419 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp7888122ilk; Mon, 22 Jul 2019 12:16:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcP+vn8BxiDPVfDNkHNz6NHu9BM/bUbTf76Nv5VOMazkBcJsbQOd/uIzxpUtM27Vt2ISZ+ X-Received: by 2002:a17:902:6847:: with SMTP id f7mr75053558pln.311.1563823011752; Mon, 22 Jul 2019 12:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563823011; cv=none; d=google.com; s=arc-20160816; b=eZ9va1TdSGZ3OR7bAb0rLOm4t/Plr7YyySDnTsw275VSQDtiZ36U2o+HgUn72VJUj5 LTQWz/wjNxOkHrWDT17RLwAxPczcRhrxkUOOMOYR7pASgYmAJX33hf//Y+XXh/5IxFtP n/abX3jfpd+FaHJnZyb9KxaWarPUCe/UfKu0IEoDBGxPvO1NdPoAryczb//eAA6GJuBX /cbnagjFGHLvtWyr/AkW205wW42kpBmFgcABKY0gsTl9G68xM0Q3p64jJeYjIbbmFLI1 hDZY9ZQJXS8mDGX1HOQCPMwaZrVYZo01A7kP5u7RsgORETyMK5mIA1K7HgC6zZtxxRKi jwNQ== 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=48ZMPewUENxu+bDTJ6tWf5tygrNRmJ9HdKTL6S4Lg6c=; b=taKnQcL1N2O6zpYXgzob3BsnnSRZ4hR2ohOoJP6t/zpWLsazrF2M0T3UQi3u5a7Ojr OmPbPQ0O06RMRSNrxKRUGu1OJwz9StHQLidTuxsjTgKjBMDHJY2JQVly+0tXCwFaGt9k OdJ+o9rMU2rEtHH2bKlwJBRyCgSyiLmwWK6eXf421USdqq8CMJXxN29h9NuTLpAYzJoK QfrhIkFy9PliWd+iuY/sTnMAp65wGt7Dju8eSM31WCWCXFVNw8n8nv9e2cdw3oszczde aqXb+TVhpjBvjnXmr2HT+M6to9XTKhW92jg3o4Rg2NPepLMOiDcutiL5ejPmpCDpvTtf HPPQ== 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 w184si14275610pgd.394.2019.07.22.12.16.51; Mon, 22 Jul 2019 12:16:51 -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 S1727313AbfGVTQv (ORCPT + 1 other); Mon, 22 Jul 2019 15:16:51 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:56237 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727082AbfGVTQv (ORCPT ); Mon, 22 Jul 2019 15:16:51 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1N6szR-1iUJUo2y0V-018Jn6; Mon, 22 Jul 2019 21:16:29 +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 , Jiri Slaby , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] serial: remove netx serial driver Date: Mon, 22 Jul 2019 21:15:04 +0200 Message-Id: <20190722191552.252805-2-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:0CApa4CBPs1P4bcVcbpr7+IlqnQgL7QkguQDGaAG9hPQe3EfczS 6d1gY7NOgIY3ilJjTZb58tiWen1eWsAScbxwGiNHbUkGv+Szga5eE72Iu04nX9ce0/DK1Uh OguXOueojkW1vxzD4Qbtxli/4cGMXPCS9ikuMbKQbN8chJVPl9AVsIgEpYkPYgop+FYhl6L xZHltaEKimhXkM1pg7f5g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:LfzNjNX82C8=:2FnJqsFKR2Aa5h4fEGNWXU WvtPjWKAqWCpyrbdirpPZyvbQuwJa3/jN9FNs1OJGRHZXpFDnyPlexPWMjlUeGXJ0KINyedMi hmISwCBznKZKzkR/OJDW7wIghxnq/xFw/50Vw8ufEjGb6Pnw2nI7AGeM8xz4ntnqttSgfhRwQ 9WBxhCP86UHQ7wocJOQKl0SOmD5CBbhERk3vb3dTUOXAAW8v5JbwtccrAdJ0RWBVSNlG6DkEe O/gI2bVYx9sWKeKa+GWsMaDa5AdTBsyw8FoB8T2ts7SR7KlY7zTj1fNleoHOq+5CAXZ6f19W4 tRJBBUdpRRmNObtTK6WIw2/xTRgAnqx6jyTTDo3X23jEmFYNnooydm4oQ2+W/m3yqR6bnDd5O UgyzpX2q1xhlkGe2oWr/jBBJRNGxiIKVK/lQU+7Vh5YVOEKgsYrHw2dElFZ5z/66WgitdRzjw TJ69N7qYTt2kkCXuGfiGhJePq2LFNzbQfreYSexQ17NCabmlj5yTh1zm8XOwvVZJy6uCrKiUu 1s3534ZLgad1BRpEep2ZKa4+j2nQTWP03Sk28HgY4IMunoEB5pcFgUJfwtWTSCZh+bSpkNFmQ TSS1zt1eDn0SkWZuyHblvmye4IC/HxqrVnSZL/1DAhYk1eJmzJFMIXqLjOhcKiqJ9iJfD8DuH degPO3tOQYgAT1YexIapPQoZiPNajz9/2EABJpAMtRFKXIkkvfmbImlNht7ifHcws/YIl5K6M 6zMCl/yni+qaX6fyN8VWHYLupC2L9oNZW7jbQw== 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/tty/serial/Kconfig | 19 - drivers/tty/serial/Makefile | 1 - drivers/tty/serial/netx-serial.c | 733 ------------------------------- include/uapi/linux/serial_core.h | 2 +- 4 files changed, 1 insertion(+), 754 deletions(-) delete mode 100644 drivers/tty/serial/netx-serial.c -- 2.20.0 diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 6393e5960813..bdacaa5c1618 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -1035,25 +1035,6 @@ config SERIAL_VT8500_CONSOLE depends on SERIAL_VT8500=y select SERIAL_CORE_CONSOLE -config SERIAL_NETX - tristate "NetX serial port support" - depends on ARCH_NETX - select SERIAL_CORE - help - If you have a machine based on a Hilscher NetX SoC you - can enable its onboard serial port by enabling this option. - - To compile this driver as a module, choose M here: the - module will be called netx-serial. - -config SERIAL_NETX_CONSOLE - bool "Console on NetX serial port" - depends on SERIAL_NETX=y - select SERIAL_CORE_CONSOLE - help - If you have enabled the serial port on the Hilscher NetX SoC - you can make it the console by answering Y to this option. - config SERIAL_OMAP tristate "OMAP serial port support" depends on ARCH_OMAP2PLUS diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile index 12fd93cc7b0f..ca520d8774cf 100644 --- a/drivers/tty/serial/Makefile +++ b/drivers/tty/serial/Makefile @@ -59,7 +59,6 @@ obj-$(CONFIG_SERIAL_ATMEL) += atmel_serial.o obj-$(CONFIG_SERIAL_UARTLITE) += uartlite.o obj-$(CONFIG_SERIAL_MSM) += msm_serial.o obj-$(CONFIG_SERIAL_QCOM_GENI) += qcom_geni_serial.o -obj-$(CONFIG_SERIAL_NETX) += netx-serial.o obj-$(CONFIG_SERIAL_KS8695) += serial_ks8695.o obj-$(CONFIG_SERIAL_OMAP) += omap-serial.o obj-$(CONFIG_SERIAL_ALTERA_UART) += altera_uart.o diff --git a/drivers/tty/serial/netx-serial.c b/drivers/tty/serial/netx-serial.c deleted file mode 100644 index b3556863491f..000000000000 --- a/drivers/tty/serial/netx-serial.c +++ /dev/null @@ -1,733 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) 2005 Sascha Hauer , Pengutronix - */ - -#if defined(CONFIG_SERIAL_NETX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/* We've been assigned a range on the "Low-density serial ports" major */ -#define SERIAL_NX_MAJOR 204 -#define MINOR_START 170 - -enum uart_regs { - UART_DR = 0x00, - UART_SR = 0x04, - UART_LINE_CR = 0x08, - UART_BAUDDIV_MSB = 0x0c, - UART_BAUDDIV_LSB = 0x10, - UART_CR = 0x14, - UART_FR = 0x18, - UART_IIR = 0x1c, - UART_ILPR = 0x20, - UART_RTS_CR = 0x24, - UART_RTS_LEAD = 0x28, - UART_RTS_TRAIL = 0x2c, - UART_DRV_ENABLE = 0x30, - UART_BRM_CR = 0x34, - UART_RXFIFO_IRQLEVEL = 0x38, - UART_TXFIFO_IRQLEVEL = 0x3c, -}; - -#define SR_FE (1<<0) -#define SR_PE (1<<1) -#define SR_BE (1<<2) -#define SR_OE (1<<3) - -#define LINE_CR_BRK (1<<0) -#define LINE_CR_PEN (1<<1) -#define LINE_CR_EPS (1<<2) -#define LINE_CR_STP2 (1<<3) -#define LINE_CR_FEN (1<<4) -#define LINE_CR_5BIT (0<<5) -#define LINE_CR_6BIT (1<<5) -#define LINE_CR_7BIT (2<<5) -#define LINE_CR_8BIT (3<<5) -#define LINE_CR_BITS_MASK (3<<5) - -#define CR_UART_EN (1<<0) -#define CR_SIREN (1<<1) -#define CR_SIRLP (1<<2) -#define CR_MSIE (1<<3) -#define CR_RIE (1<<4) -#define CR_TIE (1<<5) -#define CR_RTIE (1<<6) -#define CR_LBE (1<<7) - -#define FR_CTS (1<<0) -#define FR_DSR (1<<1) -#define FR_DCD (1<<2) -#define FR_BUSY (1<<3) -#define FR_RXFE (1<<4) -#define FR_TXFF (1<<5) -#define FR_RXFF (1<<6) -#define FR_TXFE (1<<7) - -#define IIR_MIS (1<<0) -#define IIR_RIS (1<<1) -#define IIR_TIS (1<<2) -#define IIR_RTIS (1<<3) -#define IIR_MASK 0xf - -#define RTS_CR_AUTO (1<<0) -#define RTS_CR_RTS (1<<1) -#define RTS_CR_COUNT (1<<2) -#define RTS_CR_MOD2 (1<<3) -#define RTS_CR_RTS_POL (1<<4) -#define RTS_CR_CTS_CTR (1<<5) -#define RTS_CR_CTS_POL (1<<6) -#define RTS_CR_STICK (1<<7) - -#define UART_PORT_SIZE 0x40 -#define DRIVER_NAME "netx-uart" - -struct netx_port { - struct uart_port port; -}; - -static void netx_stop_tx(struct uart_port *port) -{ - unsigned int val; - val = readl(port->membase + UART_CR); - writel(val & ~CR_TIE, port->membase + UART_CR); -} - -static void netx_stop_rx(struct uart_port *port) -{ - unsigned int val; - val = readl(port->membase + UART_CR); - writel(val & ~CR_RIE, port->membase + UART_CR); -} - -static void netx_enable_ms(struct uart_port *port) -{ - unsigned int val; - val = readl(port->membase + UART_CR); - writel(val | CR_MSIE, port->membase + UART_CR); -} - -static inline void netx_transmit_buffer(struct uart_port *port) -{ - struct circ_buf *xmit = &port->state->xmit; - - if (port->x_char) { - writel(port->x_char, port->membase + UART_DR); - port->icount.tx++; - port->x_char = 0; - return; - } - - if (uart_tx_stopped(port) || uart_circ_empty(xmit)) { - netx_stop_tx(port); - return; - } - - do { - /* send xmit->buf[xmit->tail] - * out the port here */ - writel(xmit->buf[xmit->tail], port->membase + UART_DR); - xmit->tail = (xmit->tail + 1) & - (UART_XMIT_SIZE - 1); - port->icount.tx++; - if (uart_circ_empty(xmit)) - break; - } while (!(readl(port->membase + UART_FR) & FR_TXFF)); - - if (uart_circ_empty(xmit)) - netx_stop_tx(port); -} - -static void netx_start_tx(struct uart_port *port) -{ - writel( - readl(port->membase + UART_CR) | CR_TIE, port->membase + UART_CR); - - if (!(readl(port->membase + UART_FR) & FR_TXFF)) - netx_transmit_buffer(port); -} - -static unsigned int netx_tx_empty(struct uart_port *port) -{ - return readl(port->membase + UART_FR) & FR_BUSY ? 0 : TIOCSER_TEMT; -} - -static void netx_txint(struct uart_port *port) -{ - struct circ_buf *xmit = &port->state->xmit; - - if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { - netx_stop_tx(port); - return; - } - - netx_transmit_buffer(port); - - if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) - uart_write_wakeup(port); -} - -static void netx_rxint(struct uart_port *port, unsigned long *flags) -{ - unsigned char rx, flg, status; - - while (!(readl(port->membase + UART_FR) & FR_RXFE)) { - rx = readl(port->membase + UART_DR); - flg = TTY_NORMAL; - port->icount.rx++; - status = readl(port->membase + UART_SR); - if (status & SR_BE) { - writel(0, port->membase + UART_SR); - if (uart_handle_break(port)) - continue; - } - - if (unlikely(status & (SR_FE | SR_PE | SR_OE))) { - - if (status & SR_PE) - port->icount.parity++; - else if (status & SR_FE) - port->icount.frame++; - if (status & SR_OE) - port->icount.overrun++; - - status &= port->read_status_mask; - - if (status & SR_BE) - flg = TTY_BREAK; - else if (status & SR_PE) - flg = TTY_PARITY; - else if (status & SR_FE) - flg = TTY_FRAME; - } - - if (uart_handle_sysrq_char(port, rx)) - continue; - - uart_insert_char(port, status, SR_OE, rx, flg); - } - - spin_unlock_irqrestore(&port->lock, *flags); - tty_flip_buffer_push(&port->state->port); - spin_lock_irqsave(&port->lock, *flags); -} - -static irqreturn_t netx_int(int irq, void *dev_id) -{ - struct uart_port *port = dev_id; - unsigned long flags; - unsigned char status; - - spin_lock_irqsave(&port->lock,flags); - - status = readl(port->membase + UART_IIR) & IIR_MASK; - while (status) { - if (status & IIR_RIS) - netx_rxint(port, &flags); - if (status & IIR_TIS) - netx_txint(port); - if (status & IIR_MIS) { - if (readl(port->membase + UART_FR) & FR_CTS) - uart_handle_cts_change(port, 1); - else - uart_handle_cts_change(port, 0); - } - writel(0, port->membase + UART_IIR); - status = readl(port->membase + UART_IIR) & IIR_MASK; - } - - spin_unlock_irqrestore(&port->lock,flags); - return IRQ_HANDLED; -} - -static unsigned int netx_get_mctrl(struct uart_port *port) -{ - unsigned int ret = TIOCM_DSR | TIOCM_CAR; - - if (readl(port->membase + UART_FR) & FR_CTS) - ret |= TIOCM_CTS; - - return ret; -} - -static void netx_set_mctrl(struct uart_port *port, unsigned int mctrl) -{ - unsigned int val; - - /* FIXME: Locking needed ? */ - if (mctrl & TIOCM_RTS) { - val = readl(port->membase + UART_RTS_CR); - writel(val | RTS_CR_RTS, port->membase + UART_RTS_CR); - } -} - -static void netx_break_ctl(struct uart_port *port, int break_state) -{ - unsigned int line_cr; - spin_lock_irq(&port->lock); - - line_cr = readl(port->membase + UART_LINE_CR); - if (break_state != 0) - line_cr |= LINE_CR_BRK; - else - line_cr &= ~LINE_CR_BRK; - writel(line_cr, port->membase + UART_LINE_CR); - - spin_unlock_irq(&port->lock); -} - -static int netx_startup(struct uart_port *port) -{ - int ret; - - ret = request_irq(port->irq, netx_int, 0, - DRIVER_NAME, port); - if (ret) { - dev_err(port->dev, "unable to grab irq%d\n",port->irq); - goto exit; - } - - writel(readl(port->membase + UART_LINE_CR) | LINE_CR_FEN, - port->membase + UART_LINE_CR); - - writel(CR_MSIE | CR_RIE | CR_TIE | CR_RTIE | CR_UART_EN, - port->membase + UART_CR); - -exit: - return ret; -} - -static void netx_shutdown(struct uart_port *port) -{ - writel(0, port->membase + UART_CR) ; - - free_irq(port->irq, port); -} - -static void -netx_set_termios(struct uart_port *port, struct ktermios *termios, - struct ktermios *old) -{ - unsigned int baud, quot; - unsigned char old_cr; - unsigned char line_cr = LINE_CR_FEN; - unsigned char rts_cr = 0; - - switch (termios->c_cflag & CSIZE) { - case CS5: - line_cr |= LINE_CR_5BIT; - break; - case CS6: - line_cr |= LINE_CR_6BIT; - break; - case CS7: - line_cr |= LINE_CR_7BIT; - break; - case CS8: - line_cr |= LINE_CR_8BIT; - break; - } - - if (termios->c_cflag & CSTOPB) - line_cr |= LINE_CR_STP2; - - if (termios->c_cflag & PARENB) { - line_cr |= LINE_CR_PEN; - if (!(termios->c_cflag & PARODD)) - line_cr |= LINE_CR_EPS; - } - - if (termios->c_cflag & CRTSCTS) - rts_cr = RTS_CR_AUTO | RTS_CR_CTS_CTR | RTS_CR_RTS_POL; - - baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); - quot = baud * 4096; - quot /= 1000; - quot *= 256; - quot /= 100000; - - spin_lock_irq(&port->lock); - - uart_update_timeout(port, termios->c_cflag, baud); - - old_cr = readl(port->membase + UART_CR); - - /* disable interrupts */ - writel(old_cr & ~(CR_MSIE | CR_RIE | CR_TIE | CR_RTIE), - port->membase + UART_CR); - - /* drain transmitter */ - while (readl(port->membase + UART_FR) & FR_BUSY); - - /* disable UART */ - writel(old_cr & ~CR_UART_EN, port->membase + UART_CR); - - /* modem status interrupts */ - old_cr &= ~CR_MSIE; - if (UART_ENABLE_MS(port, termios->c_cflag)) - old_cr |= CR_MSIE; - - writel((quot>>8) & 0xff, port->membase + UART_BAUDDIV_MSB); - writel(quot & 0xff, port->membase + UART_BAUDDIV_LSB); - writel(line_cr, port->membase + UART_LINE_CR); - - writel(rts_cr, port->membase + UART_RTS_CR); - - /* - * Characters to ignore - */ - port->ignore_status_mask = 0; - if (termios->c_iflag & IGNPAR) - port->ignore_status_mask |= SR_PE; - if (termios->c_iflag & IGNBRK) { - port->ignore_status_mask |= SR_BE; - /* - * If we're ignoring parity and break indicators, - * ignore overruns too (for real raw support). - */ - if (termios->c_iflag & IGNPAR) - port->ignore_status_mask |= SR_PE; - } - - port->read_status_mask = 0; - if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK)) - port->read_status_mask |= SR_BE; - if (termios->c_iflag & INPCK) - port->read_status_mask |= SR_PE | SR_FE; - - writel(old_cr, port->membase + UART_CR); - - spin_unlock_irq(&port->lock); -} - -static const char *netx_type(struct uart_port *port) -{ - return port->type == PORT_NETX ? "NETX" : NULL; -} - -static void netx_release_port(struct uart_port *port) -{ - release_mem_region(port->mapbase, UART_PORT_SIZE); -} - -static int netx_request_port(struct uart_port *port) -{ - return request_mem_region(port->mapbase, UART_PORT_SIZE, - DRIVER_NAME) != NULL ? 0 : -EBUSY; -} - -static void netx_config_port(struct uart_port *port, int flags) -{ - if (flags & UART_CONFIG_TYPE && netx_request_port(port) == 0) - port->type = PORT_NETX; -} - -static int -netx_verify_port(struct uart_port *port, struct serial_struct *ser) -{ - int ret = 0; - - if (ser->type != PORT_UNKNOWN && ser->type != PORT_NETX) - ret = -EINVAL; - - return ret; -} - -static struct uart_ops netx_pops = { - .tx_empty = netx_tx_empty, - .set_mctrl = netx_set_mctrl, - .get_mctrl = netx_get_mctrl, - .stop_tx = netx_stop_tx, - .start_tx = netx_start_tx, - .stop_rx = netx_stop_rx, - .enable_ms = netx_enable_ms, - .break_ctl = netx_break_ctl, - .startup = netx_startup, - .shutdown = netx_shutdown, - .set_termios = netx_set_termios, - .type = netx_type, - .release_port = netx_release_port, - .request_port = netx_request_port, - .config_port = netx_config_port, - .verify_port = netx_verify_port, -}; - -static struct netx_port netx_ports[] = { - { - .port = { - .type = PORT_NETX, - .iotype = UPIO_MEM, - .membase = (char __iomem *)io_p2v(NETX_PA_UART0), - .mapbase = NETX_PA_UART0, - .irq = NETX_IRQ_UART0, - .uartclk = 100000000, - .fifosize = 16, - .flags = UPF_BOOT_AUTOCONF, - .ops = &netx_pops, - .line = 0, - }, - }, { - .port = { - .type = PORT_NETX, - .iotype = UPIO_MEM, - .membase = (char __iomem *)io_p2v(NETX_PA_UART1), - .mapbase = NETX_PA_UART1, - .irq = NETX_IRQ_UART1, - .uartclk = 100000000, - .fifosize = 16, - .flags = UPF_BOOT_AUTOCONF, - .ops = &netx_pops, - .line = 1, - }, - }, { - .port = { - .type = PORT_NETX, - .iotype = UPIO_MEM, - .membase = (char __iomem *)io_p2v(NETX_PA_UART2), - .mapbase = NETX_PA_UART2, - .irq = NETX_IRQ_UART2, - .uartclk = 100000000, - .fifosize = 16, - .flags = UPF_BOOT_AUTOCONF, - .ops = &netx_pops, - .line = 2, - }, - } -}; - -#ifdef CONFIG_SERIAL_NETX_CONSOLE - -static void netx_console_putchar(struct uart_port *port, int ch) -{ - while (readl(port->membase + UART_FR) & FR_BUSY); - writel(ch, port->membase + UART_DR); -} - -static void -netx_console_write(struct console *co, const char *s, unsigned int count) -{ - struct uart_port *port = &netx_ports[co->index].port; - unsigned char cr_save; - - cr_save = readl(port->membase + UART_CR); - writel(cr_save | CR_UART_EN, port->membase + UART_CR); - - uart_console_write(port, s, count, netx_console_putchar); - - while (readl(port->membase + UART_FR) & FR_BUSY); - writel(cr_save, port->membase + UART_CR); -} - -static void __init -netx_console_get_options(struct uart_port *port, int *baud, - int *parity, int *bits, int *flow) -{ - unsigned char line_cr; - - *baud = (readl(port->membase + UART_BAUDDIV_MSB) << 8) | - readl(port->membase + UART_BAUDDIV_LSB); - *baud *= 1000; - *baud /= 4096; - *baud *= 1000; - *baud /= 256; - *baud *= 100; - - line_cr = readl(port->membase + UART_LINE_CR); - *parity = 'n'; - if (line_cr & LINE_CR_PEN) { - if (line_cr & LINE_CR_EPS) - *parity = 'e'; - else - *parity = 'o'; - } - - switch (line_cr & LINE_CR_BITS_MASK) { - case LINE_CR_8BIT: - *bits = 8; - break; - case LINE_CR_7BIT: - *bits = 7; - break; - case LINE_CR_6BIT: - *bits = 6; - break; - case LINE_CR_5BIT: - *bits = 5; - break; - } - - if (readl(port->membase + UART_RTS_CR) & RTS_CR_AUTO) - *flow = 'r'; -} - -static int __init -netx_console_setup(struct console *co, char *options) -{ - struct netx_port *sport; - int baud = 9600; - int bits = 8; - int parity = 'n'; - int flow = 'n'; - - /* - * Check whether an invalid uart number has been specified, and - * if so, search for the first available port that does have - * console support. - */ - if (co->index == -1 || co->index >= ARRAY_SIZE(netx_ports)) - co->index = 0; - sport = &netx_ports[co->index]; - - if (options) { - uart_parse_options(options, &baud, &parity, &bits, &flow); - } else { - /* if the UART is enabled, assume it has been correctly setup - * by the bootloader and get the options - */ - if (readl(sport->port.membase + UART_CR) & CR_UART_EN) { - netx_console_get_options(&sport->port, &baud, - &parity, &bits, &flow); - } - - } - - return uart_set_options(&sport->port, co, baud, parity, bits, flow); -} - -static struct uart_driver netx_reg; -static struct console netx_console = { - .name = "ttyNX", - .write = netx_console_write, - .device = uart_console_device, - .setup = netx_console_setup, - .flags = CON_PRINTBUFFER, - .index = -1, - .data = &netx_reg, -}; - -static int __init netx_console_init(void) -{ - register_console(&netx_console); - return 0; -} -console_initcall(netx_console_init); - -#define NETX_CONSOLE &netx_console -#else -#define NETX_CONSOLE NULL -#endif - -static struct uart_driver netx_reg = { - .owner = THIS_MODULE, - .driver_name = DRIVER_NAME, - .dev_name = "ttyNX", - .major = SERIAL_NX_MAJOR, - .minor = MINOR_START, - .nr = ARRAY_SIZE(netx_ports), - .cons = NETX_CONSOLE, -}; - -static int serial_netx_suspend(struct platform_device *pdev, pm_message_t state) -{ - struct netx_port *sport = platform_get_drvdata(pdev); - - if (sport) - uart_suspend_port(&netx_reg, &sport->port); - - return 0; -} - -static int serial_netx_resume(struct platform_device *pdev) -{ - struct netx_port *sport = platform_get_drvdata(pdev); - - if (sport) - uart_resume_port(&netx_reg, &sport->port); - - return 0; -} - -static int serial_netx_probe(struct platform_device *pdev) -{ - struct uart_port *port = &netx_ports[pdev->id].port; - - dev_info(&pdev->dev, "initialising\n"); - - port->dev = &pdev->dev; - - writel(1, port->membase + UART_RXFIFO_IRQLEVEL); - uart_add_one_port(&netx_reg, &netx_ports[pdev->id].port); - platform_set_drvdata(pdev, &netx_ports[pdev->id]); - - return 0; -} - -static int serial_netx_remove(struct platform_device *pdev) -{ - struct netx_port *sport = platform_get_drvdata(pdev); - - if (sport) - uart_remove_one_port(&netx_reg, &sport->port); - - return 0; -} - -static struct platform_driver serial_netx_driver = { - .probe = serial_netx_probe, - .remove = serial_netx_remove, - - .suspend = serial_netx_suspend, - .resume = serial_netx_resume, - - .driver = { - .name = DRIVER_NAME, - }, -}; - -static int __init netx_serial_init(void) -{ - int ret; - - printk(KERN_INFO "Serial: NetX driver\n"); - - ret = uart_register_driver(&netx_reg); - if (ret) - return ret; - - ret = platform_driver_register(&serial_netx_driver); - if (ret != 0) - uart_unregister_driver(&netx_reg); - - return 0; -} - -static void __exit netx_serial_exit(void) -{ - platform_driver_unregister(&serial_netx_driver); - uart_unregister_driver(&netx_reg); -} - -module_init(netx_serial_init); -module_exit(netx_serial_exit); - -MODULE_AUTHOR("Sascha Hauer"); -MODULE_DESCRIPTION("NetX serial port driver"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" DRIVER_NAME); diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h index 5642c05e0da0..424de09649d3 100644 --- a/include/uapi/linux/serial_core.h +++ b/include/uapi/linux/serial_core.h @@ -150,7 +150,7 @@ #define PORT_PNX8XXX 70 -/* Hilscher netx */ +/* Hilscher netx (removed) */ #define PORT_NETX 71 /* SUN4V Hypervisor Console */ 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");