Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp713913pxa; Wed, 19 Aug 2020 12:47:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8OQ9C6kUJ0c/HDEwUDUIqQBP2eAjg0eCkt1xUL/M/85eAuFn7CJSZQCtZakXTDhLVrs/L X-Received: by 2002:aa7:ca54:: with SMTP id j20mr26264661edt.270.1597866420879; Wed, 19 Aug 2020 12:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597866420; cv=none; d=google.com; s=arc-20160816; b=Drk8umaC5c0tekKXrukNG4bQ++iI+iyMNUNg+KJki/4VclpqGy9ObaJScLKCCauKJa JCdk5l2enFzcnnh/OkRKguq/Vksn0f4qNl64DhRA9uNfGS+5I+0nJzd/WxbvE7VUPRXl Ysq2zbJcyoImByFUV7AwYakrgzkVFU6YeXKpFEWWoKYzeAchGCiaz9WEn+Dko9vz8hXL hha1B0g3ydYrfk84SwuVwJYenwm3gqY3zCJ704QMMgYuWKmjwK8BrkX9iV5CvbDSWFbq ibhKQ7ip23t4O4duuLyZtM6zUyRUXxq7PQcARaQS8PCWZyO+EbTQ7luC9n9ehDEThSrr TzTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sF9UY16dXmm5cOO3jSka0z0v5TSuaKu0zT9caFSv5L4=; b=j4MUzLfuB3b/iEO85C6+/duhGXHX9XQ0XtzA3wtXC7W40C6xGx72L5eajz3ORBGWbT cr+vekq1G/xIn+PNi/0dBlGuhqQTWNLqjcFoadJZtOqQf/X/qFrnzu1CEWF55j1jLgJv 9GAoibLo8rF9Q1whGT85ovE6EQ2sKchwlKLL+Tn1KVnKdY9KdttTRhNEhgnlPbJEJtk9 6M38TwodSfvsmhfmM/SbK854tYpO/ryWIgZKw1VLGgPD+6Vc3UfHTPQlD55pg9Kp8BwU 1osKJbwz02bRHrs33sz6+WC0D5l/nI7yO44x7sNDh5eaQBrivEJBzN+zprF0V+oWtZ0q 55TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=My0adgqf; 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 z2si17649403eju.389.2020.08.19.12.46.36; Wed, 19 Aug 2020 12:47:00 -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=My0adgqf; 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 S1726617AbgHSTpL (ORCPT + 99 others); Wed, 19 Aug 2020 15:45:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726816AbgHSTpH (ORCPT ); Wed, 19 Aug 2020 15:45:07 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCF94C061384 for ; Wed, 19 Aug 2020 12:45:07 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id a79so12191197pfa.8 for ; Wed, 19 Aug 2020 12:45:07 -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=COg5rIJ27Gu+49VX2A+Q2VzjaxIyP4gb6jlfZDOOURwJLlX8J1OSSM6XCQMpBwr4Qw 6HNxk+CTMkCFe3tb11U0nMzEpRoY+/aFRsqfk1LhqrEH5yoNS1WnHOiji8gn2PFMvCNB 28jbLycN114+1pL5waz+86y6n9PVp2z/X4lCSfMPsRc7CICqmaNFdnkvddq262Frb+hb o9I7fq+e/r4Yv9zfNRprDi1Kp7XnCl0kumXRNYUIf0L0dNxqVRLVtlTix1/EFTYK4mNz ISLXZcsLz8PdSAdHwEiY2Ttn5h8moCfrB6PHIFz9azIu5bv2+z264pCJy8HoSiYc5FTX +1lQ== X-Gm-Message-State: AOAM530r/6fG1CjIw7U0PQEvVDgE+ei880DsAZNlCPW5OP0fpKOhU4p8 P58RGqhGpqzkeZKVXJrAGr3ZDw== 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 Cc: "bjorn.andersson@linaro.org" , "o.rempel@pengutronix.de" , "robh+dt@kernel.org" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > > >