Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp350000pxb; Wed, 8 Sep 2021 02:41:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyC8SZW8NeJMDAvg4MEZu/T3YP+BnQ/UTOsEnGbLY99TsRibNaIa4hx9aXlS5N5mJ6O9RgB X-Received: by 2002:a17:907:20d1:: with SMTP id qq17mr3086807ejb.439.1631094062148; Wed, 08 Sep 2021 02:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631094062; cv=none; d=google.com; s=arc-20160816; b=TgRORTmLpMAwiPtKpsDX02Arqn9e9GN0/narmAtpG6Oa1OPFcP9zqRFLNYQLZSfJLz 4KsbMs+H5KIxoil5Vyv6Nad203/GT2/o5KXn9i+CcULUfC8BZAIPRu5U5pPUTEEH+yBX 12YQUc0vbZpeJptCpwajiNSVG9WquySbkMRc0gEF9w5NEK4qMFeKqaFunZg7pTbJVyUX QYvWQK0SpDdKE/L7z6jgLhohaY3y2pXyZlIZxULswNv9649rNZ1ShELMja1RXJLTkK6T xGsLwZ6fCamFvqpz8fjVzPv3W2MI0rM7naM7NpGGlAPdC1ZSlTb54DEMPL9GjNOARp5s 1uug== 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; bh=9yHo6I18JrAYnRkcbiAIrzpMsh4AQ+G0sYtgO4h9fiU=; b=e+hpXIOEcsgmjECl9kvKmoj5oelU8Y9sJNGF4V9KeqJmSkOAKLdCnsWeEEr4WBZEFb 9pToplbDM+feG4Hz2NuO5Mswas9VFRGLl5+OkK3/2nRzSp1XxnuUg8xGvG7R4eHx9EAq b12V3P2RcDC5rhffV1IafSFjME5ag42e2WWagF0rpS905szmvuYrURdb9UZJQ6A/Imlp 3mWEdzRe7m4RXjI7ZqyLn9+RU1uHNUxsY2nKTbG4rD5tclqcBS3h1z7aTDGbpxdFV8yv w8d0xwd2z85BVqbyTZhn856MfODtL5qeVPYEEgRBwpp28A3b3MeT+ybFkyxZGREtCVgh cp9Q== 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu1si1543439ejb.482.2021.09.08.02.40.37; Wed, 08 Sep 2021 02:41:02 -0700 (PDT) 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349618AbhIHJfW (ORCPT + 99 others); Wed, 8 Sep 2021 05:35:22 -0400 Received: from inva020.nxp.com ([92.121.34.13]:56134 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244525AbhIHJfG (ORCPT ); Wed, 8 Sep 2021 05:35:06 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 28C061A2F1F; Wed, 8 Sep 2021 11:33:57 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E48581A2F17; Wed, 8 Sep 2021 11:33:56 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 2D898183AC89; Wed, 8 Sep 2021 17:33:55 +0800 (+08) From: Shengjiu Wang To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, daniel.baluta@nxp.com Cc: linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, shengjiu.wang@gmail.com Subject: [PATCH v4 1/4] remoteproc: imx_rproc: Move common structure to header file Date: Wed, 8 Sep 2021 17:10:52 +0800 Message-Id: <1631092255-25150-2-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1631092255-25150-1-git-send-email-shengjiu.wang@nxp.com> References: <1631092255-25150-1-git-send-email-shengjiu.wang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move common structure imx_rproc_att, imx_rproc_method and imx_rproc_dcfg to header file which can be shared with imx_dsp_rproc driver. Signed-off-by: Shengjiu Wang --- drivers/remoteproc/imx_rproc.c | 28 +------------------------ drivers/remoteproc/imx_rproc.h | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 drivers/remoteproc/imx_rproc.h diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index d88f76f5305e..b0da0130c3b6 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -19,6 +19,7 @@ #include #include +#include "imx_rproc.h" #include "remoteproc_internal.h" #define IMX7D_SRC_SCR 0x0C @@ -72,33 +73,6 @@ struct imx_rproc_mem { /* M4 own area. Can be mapped at probe */ #define ATT_OWN BIT(1) -/* address translation table */ -struct imx_rproc_att { - u32 da; /* device address (From Cortex M4 view)*/ - u32 sa; /* system bus address */ - u32 size; /* size of reg range */ - int flags; -}; - -/* Remote core start/stop method */ -enum imx_rproc_method { - IMX_RPROC_NONE, - /* Through syscon regmap */ - IMX_RPROC_MMIO, - /* Through ARM SMCCC */ - IMX_RPROC_SMC, -}; - -struct imx_rproc_dcfg { - u32 src_reg; - u32 src_mask; - u32 src_start; - u32 src_stop; - const struct imx_rproc_att *att; - size_t att_size; - enum imx_rproc_method method; -}; - struct imx_rproc { struct device *dev; struct regmap *regmap; diff --git a/drivers/remoteproc/imx_rproc.h b/drivers/remoteproc/imx_rproc.h new file mode 100644 index 000000000000..23d8e808d27f --- /dev/null +++ b/drivers/remoteproc/imx_rproc.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2017 Pengutronix, Oleksij Rempel + * Copyright 2021 NXP + */ + +#ifndef _IMX_RPROC_H +#define _IMX_RPROC_H + +/* address translation table */ +struct imx_rproc_att { + u32 da; /* device address (From Cortex M4 view)*/ + u32 sa; /* system bus address */ + u32 size; /* size of reg range */ + int flags; +}; + +/* Remote core start/stop method */ +enum imx_rproc_method { + IMX_RPROC_NONE, + /* Through syscon regmap */ + IMX_RPROC_MMIO, + /* Through ARM SMCCC */ + IMX_RPROC_SMC, +}; + +struct imx_rproc_dcfg { + u32 src_reg; + u32 src_mask; + u32 src_start; + u32 src_stop; + const struct imx_rproc_att *att; + size_t att_size; + enum imx_rproc_method method; +}; + +#endif /* _IMX_RPROC_H */ -- 2.17.1