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 8BB53C433E1 for ; Thu, 20 Aug 2020 19:29:24 +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 4AEF6207BB for ; Thu, 20 Aug 2020 19:29:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NX5kpVzJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="UWsCN7ZH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AEF6207BB 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=Hpg0GhjPi90afWWD2tdxf7e+SRkPYvSNzlDMp7A95vE=; b=NX5kpVzJSOxLnwKGtNQl5/5gH 7qviN5cDcvFGxGZGA6IuzVvNMXc2V2dUegFg1/s0orO/aCQJfz2WgbKykj6TRfXzNQKtoDWJOCtYk s5q2eO6Ak3jePD75HD+vL52foEW71AoZw+sC4EtoqwDoFFeRNtHEmLB3uDa1RSxkp2i8+eHWkUbeV heaA42qlsnkpaYjkPHGYdTHC03eWSO2NLo3TGtMZP4Fmycs1tDJ5/Zv5JTG2zBB+jx83GS0pLTwOf SMVPlEI7vH6EBhsw2Aan3GT0veM3wAUhIvsabeVwkt1rtyTHzpcYCpzHeVhwiBziVV1YfFy/Wv5lq /Uol66Y/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8qDV-0002Ap-NZ; Thu, 20 Aug 2020 19:27:17 +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 1k8qDS-00029i-RC for linux-arm-kernel@lists.infradead.org; Thu, 20 Aug 2020 19:27:16 +0000 Received: by mail-pf1-x441.google.com with SMTP id u20so1541152pfn.0 for ; Thu, 20 Aug 2020 12:27:12 -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=qKgKzXlPm6LlH3TbAFNrfgNmPXIVx+pBSmSBh3BlDpQ=; b=UWsCN7ZHQMvpNR61FNwCDzsjQMvWe6z3zaWJDySvgM4qXJ2owLnhOmarFsydiJefHl mDOA211lJBz+xb0hnkIYj4LlBhKFpo+A3Fbev9eGS7j3zbuAEtnSe964H/tnXlBeEhtx bndqvASP4kmEsMAvVUvD+VV369LU6QcLbwLjiEdcsW4h5cYGvg5tOA7vBJ2pwplx8Q/T prJmHDO7Cv649ZkSCOwz1tl4ClMdYHNUQpI6sPTEa4zmWHZBTDvvg+oiG6SxAdAbjEwR Hwwa2sMzIQpY7dp4emZy+lXP7J4nBQfNXGNPfDSuzWbIEt/+8X3UZj9nTFJnZUJrW9MD /Aaw== 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=qKgKzXlPm6LlH3TbAFNrfgNmPXIVx+pBSmSBh3BlDpQ=; b=HRTaQDkm89v9ECKd11dLyqCp4IhqKCEl1YOfNgEWlMT4+flHKzVD3piKYgCDsMIQ/E ameRSS6vzF/Ol+ul1+08TtTRVG5AWJKbDAAtpuIzXMfGDOpnEZkFmdN7QqAE0SHmV2SH QGqnhaia/FUExbVzDhrINz4K4ZeO5qQ/ntSsiQUUkVh9bOBwqLA1Aj36HGKOCd/kyDe7 ervMDX8+1DGRJDIfd82D+cFLDBarB+eW24WEezkvE6mBujwiasHOipGJSWrr65GsQP+Z ybUgub9yqPr3pOVDox74+v97WvVwOuJ8c6HsB9IsLuKBpUTBWyYq+jh9rFXrrL4v2x2t tYvw== X-Gm-Message-State: AOAM531ae9HQlPLwohD5dcGoLPd5rVDgdnOZFH6aVQsIxoEUuz8cxVDu SLV3doc/5lxaxzqGshuAZHQdow== X-Google-Smtp-Source: ABdhPJxpcaQBmyqJzVhRAz2xEFhbGD8umb7dYhhPDrVdIuIn+UoqxIHj92yxXw+U4tTEBt4uqrmX6g== X-Received: by 2002:a62:e704:: with SMTP id s4mr183082pfh.177.1597951630770; Thu, 20 Aug 2020 12:27:10 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id gj2sm2781576pjb.21.2020.08.20.12.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 12:27:10 -0700 (PDT) Date: Thu, 20 Aug 2020 13:27:08 -0600 From: Mathieu Poirier To: Peng Fan Subject: Re: [PATCH 04/10] remoteproc: imx_rproc: make syscon optional Message-ID: <20200820192708.GA3938186@xps15> References: <20200724080813.24884-1-peng.fan@nxp.com> <20200724080813.24884-5-peng.fan@nxp.com> <20200818214350.GA3822080@xps15> <20200819194504.GB3845366@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-20200820_152715_194816_42CF7043 X-CRM114-Status: GOOD ( 33.98 ) 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 Thu, Aug 20, 2020 at 02:04:10AM +0000, Peng Fan wrote: > > Subject: Re: [PATCH 04/10] remoteproc: imx_rproc: make syscon optional > > > > 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. > > Yes. Whole system get rebooted. > > > > > > > > > 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? > > Yes. We registered a interrupt notification handler with system controller unit. > When M4 rebooted, the system controller will raise interrupt to A53 core. > Then the notification callback will be invoked, the callback will call > rproc_report_crash. I not included this part code in the patchset, since > this patchset is to add initial support for 8M case. All this information is really appreciated. > > Thanks, > Peng. > > > > > 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