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: Auger Eric X-Patchwork-Id: 55421 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f69.google.com (mail-lf0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 1B5F12304B for ; Thu, 22 Oct 2015 09:42:16 +0000 (UTC) Received: by lffz202 with SMTP id z202sf29417764lff.3 for ; Thu, 22 Oct 2015 02:42:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=0/Mefd63kyoja5a8tqzMKf48R//1Q4vhnk5LMk6aCXA=; b=Ro9u9g9IsPZ2oS+YTR6Yf4GG6KEXXi45V0JOhjGJrYOME9212DxSQEExLlJpSIbSeS 981rUbCvr19y9Sg72ytgq+G6c0qiTqmTJeqBFLOAH9xqpVsOC88MbFv6Ve8r6LNKHNfA xk0qgwRU9Seychs9lzJ1T0VKC1Ndq4H11l4zg5L4opKQ3EtQ2xEl93I4KRZC2G7sOcWX YNFHFRCfuiUY9ejRaApdvVtaYNmnF7OdeOELrsfoMwSROEBTyfbv/fv4GTM5at26ab7u /xuALvk+AAex959bDA168pZU8tudDyNvfIN/GrFI1DLs5UBVu8juYGnG8ctIArwERvNR Ja5Q== X-Gm-Message-State: ALoCoQlMB02F5jBMrnTgp1KZ97mmGA3qIfkQ00wWW34ihKIKKZpK2jM21hU09tB1tX3gzBo6Z09x X-Received: by 10.112.55.69 with SMTP id q5mr3364877lbp.24.1445506935117; Thu, 22 Oct 2015 02:42:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.87.137 with SMTP id l131ls338740lfb.80.gmail; Thu, 22 Oct 2015 02:42:15 -0700 (PDT) X-Received: by 10.112.184.137 with SMTP id eu9mr7981168lbc.21.1445506934987; Thu, 22 Oct 2015 02:42:14 -0700 (PDT) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id yn5si9063296lbb.1.2015.10.22.02.42.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Oct 2015 02:42:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lfbn126 with SMTP id n126so6997966lfb.2 for ; Thu, 22 Oct 2015 02:42:14 -0700 (PDT) X-Received: by 10.25.38.9 with SMTP id m9mr5066450lfm.112.1445506934837; Thu, 22 Oct 2015 02:42:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.59.35 with SMTP id w3csp485367lbq; Thu, 22 Oct 2015 02:42:13 -0700 (PDT) X-Received: by 10.194.103.194 with SMTP id fy2mr15704104wjb.10.1445506933878; Thu, 22 Oct 2015 02:42:13 -0700 (PDT) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com. [209.85.212.177]) by mx.google.com with ESMTPS id lk1si17269184wjb.153.2015.10.22.02.42.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Oct 2015 02:42:13 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.177 as permitted sender) client-ip=209.85.212.177; Received: by wicll6 with SMTP id ll6so126980673wic.0 for ; Thu, 22 Oct 2015 02:42:13 -0700 (PDT) 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 Cc: christoffer.dall@linaro.org, linux-kernel@vger.kernel.org, patches@linaro.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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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");