From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6730C433DF for ; Wed, 19 Aug 2020 19:46:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60B1C207BB for ; Wed, 19 Aug 2020 19:46:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sHv7UVkD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="My0adgqf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60B1C207BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=inDBwREXCT329QAkjCWLy/hasYM74u1r9ympm/m3GKI=; b=sHv7UVkDf2sdtdDeAtzaov655 //QbvPN8b9fvvWiRCs5WIqCEFtzYrCDUFqfHCr4V989kisaHgOhWdIZpZ/hCU9XJYXCJVU3KwdlOW mmRV0euYuFfR3bb9JE8vVyCy/7YjupmnMb641csfF4NPIRRnRMhfJ76C7QP1cX4CNwZuSQdDJTC4h Lk2fbzsh7O21Uide7W2kx9t0kyEUrwQ4NNNPNlI/UNWLUa2vs0Im6PzKaUFlePjWRRLo0d4vI7e4M xXx3C4QBMVbcz2tg1de9cW4/TwsT3yRtvn2jWRHhyoB9HD6iF8ib/46ytz4TFR6Huwl7X5Eet1Eqd aulcZRxWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8U1I-0008R8-KZ; Wed, 19 Aug 2020 19:45:12 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8U1E-0008Os-Vy for linux-arm-kernel@lists.infradead.org; Wed, 19 Aug 2020 19:45:10 +0000 Received: by mail-pf1-x441.google.com with SMTP id d22so12206255pfn.5 for ; Wed, 19 Aug 2020 12:45:08 -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=sF9UY16dXmm5cOO3jSka0z0v5TSuaKu0zT9caFSv5L4=; b=My0adgqfzPQIKRYv/F8WnEALcwwBJO517cDOIum5P/tFkJOrho4xIdJRi1k4zJ/iGQ 0p/NIeSfLlcShfD5CGgNISVf0dYc54DeIXBi2b30RWGcovKY3m5uVjO2zPe8wTf2sz/k Xt0o2e5e4BNeooKNq7vL6VHTxR6TyXFpKe0KMZ8JKIm3wEe6aAtfKkUhI0MSVepeY/0p lKX7xXPxzRJW2pX2fTj/mdkl6bUXDavqLxJR8tS+oYHM2be6+cE6OS+gI2UMTZD8tNEL POCLpdcuDZ0tCU7KgcRD2V4W2exQo57YWgIo/f+W32dGujkTCLAbRjWl7R5fVwLmr5Yf f8hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=sF9UY16dXmm5cOO3jSka0z0v5TSuaKu0zT9caFSv5L4=; b=CXdyEHgtbWnYiSTOETEag8tdrqemTSDSt8uPSAN0c2CIZGXk5ja3dfFmF86ErQoAJM 7IRjlnD/B7KOQlCE1x+YwIGx/7Din4S8SuzG8t4Fp1yxpYnVnPl007R8xEbyn4RZNJFU dvfXOpCQMwkAu33i/XRz2Nk77KTe1wWhA96h5iyl4EsdL2e5JSUFtbI13euDbbpo7oCJ d1iL24+j7scaue6JZHT57KEUt304HUzhOBhdoRSUSUc81CDsE/YwohGpW00ltjOYmcc5 GkYUe9kHT9xNq1ufyH+BOKh3Gp7f+FP+KpO91hlKK5MHPL1v/xAEeRub8hGEyLSHFsQ4 Qz4Q== X-Gm-Message-State: AOAM533vaYn57s86a4MZw//gBbJKdZf3UqrCSTvlBXpqjo1O0zuByH9R NoirgyeVLUS+Z2d99q/JgB7TlA== X-Google-Smtp-Source: ABdhPJxF0ffkstbdtPGkrxJ6MGDk67Qcr5yO9dllut/Ch0wpl9p24HmbGjB45ynS/uBatcVWygxZaQ== X-Received: by 2002:a63:161a:: with SMTP id w26mr11429964pgl.211.1597866306882; Wed, 19 Aug 2020 12:45:06 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l24sm16620pff.20.2020.08.19.12.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 12:45:06 -0700 (PDT) Date: Wed, 19 Aug 2020 13:45:04 -0600 From: Mathieu Poirier To: Peng Fan Subject: Re: [PATCH 04/10] remoteproc: imx_rproc: make syscon optional Message-ID: <20200819194504.GB3845366@xps15> References: <20200724080813.24884-1-peng.fan@nxp.com> <20200724080813.24884-5-peng.fan@nxp.com> <20200818214350.GA3822080@xps15> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200819_154509_335828_B8870231 X-CRM114-Status: GOOD ( 27.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "devicetree@vger.kernel.org" , "festevam@gmail.com" , "s.hauer@pengutronix.de" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bjorn.andersson@linaro.org" , "o.rempel@pengutronix.de" , "robh+dt@kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 19, 2020 at 12:51:27AM +0000, Peng Fan wrote: > > Subject: Re: [PATCH 04/10] remoteproc: imx_rproc: make syscon optional > > > > Hi Peng, > > > > On Fri, Jul 24, 2020 at 04:08:07PM +0800, Peng Fan wrote: > > > Make syscon optional, since i.MX8QM/QXP/7ULP not have SRC to control > > M4. > > > But currently i.MX8QM/QXP/7ULP not added, so still check regmap when > > > start/stop to avoid unhappy things. > > > > On the i.MX8QM/QXP/7ULP processors, the remote processors are not > > handled by the remoteproc cores, as implemented in this patch. In such a > > scenario how does the remoteproc core know the remote processor has > > crashed and how does it recover from such a condition? > > For 7ULP dual boot case, A7 is under control of M4, so if m4 crash, I suppose > A7 would not work properly. In that case I assume the whole system gets rebooted, which puts the A7 in a state where it can "attach" with the M4 again. > > For 8QM/QXP partition case, M4 is in a standalone partition, if M4 crash or > reboot, the system controller unit will restart M4 and notify Acore that M4 > restart. And how does that notification work exactly? Does rproc_report_crash() get called somewhere in that process in order for the remoteproc core to attach to the M4 again? Many thanks for the help, Mathieu > > Thanks, > Peng. > > > > > Thanks, > > Mathieu > > > > > > > > Reviewed-by: Richard Zhu > > > Signed-off-by: Peng Fan > > > --- > > > drivers/remoteproc/imx_rproc.c | 11 +++++++++-- > > > 1 file changed, 9 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/remoteproc/imx_rproc.c > > > b/drivers/remoteproc/imx_rproc.c index 82594a800a1b..4fad5c0b1c05 > > > 100644 > > > --- a/drivers/remoteproc/imx_rproc.c > > > +++ b/drivers/remoteproc/imx_rproc.c > > > @@ -162,6 +162,9 @@ static int imx_rproc_start(struct rproc *rproc) > > > struct device *dev = priv->dev; > > > int ret; > > > > > > + if (!priv->regmap) > > > + return -EOPNOTSUPP; > > > + > > > ret = regmap_update_bits(priv->regmap, dcfg->src_reg, > > > dcfg->src_mask, dcfg->src_start); > > > if (ret) > > > @@ -177,6 +180,9 @@ static int imx_rproc_stop(struct rproc *rproc) > > > struct device *dev = priv->dev; > > > int ret; > > > > > > + if (!priv->regmap) > > > + return -EOPNOTSUPP; > > > + > > > ret = regmap_update_bits(priv->regmap, dcfg->src_reg, > > > dcfg->src_mask, dcfg->src_stop); > > > if (ret) > > > @@ -325,9 +331,10 @@ static int imx_rproc_probe(struct platform_device > > *pdev) > > > regmap = syscon_regmap_lookup_by_phandle(np, "syscon"); > > > if (IS_ERR(regmap)) { > > > dev_err(dev, "failed to find syscon\n"); > > > - return PTR_ERR(regmap); > > > + regmap = NULL; > > > + } else { > > > + regmap_attach_dev(dev, regmap, &config); > > > } > > > - regmap_attach_dev(dev, regmap, &config); > > > > > > /* set some other name then imx */ > > > rproc = rproc_alloc(dev, "imx-rproc", &imx_rproc_ops, > > > -- > > > 2.16.4 > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel