Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp115668pxa; Tue, 18 Aug 2020 17:55:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5kxLy7O3wJtCXJUeR/dvEGKShkBfQOD9S2A+7D9+73UWXWLVndlR3+b9R9Isk71UInPI9 X-Received: by 2002:a17:906:5811:: with SMTP id m17mr1870542ejq.40.1597798555565; Tue, 18 Aug 2020 17:55:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1597798555; cv=pass; d=google.com; s=arc-20160816; b=k1nD3iqoZgw8mQFz+Dgvolc2xWY9sfIco1itL9y1Xc+tJoCH7GgWMBHPUW8lzyYj6E XMGth4yJuSnAU6rsyESkHgVx2GsvEwEhPz3Z0H16agjGSBlbNLnWJRuju2VtT0s2y/+2 nhjOB1hUwpQ5+JYTzr2PMoXyTdksokYp7UOdC+8HLS1lm34SJnVZV/0/vQJvEI77LuuI Jp+F/nKX3khrC5SAfoXGkdcIer9OPAVQQWk+kyq86wLkKOQvza8pPuOj05Sp56ttoRV+ ypR8m4tp0SyR0tLcnrWact1SWV5k/Xg+D3zUORnpYyeWpCPXIIkZzOb1MAsoO2VP3qWn 0gpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=CfREFvQLp8qODB6gtrGaxzvYE8LUDJz6QxDiqgDR2Ec=; b=FWlHVPZKS1m4+HxCOxJuBwp9n/VEuOxp8+/dWEyE44Pi9dli5IrkBsxNSAqR+RZeby uZcQ3NwM8E36EYtOeFCPkiUmrWDFhOvUagUGH1XTOxKHvsYBvKp5HGs5wQwGaJEIxt4h 3Ll6ZE2J2Rc53m1oI8RY5PqpaY21yJPXzbiFcb3uEnqEdZm1u4EKLhaiqqYkYqMM7dwY hZM8vW/EX8KRFiz/D7afdQNnUZS69P5ZJBhEaY7J17ywbFh3TUPTp84ilVB8XgnLZTL0 4rfnKYFOXBAjOIqXoWkUMRzDC2DiLvHaHtBUWZ5ML+W/yegUaSP6j04YLJ8KTdm/u7Jj Xh9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FIggxJUw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (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 z2si15809427eju.389.2020.08.18.17.55.23; Tue, 18 Aug 2020 17:55:55 -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=@nxp.com header.s=selector2 header.b=FIggxJUw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727118AbgHSAvg (ORCPT + 99 others); Tue, 18 Aug 2020 20:51:36 -0400 Received: from mail-eopbgr60060.outbound.protection.outlook.com ([40.107.6.60]:64838 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726717AbgHSAvb (ORCPT ); Tue, 18 Aug 2020 20:51:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nufgd2TCLbpdqqNBEsZIxO4QNB8xd6pOy4ZEDHjKqS9O/9fIDhuSaGaqCTzhO36Ex/JLSKsx7vrnDnj/UYCb2Q/uYsDWXxjPP+WHnPdR2b9ilGA4xJ+UjPSaO6sHnuBAVHaj7NFNWhpoNhHTVTPnNgP0+452A0zobPazRtRWUo8cWsVpqt1y9UqVsA6OIG/JgbxuevsTu+H9S2LXzGNKsBxtzt+kLCvcq/vjJdidFUnr8qsKK3AzMTfRXWfEXJOP9mLHQJsEyMA/GG3xDqysrO/nSy7XwxCV640HzHTl/P8l64Laj+wtcQCNos+r8dtlliY1vWRtHlKbCCQsKqe/sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CfREFvQLp8qODB6gtrGaxzvYE8LUDJz6QxDiqgDR2Ec=; b=NenlgQxY5ndm9XvJsQoAnBkl3kBvWSWrL005EMYY1BLRWTKItu2IBqujKPa22p8+YSOzz15hNfpHwbwBUKrPy7WvdtkqNdujRX7eiZ1iZybbRtmtC35LK+lbQBNmHTp3RlwA8evVgZM/XaciQ5iXi/QMMvhpiF0UxCxP1MyBV/FsUwkAwjx07FEtZnYe7BFnMsW+xUrsshPE1kn2oZwKC0gjR5j41tRMoB3/16JWO9zbQW1oiM+Sgm1QpotR5aJNhusiLrVulZ/K0eNP0jyQf68KiB9M0ScYI0XX46Wk3pxwMU4usV6ambVDnW+iuc+O2veWtWWVEucbFA0cH5IvTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CfREFvQLp8qODB6gtrGaxzvYE8LUDJz6QxDiqgDR2Ec=; b=FIggxJUwcpSIFNOS1734ksJdY6WFGZk6nn272nTIP6r8vbYm6kO/y8qs5TWsMX627zkuK9QB/O9NRzcojEdzSGkDuTne8ieiEtT2mjPd9wKp9P8v3069w8rElrccFOB/Y05LtHJzJA4M42Sc+66g5NFi0sTeKKvRHvx/iBNzxVY= Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB5466.eurprd04.prod.outlook.com (2603:10a6:10:8a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15; Wed, 19 Aug 2020 00:51:27 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::24d0:f783:3c7d:e232]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::24d0:f783:3c7d:e232%12]) with mapi id 15.20.3283.027; Wed, 19 Aug 2020 00:51:27 +0000 From: Peng Fan To: Mathieu Poirier 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 Thread-Topic: [PATCH 04/10] remoteproc: imx_rproc: make syscon optional Thread-Index: AQHWYY4pPqmFoZ4ZzEWHmcUWZM64s6k+jjUAgAAzq9A= Date: Wed, 19 Aug 2020 00:51:27 +0000 Message-ID: References: <20200724080813.24884-1-peng.fan@nxp.com> <20200724080813.24884-5-peng.fan@nxp.com> <20200818214350.GA3822080@xps15> In-Reply-To: <20200818214350.GA3822080@xps15> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: bfc45e1a-7f7c-41ad-34ef-08d843da0147 x-ms-traffictypediagnostic: DB7PR04MB5466: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pLfydgKMQyctdjeJMuvEGkmMHCM6Ffu4tBUXlxXoSAJdiInh9i/YGfUa99BuNtuxwjlstijsDgSAao78tqQcVPrI1GzAEq+Ld6BPSiLxBrzcC07fWtA2XDYsXYimrsZXp7+LmVCWsQSDWnTysgPnobngj/6M08WTJCmGxrwOPf2ClDFpP/Y+2stbzN24ZNXK6u/3Ht+ZyAqmcVz++zYSwb9jqI5A5b6/4B6hrbzPnY+9Sde1B46DBqYm8T4huBgjjF6Vfp38qNDC7J+ditsMCxhqx69l6I0FXNFaRg5NH+1Va2o/174jWm50J6jQu6XeLEhB5gpXeHp3eee6tpqDrQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB6PR0402MB2760.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(136003)(376002)(39860400002)(366004)(396003)(54906003)(86362001)(6506007)(5660300002)(6916009)(33656002)(186003)(8936002)(44832011)(52536014)(83380400001)(26005)(64756008)(66556008)(478600001)(66946007)(66476007)(55016002)(316002)(2906002)(8676002)(4326008)(9686003)(66446008)(7696005)(76116006)(71200400001)(7416002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: j71cyJg/clua9299jNKsgZiSaLDD1rOluljqhQShhORS9wOMGXHGEf1iBwrAxjetizelO2tiNqRiCVM6fGc4q88e/B1MbcTODSTI4TaWPcK2FksFsYbyx5WdVt52PpV9TX8QgJUTg4PF645R2odfpwEArgRdr3mwpx2DKCkoDPW349tm1L9PBPAN5DzrOvPsd21j8XhSrE17fjUkfCLqyBjI7fSRuFO/k81wAoD7IqmtBzeCSnZ4z344nh3gGOm1qOUyOgZoZDyO15O7WcQXwX0If/VSGsVra0e2+KbaTXqq1SqxlK9htVOPyw06KhHzEKcuQqaoxulFtFeJS9dr+c6BQ/E5CiE70dvfJy3Og4JvxZ7Mw7ll+kZL05SJpABdhRc2qM5GCLmfR+i5nRFm0SGjFKlw4uaSy1TnQ7wrKgZ8ZOf7kjVXPthT348g/1QmhlY66FPINpBetsJJxtPANujcMZe/5mcdikEU/TS+LZv6uf4D3HebZJb0IMy02qdKLr7pFO98VuLFx+56l58V2BlrG0xw9xUl5PqNX8kHb3BbGG3k9zcOzs9D3ayMHWwR/M0PofHSnkIXnejRC3HVyUGMGCSUrvD/LjzQUrxnsHOtPjEKXmRcoSexQ4/wiGcnboF2s7e730jbuCs+G92Zdw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bfc45e1a-7f7c-41ad-34ef-08d843da0147 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Aug 2020 00:51:27.5301 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tEHNfVO/C2Km77aAhqrFR018fucGqZw+TXIh4HP4oONsYYMfG60+7VYzfunmeeoXZ65aIB/qhoBwmJaVyjhwJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5466 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Subject: Re: [PATCH 04/10] remoteproc: imx_rproc: make syscon optional >=20 > Hi Peng, >=20 > 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. >=20 > 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 suppo= se A7 would not work properly. 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. Thanks, Peng. >=20 > Thanks, > Mathieu >=20 > > > > 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 =3D priv->dev; > > int ret; > > > > + if (!priv->regmap) > > + return -EOPNOTSUPP; > > + > > ret =3D 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 =3D priv->dev; > > int ret; > > > > + if (!priv->regmap) > > + return -EOPNOTSUPP; > > + > > ret =3D 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 =3D syscon_regmap_lookup_by_phandle(np, "syscon"); > > if (IS_ERR(regmap)) { > > dev_err(dev, "failed to find syscon\n"); > > - return PTR_ERR(regmap); > > + regmap =3D NULL; > > + } else { > > + regmap_attach_dev(dev, regmap, &config); > > } > > - regmap_attach_dev(dev, regmap, &config); > > > > /* set some other name then imx */ > > rproc =3D rproc_alloc(dev, "imx-rproc", &imx_rproc_ops, > > -- > > 2.16.4 > >