Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6067084ybv; Tue, 18 Feb 2020 09:13:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwtNhXTeywklf9W2bCfOAsAAkGaJMr+u4k/IhinvsREf82wvXiyeecSv8PZNV4iQ2UDlVZw X-Received: by 2002:a9d:138:: with SMTP id 53mr17073739otu.334.1582046031739; Tue, 18 Feb 2020 09:13:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582046031; cv=none; d=google.com; s=arc-20160816; b=q29vxPhZPvwAhgRaG+WacToUboY1BHRVtACi6y/KFz+zmJjU0q4qyOt4mnP9JtojAz ZnA+AItjahs4IHw9OkNe9QCtnZkQNRrS97wbroYcupTXNhKUmQHpWzXbSjPRD+oUi4+u uqbLu2/E8QZKYpEHSC58u4hFDFgETQFZJadtV8/nQ2yTulAnWJKMAg9zWl0G8JwdQVH0 tE/TEXVdoU4o3bl3ZbZ26ELDOhr56+9Q67Ve6ntx49KBT7CvPM4E8yya6whdojA++r7R IOxX6r0J8zFOXxoG7TgThepiPJLAdr7f1URZ4Nyuiew3QgThAzEPT2gxh5hpA2xAx9Hl frGg== 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=4LxZR/H/qWaW6PLZe7czUDlSa5Ov9S/K1kfsaVdcFug=; b=Z5NeXnpdO4lS5H9SUwfmt9OcsuFObYrsZpJSFRKb5FAwvV0R9Q+CwZC50xw/Bu2p2p Hn88H9eDh1Q1uCDVKDZs2SmfKYttCpZ8Yqx/XtdgA2lD9qcXUbJ2GO/kh+0R4mbTYRvZ 0ZcVVop0Bv7qGQzxmDicxjeGNex+A+h8NqxBQglyTEwYail02fkWf6k8Ki8PYikSP1lg KCvtQDSYbGWLpx3ZhGpKF/7MYXDD+Yjwa0pRljGQCR8hxzaUsyIYk4A1fZgPIUkYquKZ qqP90tbxlM4zmF4Kl0fO/ggcNvKS0pJRJDRSx8k3FKeAWI8PYbFIH5zD28eHfQvi9voe brpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si2049795otq.137.2020.02.18.09.13.38; Tue, 18 Feb 2020 09:13:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726891AbgBRRN1 (ORCPT + 99 others); Tue, 18 Feb 2020 12:13:27 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:45975 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726750AbgBRRN0 (ORCPT ); Tue, 18 Feb 2020 12:13:26 -0500 Received: by mail-ot1-f68.google.com with SMTP id 59so20239284otp.12; Tue, 18 Feb 2020 09:13:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4LxZR/H/qWaW6PLZe7czUDlSa5Ov9S/K1kfsaVdcFug=; b=Y+eIkOh/8pk4ibBhldw3l0arntaaYotKXwiF29K9P325mXl//DMJJ5zkNVaug/4nYL QxyS2BT+5uhwcpZtmXSQu1FoKhp0nGrIregfSKKiL08DsKekbeVrf7y2hwFGGm+4DrYo RHHY3XwWgBgA7d+t4bgLWfob/LcH7cJqxt6wR4zwByA4gPE13GNyqyRfOTZ8WrimDQqH NYgxtWncTVZP+7d/AE6vBllHbSITaEnfafPlsLurijhLCx0/L59iEL8CPkFQ3GA+2E9c NyzHyiIEWshdjhFRa2oJhP3OPTD42OkWPS2qTSwTfqs5WKXla0V8vUr27tdnwNMs54Yx nGYw== X-Gm-Message-State: APjAAAXtoWxEyliSONOWPlZayTiwMT1c2rBDm8UveOkJaugQbWyFOT0R ei2xdoRadJxzUeyHpFYHMA== X-Received: by 2002:a05:6830:1f0c:: with SMTP id u12mr16226750otg.253.1582046005180; Tue, 18 Feb 2020 09:13:25 -0800 (PST) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id y25sm1545755oto.27.2020.02.18.09.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 09:13:24 -0800 (PST) From: Rob Herring To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, soc@kernel.org, Andre Przywara , Robert Richter , Jon Loeliger , Alexander Graf , Matthias Brugger , Mark Langsdorf Cc: Alex Williamson , Borislav Petkov , Cornelia Huck , Daniel Lezcano , "David S. Miller" , devicetree@vger.kernel.org, Eric Auger , iommu@lists.linux-foundation.org, James Morse , Jens Axboe , Joerg Roedel , kvm@vger.kernel.org, linux-clk@vger.kernel.org, linux-edac@vger.kernel.org, linux-ide@vger.kernel.org, linux-pm@vger.kernel.org, Mauro Carvalho Chehab , netdev@vger.kernel.org, "Rafael J. Wysocki" , Robin Murphy , Stephen Boyd , Tony Luck , Viresh Kumar , Will Deacon Subject: [RFC PATCH 01/11] vfio: Remove Calxeda XGMAC reset driver Date: Tue, 18 Feb 2020 11:13:11 -0600 Message-Id: <20200218171321.30990-2-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218171321.30990-1-robh@kernel.org> References: <20200218171321.30990-1-robh@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cc: Eric Auger Cc: Alex Williamson Cc: Cornelia Huck Cc: kvm@vger.kernel.org Signed-off-by: Rob Herring --- Do not apply yet. drivers/vfio/platform/reset/Kconfig | 8 -- drivers/vfio/platform/reset/Makefile | 2 - .../reset/vfio_platform_calxedaxgmac.c | 74 ------------------- 3 files changed, 84 deletions(-) delete mode 100644 drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c diff --git a/drivers/vfio/platform/reset/Kconfig b/drivers/vfio/platform/reset/Kconfig index 1edbe9ee7356..3668d1d92909 100644 --- a/drivers/vfio/platform/reset/Kconfig +++ b/drivers/vfio/platform/reset/Kconfig @@ -1,12 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -config VFIO_PLATFORM_CALXEDAXGMAC_RESET - tristate "VFIO support for calxeda xgmac reset" - depends on VFIO_PLATFORM - help - Enables the VFIO platform driver to handle reset for Calxeda xgmac - - If you don't know what to do here, say N. - config VFIO_PLATFORM_AMDXGBE_RESET tristate "VFIO support for AMD XGBE reset" depends on VFIO_PLATFORM diff --git a/drivers/vfio/platform/reset/Makefile b/drivers/vfio/platform/reset/Makefile index 7294c5ea122e..be7960ce5dbc 100644 --- a/drivers/vfio/platform/reset/Makefile +++ b/drivers/vfio/platform/reset/Makefile @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -vfio-platform-calxedaxgmac-y := vfio_platform_calxedaxgmac.o vfio-platform-amdxgbe-y := vfio_platform_amdxgbe.o -obj-$(CONFIG_VFIO_PLATFORM_CALXEDAXGMAC_RESET) += vfio-platform-calxedaxgmac.o obj-$(CONFIG_VFIO_PLATFORM_AMDXGBE_RESET) += vfio-platform-amdxgbe.o obj-$(CONFIG_VFIO_PLATFORM_BCMFLEXRM_RESET) += vfio_platform_bcmflexrm.o diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c deleted file mode 100644 index 09a9453b75c5..000000000000 --- a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * VFIO platform driver specialized for Calxeda xgmac reset - * reset code is inherited from calxeda xgmac native driver - * - * Copyright 2010-2011 Calxeda, Inc. - * Copyright (c) 2015 Linaro Ltd. - * www.linaro.org - */ - -#include -#include -#include -#include - -#include "../vfio_platform_private.h" - -#define DRIVER_VERSION "0.1" -#define DRIVER_AUTHOR "Eric Auger " -#define DRIVER_DESC "Reset support for Calxeda xgmac vfio platform device" - -/* XGMAC Register definitions */ -#define XGMAC_CONTROL 0x00000000 /* MAC Configuration */ - -/* DMA Control and Status Registers */ -#define XGMAC_DMA_CONTROL 0x00000f18 /* Ctrl (Operational Mode) */ -#define XGMAC_DMA_INTR_ENA 0x00000f1c /* Interrupt Enable */ - -/* DMA Control registe defines */ -#define DMA_CONTROL_ST 0x00002000 /* Start/Stop Transmission */ -#define DMA_CONTROL_SR 0x00000002 /* Start/Stop Receive */ - -/* Common MAC defines */ -#define MAC_ENABLE_TX 0x00000008 /* Transmitter Enable */ -#define MAC_ENABLE_RX 0x00000004 /* Receiver Enable */ - -static inline void xgmac_mac_disable(void __iomem *ioaddr) -{ - u32 value = readl(ioaddr + XGMAC_DMA_CONTROL); - - value &= ~(DMA_CONTROL_ST | DMA_CONTROL_SR); - writel(value, ioaddr + XGMAC_DMA_CONTROL); - - value = readl(ioaddr + XGMAC_CONTROL); - value &= ~(MAC_ENABLE_TX | MAC_ENABLE_RX); - writel(value, ioaddr + XGMAC_CONTROL); -} - -static int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev) -{ - struct vfio_platform_region *reg = &vdev->regions[0]; - - if (!reg->ioaddr) { - reg->ioaddr = - ioremap(reg->addr, reg->size); - if (!reg->ioaddr) - return -ENOMEM; - } - - /* disable IRQ */ - writel(0, reg->ioaddr + XGMAC_DMA_INTR_ENA); - - /* Disable the MAC core */ - xgmac_mac_disable(reg->ioaddr); - - return 0; -} - -module_vfio_reset_handler("calxeda,hb-xgmac", vfio_platform_calxedaxgmac_reset); - -MODULE_VERSION(DRIVER_VERSION); -MODULE_LICENSE("GPL v2"); -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC); -- 2.20.1