From patchwork Thu Oct 22 09:41:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 7464281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83D13BEEA4 for ; Thu, 22 Oct 2015 09:50:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB2F120416 for ; Thu, 22 Oct 2015 09:50:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C7D2C203C4 for ; Thu, 22 Oct 2015 09:50:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZpCQZ-0000i1-4K; Thu, 22 Oct 2015 09:44:55 +0000 Received: from mail-wi0-f179.google.com ([209.85.212.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZpCOJ-0007Ep-DJ for linux-arm-kernel@lists.infradead.org; Thu, 22 Oct 2015 09:42:37 +0000 Received: by wikq8 with SMTP id q8so22995511wik.1 for ; Thu, 22 Oct 2015 02:42:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0/Mefd63kyoja5a8tqzMKf48R//1Q4vhnk5LMk6aCXA=; b=ISgwgLGANbnBrBhoe3pzzwkfY+lrNA/4YtpE4meALROoHB8UVUgoGN9bvfOzflf5A1 Ogy02gfzxkUnDvwWXc2oHfqY3PKjd40IFU1UM9qWqsgJOWbr3SI/8PGTYr6ZoWz+3dfh fypqriWtBprF54V90/vZlj2ORORl5z+Dj5EZloXvS2ijzNGgf6g1vYe9pcOXfUIRKA/Z ZXACSh5OXxB1rC9smb7z/bWDi2d+Cy0aWgVYh/mnGVLLn0nbTg5NOPq7c2f8qSmHEXz8 k/WPMZZah48YJiZ7MH8dgiThlSOJKyGTCXWHrlqihTLon2a6ZgUu+XFepByuGKO7+5KW hM/w== X-Gm-Message-State: ALoCoQmv+VcJT7Kp4ZWykb3uS2l6o7ROQPGQQ0Agsv8l0tAv4/bHk5CdMrX8eeI1l5rkOq5TAJpZ X-Received: by 10.180.91.12 with SMTP id ca12mr39349109wib.4.1445506933654; Thu, 22 Oct 2015 02:42:13 -0700 (PDT) Received: from gnx2579.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id lr6sm9376859wic.3.2015.10.22.02.42.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Oct 2015 02:42:12 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, alex.williamson@redhat.com, b.reynal@virtualopensystems.com, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration Date: Thu, 22 Oct 2015 11:41:59 +0200 Message-Id: <1445506922-6005-4-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445506922-6005-1-git-send-email-eric.auger@linaro.org> References: <1445506922-6005-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151022_024235_786840_5387FFEE X-CRM114-Status: GOOD ( 13.37 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, christoffer.dall@linaro.org, patches@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the reset function registration/unregistration. Signed-off-by: Eric Auger --- v1 -> v2: - uses the module_vfio_reset_handler macro - add pr_info on vfio reset - do not export vfio_platform_calxedaxgmac_reset symbol anymore --- drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c index 619dc7d..8b2cccc 100644 --- a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c +++ b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c @@ -25,13 +25,12 @@ #include #include "vfio_platform_private.h" +#include "vfio_platform_reset_private.h" #define DRIVER_VERSION "0.1" #define DRIVER_AUTHOR "Eric Auger " #define DRIVER_DESC "Reset support for Calxeda xgmac vfio platform device" -#define CALXEDAXGMAC_COMPAT "calxeda,hb-xgmac" - /* XGMAC Register definitions */ #define XGMAC_CONTROL 0x00000000 /* MAC Configuration */ @@ -70,6 +69,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev) return -ENOMEM; } + pr_info("VFIO reset of %s\n", vdev->name); + /* disable IRQ */ writel(0, reg.ioaddr + XGMAC_DMA_INTR_ENA); @@ -78,7 +79,9 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev) return 0; } -EXPORT_SYMBOL_GPL(vfio_platform_calxedaxgmac_reset); + +module_vfio_reset_handler("calxeda,hb-xgmac", + vfio_platform_calxedaxgmac_reset); MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL v2");