Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2326804pxb; Fri, 29 Jan 2021 21:59:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyCgHHQzTtmzpJJT7WUx5jLnpBWoKQMwWFXt6jNP5/ot91JeP6bEfrIGHaK1OdGrtC1HTN X-Received: by 2002:a50:fc18:: with SMTP id i24mr9136608edr.308.1611986383902; Fri, 29 Jan 2021 21:59:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611986383; cv=none; d=google.com; s=arc-20160816; b=TP1doOl1aFISJMW/REpDhnui4zWDFfV27bXd+Y4vlFLTdwWx+G248ae+i8OUyT/zxu Z2534SIK2+/r0NqPoziKL/RAZHrEcUWmwjBhgzzJx6LtJvuOs1xCQ+hVvVG+xBrV508Z ZjKl/0TqDVCismJR0QAS3UYvNXOS9Ru9Klt4Me3Ze1Bs3pahnHb5qt8bGysRDKhoIicL eIZ+Vn9jiwWbP9CZs4HP3nm4qv1bRY+wyjZEMhS6vXAMBvla0YmdMTJo2OwvAbFgZvcV 4voYX8cAwiWClxZ1dvVLWL539f3clryUura9KBehZPWDkc/f+9PzypJaIE6CHtKJhP9R ccmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr:ironport-sdr; bh=CuZ2AJodZihXNuvcKn+qin6TA7Z7iAKDD4S9tRWkC/0=; b=SFAmK9IYPyP8rLZebhfqM7QNEqlIoJswrwcHqIUczN8iyZLWMOdIJVEevNdi7s+b90 ae2Hg3Seyff5uy6vkam87KEhBJKOnpS1I+IIRgOkiiPgSz48S5oogILv89fMbguMCzAb DjnBBRhY89kTfJPe0UB0ostcAm5DI5sX2bQ5ug4iiySxMbrrj2N/YyUHgZjd846E6ivy WkYafSx/jyLKI8eYOAp0y/LORMRS05kiC+iLsa3VdOawuCZF3GzB/NuB2NnoIHt9javH o0XAb71AW7x3I/y5wv4b9/M+ZAACrruQIrR7oNqz7oI34SVgQVYTIAbnwgVrH6HGetY2 D77Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si5885177ejn.731.2021.01.29.21.59.19; Fri, 29 Jan 2021 21:59:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233855AbhA3F6B (ORCPT + 99 others); Sat, 30 Jan 2021 00:58:01 -0500 Received: from mga01.intel.com ([192.55.52.88]:37812 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230321AbhA3Fz7 (ORCPT ); Sat, 30 Jan 2021 00:55:59 -0500 IronPort-SDR: kVBlipPUuF6WuLfINXgMpPVfL04mf1KwhorC4KJSM1hWX5q80FFzrg4tOYNofgBDiuK2SCndG4 QLajh5lX0oUw== X-IronPort-AV: E=McAfee;i="6000,8403,9879"; a="199358155" X-IronPort-AV: E=Sophos;i="5.79,387,1602572400"; d="scan'208";a="199358155" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 18:21:30 -0800 IronPort-SDR: FPKXr9jDyE0q18bocgtGzOavLczovuLFRNq7I1ROWh+T+uadAlhEB5ilIGLhzKW77yDgSPGSD4 pJ4U03W9q+Pw== X-IronPort-AV: E=Sophos;i="5.79,387,1602572400"; d="scan'208";a="431263329" Received: from smtp.ostc.intel.com ([10.54.29.231]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 18:21:29 -0800 Received: from mtg-dev.jf.intel.com (mtg-dev.jf.intel.com [10.54.74.10]) by smtp.ostc.intel.com (Postfix) with ESMTP id E25E2636B; Fri, 29 Jan 2021 18:21:29 -0800 (PST) Received: by mtg-dev.jf.intel.com (Postfix, from userid 1000) id D6DFB363683; Fri, 29 Jan 2021 18:21:29 -0800 (PST) From: mgross@linux.intel.com To: markgross@kernel.org, mgross@linux.intel.com, arnd@arndb.de, bp@suse.de, damien.lemoal@wdc.com, dragan.cvetic@xilinx.com, gregkh@linuxfoundation.org, corbet@lwn.net, palmerdabbelt@google.com, paul.walmsley@sifive.com, peng.fan@nxp.com, robh+dt@kernel.org, shawnguo@kernel.org, jassisinghbrar@gmail.com Cc: linux-kernel@vger.kernel.org, Srikanth Thokala Subject: [PATCH v4 12/34] misc: xlink-pcie: lh: Prepare changes for adding remote host driver Date: Fri, 29 Jan 2021 18:21:02 -0800 Message-Id: <20210130022124.65083-48-mgross@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210130022124.65083-1-mgross@linux.intel.com> References: <20210130022124.65083-1-mgross@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srikanth Thokala Move logic that can be reused between local host and remote host to common/ folder Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Reviewed-by: Mark Gross Signed-off-by: Mark Gross Signed-off-by: Srikanth Thokala --- drivers/misc/xlink-pcie/{local_host => common}/core.h | 8 +++----- drivers/misc/xlink-pcie/{local_host => common}/util.c | 8 +++----- drivers/misc/xlink-pcie/{local_host => common}/util.h | 8 +++----- drivers/misc/xlink-pcie/{local_host => common}/xpcie.h | 8 +++----- drivers/misc/xlink-pcie/local_host/Makefile | 2 +- drivers/misc/xlink-pcie/local_host/core.c | 4 ++-- drivers/misc/xlink-pcie/local_host/epf.h | 4 ++-- 7 files changed, 17 insertions(+), 25 deletions(-) rename drivers/misc/xlink-pcie/{local_host => common}/core.h (96%) rename drivers/misc/xlink-pcie/{local_host => common}/util.c (97%) rename drivers/misc/xlink-pcie/{local_host => common}/util.h (91%) rename drivers/misc/xlink-pcie/{local_host => common}/xpcie.h (92%) diff --git a/drivers/misc/xlink-pcie/local_host/core.h b/drivers/misc/xlink-pcie/common/core.h similarity index 96% rename from drivers/misc/xlink-pcie/local_host/core.h rename to drivers/misc/xlink-pcie/common/core.h index 84985ef41a64..656b5e2dbfae 100644 --- a/drivers/misc/xlink-pcie/local_host/core.h +++ b/drivers/misc/xlink-pcie/common/core.h @@ -1,11 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -/***************************************************************************** - * +/* * Intel Keem Bay XLink PCIe Driver * - * Copyright (C) 2020 Intel Corporation - * - ****************************************************************************/ + * Copyright (C) 2021 Intel Corporation + */ #ifndef XPCIE_CORE_HEADER_ #define XPCIE_CORE_HEADER_ diff --git a/drivers/misc/xlink-pcie/local_host/util.c b/drivers/misc/xlink-pcie/common/util.c similarity index 97% rename from drivers/misc/xlink-pcie/local_host/util.c rename to drivers/misc/xlink-pcie/common/util.c index ec808b0cd72b..d99125f61ba0 100644 --- a/drivers/misc/xlink-pcie/local_host/util.c +++ b/drivers/misc/xlink-pcie/common/util.c @@ -1,11 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-only -/***************************************************************************** - * +/* * Intel Keem Bay XLink PCIe Driver * - * Copyright (C) 2020 Intel Corporation - * - ****************************************************************************/ + * Copyright (C) 2021 Intel Corporation + */ #include "util.h" diff --git a/drivers/misc/xlink-pcie/local_host/util.h b/drivers/misc/xlink-pcie/common/util.h similarity index 91% rename from drivers/misc/xlink-pcie/local_host/util.h rename to drivers/misc/xlink-pcie/common/util.h index 908be897a61d..5295783b0437 100644 --- a/drivers/misc/xlink-pcie/local_host/util.h +++ b/drivers/misc/xlink-pcie/common/util.h @@ -1,11 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -/***************************************************************************** - * +/* * Intel Keem Bay XLink PCIe Driver * - * Copyright (C) 2020 Intel Corporation - * - ****************************************************************************/ + * Copyright (C) 2021 Intel Corporation + */ #ifndef XPCIE_UTIL_HEADER_ #define XPCIE_UTIL_HEADER_ diff --git a/drivers/misc/xlink-pcie/local_host/xpcie.h b/drivers/misc/xlink-pcie/common/xpcie.h similarity index 92% rename from drivers/misc/xlink-pcie/local_host/xpcie.h rename to drivers/misc/xlink-pcie/common/xpcie.h index 8a559617daba..48529eb49be0 100644 --- a/drivers/misc/xlink-pcie/local_host/xpcie.h +++ b/drivers/misc/xlink-pcie/common/xpcie.h @@ -1,11 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -/***************************************************************************** - * +/* * Intel Keem Bay XLink PCIe Driver * - * Copyright (C) 2020 Intel Corporation - * - ****************************************************************************/ + * Copyright (C) 2021 Intel Corporation + */ #ifndef XPCIE_HEADER_ #define XPCIE_HEADER_ diff --git a/drivers/misc/xlink-pcie/local_host/Makefile b/drivers/misc/xlink-pcie/local_host/Makefile index 28761751d43b..65df94c7e860 100644 --- a/drivers/misc/xlink-pcie/local_host/Makefile +++ b/drivers/misc/xlink-pcie/local_host/Makefile @@ -2,4 +2,4 @@ obj-$(CONFIG_XLINK_PCIE_LH_DRIVER) += mxlk_ep.o mxlk_ep-objs := epf.o mxlk_ep-objs += dma.o mxlk_ep-objs += core.o -mxlk_ep-objs += util.o +mxlk_ep-objs += ../common/util.o diff --git a/drivers/misc/xlink-pcie/local_host/core.c b/drivers/misc/xlink-pcie/local_host/core.c index c67ce2c3067d..2c4e29bce7f7 100644 --- a/drivers/misc/xlink-pcie/local_host/core.c +++ b/drivers/misc/xlink-pcie/local_host/core.c @@ -8,8 +8,8 @@ #include #include "epf.h" -#include "core.h" -#include "util.h" +#include "../common/core.h" +#include "../common/util.h" static struct xpcie *global_xpcie; diff --git a/drivers/misc/xlink-pcie/local_host/epf.h b/drivers/misc/xlink-pcie/local_host/epf.h index 7220cead0973..40bf4ff36580 100644 --- a/drivers/misc/xlink-pcie/local_host/epf.h +++ b/drivers/misc/xlink-pcie/local_host/epf.h @@ -11,8 +11,8 @@ #include #include -#include "xpcie.h" -#include "util.h" +#include "../common/xpcie.h" +#include "../common/util.h" #define XPCIE_DRIVER_NAME "mxlk_pcie_epf" #define XPCIE_DRIVER_DESC "Intel(R) xLink PCIe endpoint function driver" -- 2.17.1