Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1443608pxb; Mon, 11 Oct 2021 06:13:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaxmb16WBedRoYYAYoKQv+qQ7j5WGne2Jzl+jUi6iscSP2IIUWI0F4gYEI8VGZRCxYD7XD X-Received: by 2002:a17:906:76d1:: with SMTP id q17mr11695213ejn.31.1633957981564; Mon, 11 Oct 2021 06:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633957981; cv=none; d=google.com; s=arc-20160816; b=JMRaq3QY/bFTKvexKdBCyvvGp1bvgaI+mLPat9+F3vpH6FfsJyPWwZeMdwD43YBWqy Pl+oXg6IhQOrSMhAlKXUF+NrlS9T+jUBmVOJqkiRUpvya7LnkNCdUylc9KwwdVvlK7bB H/q6CXMNPjUZli1QncfJLd1MGLbAHQJAOe8Hf75Uzh7j7FqihwK7ohh0Y8uNYzONTdqR qCVDbcS43cIMWIkvHi/KOomLJz5krvBXvIxh928DHFwiC5HnDd5VqNe7DCp3Qot8FlT0 vnoYHM8WtSjw0OSMQ7J3xXJSvLc8SK/dcVokJtIRLXIOtNPf7w0x3L+gxus8Ilcyx7dQ opdw== 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=SoySnB9x1VrE6jjG3qoLP7JLsJe5LCEaN+SPtzUsBcw=; b=xPmMJg749S43D4VWbGjXzpWTsInqABCb0qeLb9aZZOR4QmVUmdFEhrXbfExNnQj19r 7gvVpzjwClu8ydzS6X6WCpb75MX29BoV2x0nuYPzkhU3CBoFnMl+SLviiJW05UGj4IYd 3UPlfIYvlrZ/CZULrklUtKKcyfYWPIueSQQKfUhzw469LDi3hJ55Z1V/PyRuNgtpeQ+N hmq66wFoZBk4hLFpSinPIDb8YuPP0glGYxbUiCw3auvXmXX8p4s7TxKsFtSko21QuJ8w rNR0giNXetGAhBUEvtrZQn1iASee/7KtX2Hpo8oxU99s+uDcHlrFunqS8ogfnQ0E2aSx YjHA== 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 bh6si11514135ejb.691.2021.10.11.06.12.35; Mon, 11 Oct 2021 06:13:01 -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 S235648AbhJKJrC (ORCPT + 99 others); Mon, 11 Oct 2021 05:47:02 -0400 Received: from inva020.nxp.com ([92.121.34.13]:45722 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235559AbhJKJrB (ORCPT ); Mon, 11 Oct 2021 05:47:01 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8259D1A19E1; Mon, 11 Oct 2021 11:45:00 +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 3F97F1A19EB; Mon, 11 Oct 2021 11:45:00 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 8DDF5183AD27; Mon, 11 Oct 2021 17:44:58 +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 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 v6 1/4] remoteproc: imx_rproc: Move common structure to header file Date: Mon, 11 Oct 2021 17:20:12 +0800 Message-Id: <1633944015-789-2-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1633944015-789-1-git-send-email-shengjiu.wang@nxp.com> References: <1633944015-789-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 Reviewed-by: Mathieu Poirier --- 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 4ae416ba5080..ff8170dbbc3c 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 @@ -73,33 +74,6 @@ struct imx_rproc_mem { #define ATT_OWN BIT(1) #define ATT_IOMEM BIT(2) -/* 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