From patchwork Fri Oct 14 03:10:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 2485 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp597334wrs; Thu, 13 Oct 2022 20:36:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Q/sfbCoCwQUzAE9hAxLNUjIOD3RfbEiA2GB3MRfHXB/7izyoNNLPrBtdW0IXuDbRWLEpC X-Received: by 2002:a05:6402:4150:b0:44a:ec16:def4 with SMTP id x16-20020a056402415000b0044aec16def4mr2466194eda.21.1665718565687; Thu, 13 Oct 2022 20:36:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665718565; cv=pass; d=google.com; s=arc-20160816; b=cvQ3k+WDFXPRtQpbGjNN8A2maI5Gq6D2rgbaEfTiAW969mplY7HQSpSLg3/my54qyY h7XlC8rybTM4JffV3TtePb5pjtouqzg6HyDjYUPTCZsN0kT4UQVPtnBtO5nkciLtDZTA lYTUVRI9XF13fq0woVeBxv19bZkzUq724fdWxQ9SI1hIfadfjdnC7BCGBqV1hcbFyewh zmZCEaRnaFZwexEeYHbBEx1SBxm9SJGds4sTp/dbTnltoMLC9iR2mpd7eRw9ojKW3tvW mk/HbGxNa+KAf+exPhmBj+YYmFqVR8C6I8KEjUSPqG26l0Vxe47EjmjsqNJ+RrIXP3id L8KQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=R+WdwO2aQHI1u2J5cop1FJI2ntOHTRNGQ7fQDHotXgk=; b=CbpAGpEMZZpSQcVTEWCLOHcgrK2bqskrWr4imZZ316U4XyzAUVvGO7EMiayYGn5ZQY wtXy+XQgR20NC//eNm8JZoYfZPCpPZ9A7Yj1aqvYNyp0FQIbaE9K0cI+VrGybGOnAzVA nEeOwRelMkPoRue86+BXPIv7u8VFdyaxGZ2xTi7Eg9KYc4uAMQV9IoCfJ9XqWmBdMXJi 1TZUhtmf3fCwSybByf1WCl4Cpn/TA+LrBQhGlyl4p1l7CpDTpl5oS+dvWtzxtwa12pGc +9lJ7pQiNUy9jv5Eap7qQH8Xc/oRzvpPxalQr6wvYlp/wW8SLAhKFgOBig70rDjXVWem Lkng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=DidINije; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020a50ab13000000b00456e1b5b8e1si1147997edc.426.2022.10.13.20.35.17; Thu, 13 Oct 2022 20:36:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=DidINije; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229526AbiJNDLl (ORCPT + 99 others); Thu, 13 Oct 2022 23:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbiJNDKd (ORCPT ); Thu, 13 Oct 2022 23:10:33 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2082.outbound.protection.outlook.com [40.107.22.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A66AB13F22; Thu, 13 Oct 2022 20:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ck6KY9mlBzVqiJve6bxTBQmRJiJJFWVgsQLawCTXYjIhDygqKCb8G40xNXppL12hlAGbPQIhLbQh6IN2N4+rRD8r7tpayYNu2asLjgtC+oNTqxYFs2WgVAa+mjzTjJI6Nta0mwFTtVux40qWnvdY9Mhgxjt+B0Gzds0fdBL5SyVnX9q7fniQ02nUTQ/9rjjoEr2xx5jiEL5eRX+kk0fECHhLSMgyitafWqLIgnu+D1mBGU0qq+VhrVr30f1ABp401TDzvGEfDru3lFjF1ACcIn/DZWFuB5u95hbkeb1hJvjiXEdUG06eS6o8uYg8vWkBRdq7vAgPd+R4flz98JcgqQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=R+WdwO2aQHI1u2J5cop1FJI2ntOHTRNGQ7fQDHotXgk=; b=AiRPyZa4cgKOInZpwxVrnH9QAm1/hFTKcM3gu55ueOp3YaMx6jSPOjgcjvEipfsUt1wdE9F5dy+Ekje01Elllj+JyI5O4fOcVwCnaYLsirOlrO+hUnJ6Epu2pNIeDl64LuM3aJMp8CvyZs9Sn5OEXuAFCGN7MREeLt7EmXeZCfPLNG3MewoBtzHY3KGR2ojoh6m2xFzPdsxc7QocG959cPtWEks76dJPzUExo+NmopVkWMVDy00oghaylK6fPhaedp8ILUVqn+vDDJuch4q5IIb8jtLrJw0HlZzkvkvHKJXn2I1lSFJ35qWAc/xTm6vdXtLP4rdATjcFkzw33hCQYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R+WdwO2aQHI1u2J5cop1FJI2ntOHTRNGQ7fQDHotXgk=; b=DidINijepKWUGQOc/mMORUst54XEJN0RSmr4VJkzvg59pg2VmsH9w3PWCvIvi2VftVca6etYgdDvKxhGQru4B9puAMFRFvyWP5ybOP9xFD8IhVznvlZWTGETNXbJXEhLMSyaDjm1BKtjVcUU4h1qeDyrehYZmIQ+XuDuXgdZGNw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by DB8PR04MB6956.eurprd04.prod.outlook.com (2603:10a6:10:11b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Fri, 14 Oct 2022 03:09:40 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::ba6:d7ae:a7c9:7a3a%4]) with mapi id 15.20.5676.028; Fri, 14 Oct 2022 03:09:40 +0000 From: "Peng Fan (OSS)" To: andersson@kernel.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.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, Peng Fan Subject: [PATCH V7 7/7] remoteproc: imx_rproc: Enable attach recovery for i.MX8QM/QXP Date: Fri, 14 Oct 2022 11:10:37 +0800 Message-Id: <20221014031037.1070424-8-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221014031037.1070424-1-peng.fan@oss.nxp.com> References: <20221014031037.1070424-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI1PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:1f7::17) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DB8PR04MB6956:EE_ X-MS-Office365-Filtering-Correlation-Id: 3dd242bc-f55a-4b0a-b9f1-08daad9188dd X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NmdVaMV1tG40EQSVhgTdIWw6pO89LHT4H4Mg3jIPZT9fZovBve4b9ABm3ZlpV/zxKV+U5Wd6/EF10YNNQp423FUKaqttQ24/4+KRVsERmRd0sD5ABJHhSm2rvZ8vnZlM2i4Nh555WS6OqdxQkheZ7S0CaM+znczesK6aOrsJ9p6t0Y9dnxLq3nlV6Fdw5g56TIjpvCwH87B0z4rn0FcunJXs7Fi8HrsCdiVQFPIG+HFbuXJQDb/yalEx4MCSWBSzYpGBj7AmSjXJP2pC7IulDKVQmOAeHUoEB1yP9qhtEpcrTdVSHRlPTgMRbmJYbhElb9Gk+Y/PVsUEahEp4C8zbUk/H8wFOiPEhyzQoIJq/Bm4OTYX8F4DKV+bXjIFh9RizrpJ+9JjU2Q8o+pDvimAeewozdHMHjjj33nqfInCBtpztUaTkJtP746V7qN8X8aFqiDQ3+PCBCxbsw3x1GcjqgRj8RYJeuMv4lBATqvzAWAlnclh23sbYE33Tdu+VAdomz67jh2wIlRhAX5ytJtju6bvtQXUBpwuLnTmAHsRTRj7PBmytbMXCqMEgaq2+xn/x3fZ3WYXSNPUyAYEeLDlA0qmiKjue0GCRerUBYOw5LQFjrHacYHWHWEVShU1UHD+p1rOkUvVnY3NGM4psaql5RSgO5w2HbmOhSxD3106+4kJMNkTeRFSwiuZfbUIFoe7bsO1XqcdpN6Yjcr+bg9Rgi/oIyXhLpgKKbvvqMi+gHqNVhFqDDtPe9QmQRMGLOlRpGmLh2ZcavSClovt6MlgGA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(39860400002)(376002)(396003)(451199015)(2616005)(26005)(6512007)(52116002)(186003)(66946007)(316002)(2906002)(66556008)(41300700001)(66476007)(1076003)(4326008)(8936002)(86362001)(8676002)(6666004)(38100700002)(38350700002)(6506007)(7416002)(478600001)(5660300002)(6486002)(4744005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: m0is//TfkpizZp2zLGgg4QlxepIOhzL3iKRdD7wTz67LfU7MxtNyWNWyE5nbhLI6mKbM6cRNQgKwxAwOMZRaokvcz3/EE/deq0V+mhc9h107LKyp0lS9/u1tb3MQoboiZFr2AZpPQaZqqpfke7tTB4iK9rSybSKrcaL2OpEfTa9Zfylfztmh3XZquvxxPzdUorYTuTkJfSPrSB1WQZ61K3TydhwJY1TowAF8rYiZ3a3422vYvOEnx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xFpU636l3dSDThswCzJ3Kvs/FWHJFMezy5akigbQUcdWDTcUhBYdJiSxGidUAOyMqnRa1ixWl2XomtXePDJQigLR88SQVboBSXVckX6LBf3JsmX+dpavnRkI+CbQZnHAbasVq1+lw5P6v+W7cfby/ak0fnO9Kbxnt7/JcTqt03UDZIK67AOBpgxSJRu1DVh4bJ16PY6zKjJ5WYWMEsAj7xqLNNoF64lF7lFh8pLpYe0cGbIcsen1fM+ECKs57lSTt2bK X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3dd242bc-f55a-4b0a-b9f1-08daad9188dd X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2022 03:09:40.7879 (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: kp8yzppbk2xMpUmz2VIvYe5vFz2dBQjuqh5uzsSlLn6gjQhBv3z2RePBfT96UW/DIHsG3ZsrLrDih5hsLjigDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6956 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746632510757651526?= X-GMAIL-MSGID: =?utf-8?q?1746632510757651526?= From: Peng Fan i.MX8QM/QXP M4 could recover without help from Linux, so to support it: - enable feature RPROC_FEAT_ATTACH_ON_RECOVERY - set recovery_disabled as false Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 1183de84a4c0..2f82587b6ef9 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -939,7 +939,8 @@ static int imx_rproc_detect_mode(struct imx_rproc *priv) } priv->rproc->state = RPROC_DETACHED; - priv->rproc->recovery_disabled = true; + priv->rproc->recovery_disabled = false; + rproc_set_feature(priv->rproc, RPROC_FEAT_ATTACH_ON_RECOVERY); /* Get partition id and enable irq in SCFW */ ret = imx_sc_rm_get_resource_owner(priv->ipc_handle, priv->rsrc_id, &pt);