Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2427771ybv; Mon, 24 Feb 2020 05:08:49 -0800 (PST) X-Google-Smtp-Source: APXvYqy+LukRpP4Jr1oX1XU9n46K1X+CA1jWp/rce7FooLCRXJQuD5kv6oZmv8Dp16cSi23U0XGf X-Received: by 2002:aca:55cc:: with SMTP id j195mr12692321oib.22.1582549729606; Mon, 24 Feb 2020 05:08:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582549729; cv=none; d=google.com; s=arc-20160816; b=ijp9tbWAZIvV2AFL8r2TLRBNaQUQjLvcYgfJwE19asUdV8tdW9hUh5bdDoy/1SSMak fGenpBzTNqTSez/06/IX/at0gONkn2Dm9IIRC6fNfH8DL2J4OaiDor1Oc19Q1gFuzUdg lLaxE1aUA4eseBy3yb9S+G5gzUVtSVYXXDUASgHG+/F4XpApvkl6JcDUZH9D0lEDr8Sn NPYvSEZQbmhiXBtT9qdMeXp543tTuIrxKvNl/BazDSTJWpRncsuLcaT69nVaY6tp4JsP dA+Udfi7xonY0yIgTZBN/jMmf/3akRQ+svi7A7gDUYpxF87HnTNxBKe0M6CM048A7zlo GZfA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=8hYIHZTnTP03p6Yp4LlShbTvxf4UyOXsFmmyMPgeaYI=; b=MZMatjdmfXwlfYkxbQhzrRGqBeSUvHe07AJFQg1MkT6FwO0eicUq4zgo1J6MCnOxdk r5TT+RtBQZ+TpnU4uJn8dp9m02/UHqdBaHiW7NMbhKrgy9fh4LyVrDUb81VnPBQCwKzK rBdYA1Fq8FQZikmKzwgEchRlfiA9s2a2Qhbp8NjGKCT89rJ2rY8Z4gT677mQRT9fT7g3 Bbt94yFALeUCzRwHrctGyBFfgrQan6BpQJSHhrO4deGRVB+D4CMAUiNdcB0CG73AYP+I nDr0IEcTgRMMaA+P9M7kBCmVodDBu9u9VTCGpGXErp4c/JJ4fG1oMMv9zeH7OZ/HmUF1 go5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ggAX4k2X; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si5779978oth.182.2020.02.24.05.08.36; Mon, 24 Feb 2020 05:08:49 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ggAX4k2X; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727592AbgBXNII (ORCPT + 99 others); Mon, 24 Feb 2020 08:08:08 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:29456 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727329AbgBXNII (ORCPT ); Mon, 24 Feb 2020 08:08:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582549687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8hYIHZTnTP03p6Yp4LlShbTvxf4UyOXsFmmyMPgeaYI=; b=ggAX4k2X/nrSgbEhTp+FSzWVvJrMksYG+aQw/fFewmeopr8t5GVMxVo8Ko0zK+ubk8SGlF slcxuKjlsB4HV3HQwEEAPxAoRubW2aGHP3ny957SSRsMQ4nXgMxVuNFfuWmPsz8ZWuE8fb Xrsh5GL39M8Fa5iDWYLTVJ0mm+w/AAE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-463-1KFA4pPFOt-nSzxZ1v6H2w-1; Mon, 24 Feb 2020 08:08:01 -0500 X-MC-Unique: 1KFA4pPFOt-nSzxZ1v6H2w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A47AB107ACCA; Mon, 24 Feb 2020 13:07:55 +0000 (UTC) Received: from [10.36.116.59] (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF3FB909E9; Mon, 24 Feb 2020 13:07:44 +0000 (UTC) Subject: Re: [RFC PATCH 01/11] vfio: Remove Calxeda XGMAC reset driver To: Rob Herring , 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, 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 References: <20200218171321.30990-1-robh@kernel.org> <20200218171321.30990-2-robh@kernel.org> From: Auger Eric Message-ID: <23fda074-149e-9c77-5eee-4d6b591a6ebf@redhat.com> Date: Mon, 24 Feb 2020 14:07:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20200218171321.30990-2-robh@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Alex, On 2/18/20 6:13 PM, Rob Herring wrote: > 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 > I do not have access to this HW anymore and I use Seattle to test vfio-platform. So Acked-by: Eric Auger Thanks Eric