Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp887214pxb; Tue, 14 Sep 2021 10:49:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9wwOrBQrKVvSnhGS6uwdXzQkPhvLK87pzzriV6qSSLWKbU6uVtBAyBtRMWEITiv1zq3kw X-Received: by 2002:a5e:a70c:: with SMTP id b12mr14868495iod.119.1631641764881; Tue, 14 Sep 2021 10:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631641764; cv=none; d=google.com; s=arc-20160816; b=OtAepE43R1XofeeHXMLmn9Fpwi/32ZtYJQEXcWPH91Zd29lKpebCxLwCepv6NL1Hiv TFU1SJbt0Kb6AyLms1LEO+zVKAkpVUOHkiOFaenZTlpzJddwQyjeqwjKhPL4ZFH3rYMk BFXbSxI7luG5D76fOUmFLr4TDNW8C4wsWW7WpuKa6UZAxU0fDUaFG2SsljRmeJY9wPua wnTW3JNLgNmcKnxeJgnDDhY7VjYtF1g8S9Q1KlB6bMRPfqfIRvGh0LRObrEEMHFHosMZ 5hNnSKiNbEhT9BylgiPQAN/ejb7/ZF+eyy6OywTQe+rcU5Cfg29kiW3UE40zGyi2XDW3 UfBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7UFM2ZEfyisKcjzE2kztorsuEGj60mmoqCDZgmBx5qk=; b=Z2zzfZG2+tKCSRRruKVERx+fBN8yQnfDlIAzHNdVnYTAunpfbZWps0+fgUL2UwbbUT etGe4hWcC0j+E3xQMUtCgvlpVbGRYN69aSBuu6uj+uqMi8N4MMYACEsjimcCq7g2hrI0 RbTgRPDatAiw5sPqteyIeUQfXG136pM6OwTrqvIedeGCf+mNGMYSzUnDPYhWtRGdcIWX xd8W+Syz+90/YHn772kxt+Jw4Bc+ARlDFNmknsNw/yRJBqiokaZax/N2yeWhEw4kV/aZ 6WSbmV9Uy79gkKzA3UNnVYdR9QI+5iIiK8aVJ0GRGNS9f/PVGHWoSVn2Abtst/kFcC9O WrlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=adISV1Gz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k1si10246208ilo.14.2021.09.14.10.49.12; Tue, 14 Sep 2021 10:49:24 -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; dkim=pass header.i=@linaro.org header.s=google header.b=adISV1Gz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231797AbhINRsG (ORCPT + 99 others); Tue, 14 Sep 2021 13:48:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231771AbhINRsB (ORCPT ); Tue, 14 Sep 2021 13:48:01 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B32DCC061764 for ; Tue, 14 Sep 2021 10:46:43 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id 18so13018847pfh.9 for ; Tue, 14 Sep 2021 10:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7UFM2ZEfyisKcjzE2kztorsuEGj60mmoqCDZgmBx5qk=; b=adISV1GzrtR3BVLqWylk7j+Nf0f9LohcT8NA2GxEC5o5Ir6X0Rf80NFfjWbiZ4MfIH ARLEjkxxSPs8mBEmc9VUj2WyjNFe0RkVCmXChHcxpVOh50a4gFrHiqvBH8BTPF2sT1jd aaLZPBnnrqTDq2NK/mwpYYUhvoXrF1JBe6706NdMEh8Iua+zLYFmVbYAU5GTw8bwA/dt di+mdi9j/bH5jgWOne9zkrkyVO32aegprpms/DaZkgojU9DnTvLT91RNBHstQRZS/ktF c4MOx8GF/wpcp/CSo05i1B66s/sOZBxxhFS/d0ZvSSStyIXEIXRE+t+8FKHmY81HfZ5E CcPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7UFM2ZEfyisKcjzE2kztorsuEGj60mmoqCDZgmBx5qk=; b=1l5TwobByRa91vIW+LrdENlR53VuWlOOp+2Oea87EeaK2/M2O1IePkSQOO+yvNVVtk vM5MiViQK9bcM69StYpoTv1vF4yOiCOMJceV6JQekI5SRM/d0siEPcRbs48wBjBJJrL3 rgajGqLlsd8759W/I09wcgozdPSCUw0ZZQDgVPD1DolWJrinvIeJlSE6pp2BxxjLR9bt U3Vb5Q2lGqL+lMMEGqxEVcm/9kHNQEbBOlXKQZFxaI/O9bwZ3muynsmbKCFpuk3FgpUz De4qc90eoMlzbShmnlgDBO3Xbvc0B6uTorJriBW2EJu3Iryp8O+b/0E3bAefKEIeZp3J CHQw== X-Gm-Message-State: AOAM533WZZK2JAxX9sMheh/R/z+twLoUbboCObwcVnS8FlMuMMdqURn2 lbRdreXL6TlTdLHdHmhtdUasdQ== X-Received: by 2002:a63:da49:: with SMTP id l9mr16290385pgj.277.1631641602979; Tue, 14 Sep 2021 10:46:42 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id pc3sm2354264pjb.0.2021.09.14.10.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 10:46:42 -0700 (PDT) Date: Tue, 14 Sep 2021 11:46:39 -0600 From: Mathieu Poirier To: Shengjiu Wang Cc: ohad@wizery.com, bjorn.andersson@linaro.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, daniel.baluta@nxp.com, 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: Re: [PATCH v4 1/4] remoteproc: imx_rproc: Move common structure to header file Message-ID: <20210914174639.GB1719994@p14s> References: <1631092255-25150-1-git-send-email-shengjiu.wang@nxp.com> <1631092255-25150-2-git-send-email-shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1631092255-25150-2-git-send-email-shengjiu.wang@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08, 2021 at 05:10:52PM +0800, Shengjiu Wang wrote: > 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 > Reviewed-by: Mathieu Poirier > 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 >