From patchwork Fri Jul 12 08:34:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13731389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B5C9C2BD09 for ; Fri, 12 Jul 2024 08:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kB+3xJaFvfwf/JManv1fdklR8ALp01O8x0/PpiIplJw=; b=Q1tY/s/gTIHJi5o63mXYoBT03L J+jv1Ft8AxDR/5DVaVyx5AruzCXwtzLuLS1CxgxtKw4AGmfBU/4njiJgGPoCmz+9qNKG/4sIXrQnc FxiXVh1BVo492r7uriOL9L36enE/k/pR27GcKeud52pcmDW0A1Z09TGLprgXygkfKweeJPYOIP9Y3 m/hb17HUEgHaL7lKO3Il5YsmoEZhG7dWFKtYFCEFNPcPCqcKwKSgMeX0KI7nZG2+ptULFJ6Ddt7FY Y3QyMGWdokY8zJTeLkdTNziixWXnrf4fAwVA4MUTDyo4dgUrm/0YFLEm7BQkBjXBN4wULiyGGXKU0 K8iC/YRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBbz-0000000Gt4y-2THK; Fri, 12 Jul 2024 08:26:39 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBbT-0000000Gsu1-0umb for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2024 08:26:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Od5ETVQUG4l32j+DR62HuZk8TWbU1rOb7ZK0aX+qXIWk9GI0BPvC9RyzrsUoGeRBX14Qj2ctK8YYLE7FOAMC3qzhunh3CNPKKDNChgQmjvVcvPgC+SVTn4dWD7F9TnPrrP2UaCMck4hCwIKQvtUsuSNvDDI22DZe+KfvHz6ujmHA6IB9G3nIe33LGceYB0oJo9yitmO/mLbvcccrJNx5Dwuy4Mk/F62pE5g8/QN/OusgAd0sMiPMxgfLIijFytOLlWXDQOIvL3fFZKXPbFBcDE7IpcnBEjNJ6HvRDPqo1DzyOsj7wnG7nXNFjeVxlfMDIekBJLAISv3RkEGIc/lOow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=kB+3xJaFvfwf/JManv1fdklR8ALp01O8x0/PpiIplJw=; b=UU2QvAyqotHVzmMruSSnjH8VOVmzZsLNEwOGmDvMwdLbOr6O4vBcYM2nXN6FqE+Bh5NJDybvxPlgpC8l9xYDiFCbBo/wiCFTTBNwsczuqeb+OQ3vvnrKUZG6bI2CYCJaJcGea0nxJ21EJT/dM71ZOzU2xbt/Qfo4mVoilUz4G9wYteYw5XlCOjpLrHLj8JPaLh9VEt/c5ISgvi1oRwxxmcQUAmMhWaI7bDDysggTpaOy3FjAHU4zBADi2Sxr8YUghduQnzk3NP/YbuD89wDWp/gDSlUq2Q+DRGjfMKZxdL0O0dNf/UeCF35yWllWaGjtMsHCXOiH1itcIoTKn9hT7Q== 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=kB+3xJaFvfwf/JManv1fdklR8ALp01O8x0/PpiIplJw=; b=XKM9mks53fKc0LYHdkIDhaDMk0/gtWocWyTRlnyhUl5I+SyAfeiPGgIsx8guHwfnY8ZfARqr2NENO0Ysd+LfrjPiSdm4pwDo4mwsPBaQ7FbDFM/5ykzjqO+ku+n1v+f3BZSKrqv8CIbvzpjylRLw2R2e2JMByvh9d3nDpHHlCkY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by PA1PR04MB10865.eurprd04.prod.outlook.com (2603:10a6:102:48a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 08:26:02 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%4]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 08:26:01 +0000 From: "Peng Fan (OSS)" Date: Fri, 12 Jul 2024 16:34:54 +0800 Subject: [PATCH 1/6] remoteproc: imx_rproc: correct ddr alias for i.MX8M Message-Id: <20240712-imx_rproc-v1-1-7bcf6732d328@nxp.com> References: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> In-Reply-To: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Richard Zhu Cc: linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan , Terry Lv X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720773307; l=903; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=2+8kRplRmHc3aTFiCtafaWWSL4i4VNI7oxPsLD0O6o0=; b=wP3Z6hHrUJ9pUfcZAnblIThjkibnSqFon0qu5V8q4MmO/C6/3Yu9QAbSY71H8XFbIicLHLcLZ EeOaVM7mfATCSwh3Aogr//YU6BOvYckpriVsfxk7MRPsO0BfTgopLjI X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::12) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|PA1PR04MB10865:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e42fedb-8201-4e9b-5805-08dca24c43bf X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|1800799024|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?pOxHT0XgnSkVYMJqy9U14ufk+l5u2bN?= =?utf-8?q?iGuTs/MWnOnoH1a8dVerN+P00TebDM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x1ECwyhvFOPJ34dQ+tWiAdN0hfIQAwhZhyWAQVzPDegkqV?= =?utf-8?q?lDAoY21qFl08WOvGZ47oeq4y+UI4n/GReA3qZFa14TVwROEeNjTpvAJukUIrziY/J?= =?utf-8?q?3Yps3i8R9Wu7+0wOO8dLypdd8K0/d9zVyh2+EPuiM/GwjtHlfSqPR0tIlhTT/MuPA?= =?utf-8?q?p36KxtsYmGrIZNMYyGOIXGtfj1mcPDGtclz8yIJqDrJ/DjXSWzj/dRopUjPyMQr1N?= =?utf-8?q?usmLyNjCpCv8fjVX/acVCTVrBfm5axHrG6sOa4ApA05wMoctlyeWz2w2Rl3EsDlSH?= =?utf-8?q?2ZJGzCCwvXnhIOZGu/ZSxpPGgNUKYy6elhnDBQGK3IupAMZCr5haMgoDBnrWRUjFg?= =?utf-8?q?ePDRhz0wSaFF+Gm2+yVNtRRt4Zbw4c7HkKL7FJKeyQoM5d8N+KAsH+y99KfdAnrKE?= =?utf-8?q?oXpTq3FPJOo6rBnZN6SnDNVyA+b1ueqc2Q=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(1800799024)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?y0Rc8XNOX7/SdyIYQ6khSplhahfz?= =?utf-8?q?LN5VcmEvj1oGb/b9W4e+5oXiCR/spY0IW7UI3tCK0MqLUcBq9mIMW+oec4K1Wdqpz?= =?utf-8?q?z10+OhwwXMGLSEEDVGGLZggD37T9nLheMkhPGhb6qQVitOesPPfdDGRdmXRlBaAAV?= =?utf-8?q?VpoO4xhgScZe0p2yZvyHOmha7xQlRFUz4xeB6hmgz/B1rxHs89dqlVvLmKmBIL9i7?= =?utf-8?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?q?VsFgUP199tqF/iaqX60dNTkfDZs2PKS0aV3iBG24P7+tkJV0EFwc6WRShrwBze/Ri?= =?utf-8?q?zgosxtPVCTIO5UhJoRGYIwj+lnOE8xYNFiluYPS3wUKk50wDdteQg5i2BUs6Jhc4N?= =?utf-8?q?xAxOuuWlp2NQgvXf0GN2HGJ0R3L0X29cyywXzfJkDX+Wzm+CpBmO9ccGopYxhOQPp?= =?utf-8?q?8ZFCzJ3JtF5AtaPtYJm4hCQPvc6rpTghbU1T0HWxyLYJNZgTVcQxNx0YmT1vmnLNV?= =?utf-8?q?zxU4lRUQl7V/3fUQdIPfKFw4KW9rK3SYzAbc5ttoa0au/xpJPm5tibi4ljndEaozc?= =?utf-8?q?WtzpDNZB2trPIVw7t3lybUhyGecGT9vzzxrjbi9lB7gxfBeou5xMWDgVyt8HTaLHB?= =?utf-8?q?aoBeYE4KRDrI3VasT86XEAbF67fLAqQYFE45L0mCRMOiLea0xesdWRg9zlh4k9K/l?= =?utf-8?q?gi37jhIMQ7hC?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e42fedb-8201-4e9b-5805-08dca24c43bf X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 08:26:01.8851 (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: yoyrIpgalJC9D/GqCmf0ssQbo8DQ1hWsIWVj6Vpy31JqbgG1W3PJ+2kvbzh1luGS9abmFYujF3PNGx30VpEkOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10865 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_012607_303680_0BEC0C6C X-CRM114-Status: GOOD ( 11.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan The DDR Alias address should be 0x40000000 according to RM, so correct it. Fixes: 4ab8f9607aad ("remoteproc: imx_rproc: support i.MX8MQ/M") Reported-by: Terry Lv Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 144c8e9a642e..3c8b64db8823 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -210,7 +210,7 @@ static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { /* QSPI Code - alias */ { 0x08000000, 0x08000000, 0x08000000, 0 }, /* DDR (Code) - alias */ - { 0x10000000, 0x80000000, 0x0FFE0000, 0 }, + { 0x10000000, 0x40000000, 0x0FFE0000, 0 }, /* TCML */ { 0x1FFE0000, 0x007E0000, 0x00020000, ATT_OWN | ATT_IOMEM}, /* TCMU */ From patchwork Fri Jul 12 08:34:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13731390 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA1D6C2BD09 for ; Fri, 12 Jul 2024 08:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vKXMiTqaYlAeFcfVRMSl+kE94XTGFTZfh/amtvB+/tc=; b=2J6MNDtD9JV6CsEVmz4YHuRjgx 3YGYRxQI/zCALwxzE/CSPbjhoLKCe4QZfsqiBtUlx2IRqCrd9PdeIzMa1KnaVKcUW7fCizQm/Oj1V hWGJZWDuoGR+5HJVq5mDoTQX4GeAsikv/p4V7SURfwsGIHw82J2yJcin4HHJwIwTGP4C2nVfNx8ql 62ty69wRGwBwRrLH4tAKWSEY43/g82FVgLMOyWRi/IUGfIUDCPIe+zAqCd5tLdE/mfcEZ3n70g7rN HpJb+wNwvWe4oUqaaqexmj9JVG+hZlx0HNr894bP9dbUlJTchWByh5M/2HEIZ8SuTqt4U7WJwrCe2 KPRn/zGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBdF-0000000GtUC-332S; Fri, 12 Jul 2024 08:27:57 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBbU-0000000Gsu1-3atW for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2024 08:26:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QrcCGA+WBPiGMTnMPo1IKpXTj9SSh8fK1Qcbjzn8CsaRTcLRG08NUKpjllgHc2Uyeka0gLOMesd2tx4jT8RDIOJ2pBg+i9RraMyrLsKA01MRSeUKApml+ZoiIIWt6Ic774++/G2DDJdBhIeXgnuFkXtyAXQQF3e0LZGpM1r4LzDdiH5Kp+YqDHZDd8fLqZUe659gewhqfZPC8zK5GtTlIc/owBF0+S15qkKxtpbfjOQUk6tb5UJZllxltt1FJt4ZWCBKzvZ50T+MTrWKCLPTAsEgpgGi8cbdoFlcTYAyYhOgF3qlTDKHe9ftKHOD/ALpeHcVHOkmIjxBA77eicPm+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=vKXMiTqaYlAeFcfVRMSl+kE94XTGFTZfh/amtvB+/tc=; b=nvkkKP23x/RRlzkq0OcjsR39cpjbyavRvj+bE47wWqYjDtr8/76IhpnjyFRtsyLzOl/W8rMc1BbVmgVNwoBqPmZjUuuhJ4eRUVFZk4Kh8RSnLmGueB4PhPFmQSf3yX7ivn7QqrmM+QXhFK/X5pem50KHKjiApdbeHSMfpzSc/9ADK4Skg8nR1fj4VJh/jEF2JcFvYMFxtM2MDR1bJiZT/TBttLQ+xvIFQQ1bcf9Z1CWvFALjjfBZQqe8ZQYxlgr8jbkDm0qeJm4AZKSZSy6V/CZJK1nMuRSlc5PPB5/XXGgseGu7zm5fsN4HmlE/fITaP9EitJu/z9oyz1aHXp/nTA== 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=vKXMiTqaYlAeFcfVRMSl+kE94XTGFTZfh/amtvB+/tc=; b=bO05qAgNvwWouwVWQ37UP2JulJ143zyielhPpJbtnSPl3kWoo8RlcKI5kFyIUzAwZgabAe3ZBJv6nN13a9aw+qgQdqASgeyFGJWiZrEm1qlqU5HPOG4qBvtGIGmwYZudTHC2k3VMh6qetcrqcU374K9KpMzF8Ur3pgDR2UO0o5k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by PA1PR04MB10865.eurprd04.prod.outlook.com (2603:10a6:102:48a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 08:26:05 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%4]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 08:26:05 +0000 From: "Peng Fan (OSS)" Date: Fri, 12 Jul 2024 16:34:55 +0800 Subject: [PATCH 2/6] remoteproc: imx_rproc: use imx specific hook for find_loaded_rsc_table Message-Id: <20240712-imx_rproc-v1-2-7bcf6732d328@nxp.com> References: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> In-Reply-To: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Richard Zhu Cc: linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720773307; l=2180; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=5OwRNu3cAz+Ue3vFIv3+yTH/B5Et9HcjPjl6alTKnUo=; b=v90UbQqD4jNEucmhcJp6dCBH7dL4H7jYSrAZE7VhKXG0SopTZ9Q7djq+aZlWO/dv07yQooNUW mL712ueYeuLBDlci6atMOOKanvtMz4w45/1qAumz5qaS0K6tG4gFXOc X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::12) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|PA1PR04MB10865:EE_ X-MS-Office365-Filtering-Correlation-Id: d670bc45-095d-4cd0-c4a5-08dca24c45de X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|1800799024|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?JnROAHvRiZBWjTGldA4lQFBo9oi+rHl?= =?utf-8?q?UjjNutDRzfW6/wx3YxW+t904viEzctXayP4ddT6gxS5kbpABJO0TxN9GvQ8unKFLB?= =?utf-8?q?NIGqGojexi8D1KNf82UxOMkEjmDM2zrhiX79x3KL2o3Jnfeb9wQAQ/2pZnEmMfNcC?= =?utf-8?q?ub3UCneL4rSqVnlU5oXdyd9EdSTAXKYQLexkIexMisAfWDn3ghsF8MUqoX+051cB3?= =?utf-8?q?+dArHaM7Unp5OSGB6BZbGR/fN3gImrwBm/3yi/ng2LAhaqWxZD/AtiDQjAlUSwRl2?= =?utf-8?q?DNDizvTyWDWlk0gzFdxuRLDDO0qRjTwceeaCfgW3mdWKqkK5k8ju/0YpuFWy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=?utf-8?q?98bqZrSNinhq9/4c1I2y+wOXckur8MZVsq0Z83zm1vr8JXUgXgBH3DmtW0EfVy0Vg?= =?utf-8?q?y15VaSmCmftQKuX0ToOFRkwKiJi6diaMuGYb4WqliW1zkFfz5NH6G+B9kQTvRfe12?= =?utf-8?q?IjuMDU7UBYRVaGZizNSBTDNghj/sjg/4wA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(1800799024)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?05Xl77T6dL62qT78mqVoK7aTH48h?= =?utf-8?q?ZP9DrLpmnl7UfMz/qI7nahkalVfFY8wdP+lTCKq4vOR/d6HaXnJl2gp6k4g0IplX0?= =?utf-8?q?8Rdgl2SbEDtkHFAeeN0GAA5YGpFObl9BWz5sJKNs1BHn6ojhAUx5R+EGPD9ROiAPs?= =?utf-8?q?E7nVs3W7ufo+ffs+hvl1pif6lBEtqTvz10BjdEGmXTB5i8fYeujcll79y2TXeqcY9?= =?utf-8?q?ObAObPKEEwmzDpuGDAs15f65uqOkV88I4unWBBaVgi4TB5327mQdfSFB8DYQne0DT?= =?utf-8?q?b1u1SJYeE18o/5hc2RlGVc/xTpmc9QIKpGya1qV/9Ixbh6QOiVRkVI7z0h84JVr5P?= =?utf-8?q?b2TayA1zlqlLPSkllZ84oK0p//dudqTi5b6UmUyr69wh9MAQs0sUyNWNwgw9djEW+?= =?utf-8?q?oKz9aukrd0R3t7j0QupyT6C67kG+WHof2qn8n3TC4J8qOaASgCM8rJep0B8TjBNQx?= =?utf-8?q?7dk76ga0DEQqv0JthBssH9YwQRMSLvX5TJkEHkVzY6mUVV6LeohcqfLOWDZmNlkO9?= =?ut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?+bnxfXDHYyL/To/urtwHwKIdblJqNCfO+vHNI5RAO31DFZvgHL3RGW6sxWhsLCkye?= =?utf-8?q?HqUusG28hBZEGdFYR5nCbWC60GyFLiGLkHz3lSwA8tJIAFfeiWwf+xUeCmu4VXrO0?= =?utf-8?q?+KJk2XTl7VPo?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d670bc45-095d-4cd0-c4a5-08dca24c45de X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 08:26:05.4425 (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: MXiVTd5iGMxbIMaCoBgW0hjEzOhwRwO1Ac8t1Gojwzvo7094xQGEcJsfyrtg2HgglvNXiX0uC1WMix0JoNmOaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10865 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_012608_941602_DCCC1628 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan If there is a resource table device tree node, use the address as the resource table address, otherwise use the address(where .resource_table section loaded) inside the Cortex-M elf file. And there is an update in NXP SDK that Resource Domain Control(RDC) enabled to protect TCM, linux not able to write the TCM space when updating resource table status and cause kernel dump. So use the address from device tree could avoid kernel dump. Note: NXP M4 SDK not check resource table update, so it does not matter use whether resource table address specified in elf file or in device tree. But to reflect the fact that if people specific resource table address in device tree, it means people are aware and going to use it, not the address specified in elf file. Signed-off-by: Peng Fan Reviewed-by: Iuliana Prodan --- drivers/remoteproc/imx_rproc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 3c8b64db8823..48c48b53a3aa 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -666,6 +666,17 @@ static struct resource_table *imx_rproc_get_loaded_rsc_table(struct rproc *rproc return (struct resource_table *)priv->rsc_table; } +static struct resource_table * +imx_rproc_elf_find_loaded_rsc_table(struct rproc *rproc, const struct firmware *fw) +{ + struct imx_rproc *priv = rproc->priv; + + if (priv->rsc_table) + return (struct resource_table *)priv->rsc_table; + + return rproc_elf_find_loaded_rsc_table(rproc, fw); +} + static const struct rproc_ops imx_rproc_ops = { .prepare = imx_rproc_prepare, .attach = imx_rproc_attach, @@ -676,7 +687,7 @@ static const struct rproc_ops imx_rproc_ops = { .da_to_va = imx_rproc_da_to_va, .load = rproc_elf_load_segments, .parse_fw = imx_rproc_parse_fw, - .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table, + .find_loaded_rsc_table = imx_rproc_elf_find_loaded_rsc_table, .get_loaded_rsc_table = imx_rproc_get_loaded_rsc_table, .sanity_check = rproc_elf_sanity_check, .get_boot_addr = rproc_elf_get_boot_addr, From patchwork Fri Jul 12 08:34:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13731394 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 947FEC3DA50 for ; Fri, 12 Jul 2024 08:28:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2oWHKCUVfvrNAzxd6DC9qQ+keZBb/vPFAM96MmrhN6M=; b=TxPEx4df7/Z6OOBaYfUUr9yPFz QYk7wWxz916AIt65JqTovze0YIgd6TIV0rgBozAzVm28CgEQRKFkZ0idYvSZzunREK/R2uwFopttW e9KGPs2xnZYaX2hDEIiHZ9nskNYjtymBslRA5jqP4yNf/8vIs6/D/RLBxZc99J0CaOS+TUk8TKJUK n/IHelSOMerkh99li2dA/Al61qYHUFL/lj44gD88IadMJJWOkpiCoSoQyDklVNU3alLfxfTBIi36j yoW997K3o4U1RsYDkAVUOxk0rW7BoGVoDhmdYk9nIcsIpyCxeM/eMifPKJLin9AfGrbKCaQ2F1ZJH j4euHK+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBdG-0000000GtUv-1uzE; Fri, 12 Jul 2024 08:27:58 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBbb-0000000Gsvt-2WTn for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2024 08:26:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=U5HKPn7Lc1PEwsRK0dECs1T0/9qCWQe6SsT1ObyTwE+oHyCGGoAe+wmw2iZY0N/Y1fNFJyTKBiKcmXBnIWuikc1gkX7RwLGP+0ryimtvo2v/4sFMV1ZtSSI8JYsvq0fjIr901NaeWQ7RrCocXWyGzvctMlliJ/22akrrlSAAl5ijc6X/G9fbRQMmTmThEllRYuaO5DN0ifGmuVHIyR5eUWP0IBHZEs54XqpuzF9WsouGFz72Ka5OxjUzZBNPoVtEv0uC8CvpnO2IaMD89MsbpI+L27mLDgiMZdYJ6L6TAEi53M8U+n5wR9OX+WIP7/unLfwlaMgUF5/UONhWhebjAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=2oWHKCUVfvrNAzxd6DC9qQ+keZBb/vPFAM96MmrhN6M=; b=XaPDaKBrlGhQhZIiOz2sU92hNDaXoKitU4sllqa32fcU/mDro0DWgi2B1M1jweNXZMC6p5NDp92tEtataGYCD4NgeFUhxvaiz/5Uit+i5bJqiOwhdsLuCXtX8eC0EfFOhA+I2nchLapGNhBYkxic1wE190XXV81ZbdHj0Tzb6SPmm7zA0pCcv6gf4hl5UtOGUNcVoSjS338iksebnUTgpvKTWHUEIweLhHXorkDYa+uwzCbf83Dc3W9p9hjo/eB6I2UPxRKpNezISrE4iZAWCr7v7jGdcp60ECkuOLwsFqcudRc3gEbSlQonugDdRlDBztbnTQGlkKId1ASKANWxAA== 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=2oWHKCUVfvrNAzxd6DC9qQ+keZBb/vPFAM96MmrhN6M=; b=gKMpYrBJ8SAWNlUZvNs21utDcOC3eRQ2YwKnAohXI0d+TJvWDhOFJXvWSL1Z3oP/TiSsowX1XRgu6XHP5AvxME0/M67qw191v0hQsFeXdHyz/856h9MO8wE64K8hCuY96eu8BaB3Q6IrxLapEq/NLSz46sj1BpbNBtuDBEVvYrk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.22; Fri, 12 Jul 2024 08:26:09 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%4]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 08:26:09 +0000 From: "Peng Fan (OSS)" Date: Fri, 12 Jul 2024 16:34:56 +0800 Subject: [PATCH 3/6] remoteproc: imx_rproc: initialize workqueue earlier Message-Id: <20240712-imx_rproc-v1-3-7bcf6732d328@nxp.com> References: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> In-Reply-To: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Richard Zhu Cc: linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720773307; l=1089; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=30BtbG0V4zrqqgPMiZOOg2E1J67bBTLgehXqosatdF4=; b=sPaOPV7FaSLgnsmRzqAItmpVuWs1UFpyRjcdsJmJqR2xWS3+WdjW02OMOo42y2XHPZ35WUGep UPBQhkoHycUA8tS0Y0yyPKyZSNFqBPrzjrQ8uuZ6/zkFSgoOL36fq9L X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::12) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: c872be37-318a-4c30-84a4-08dca24c4816 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?5WiLC7AXO74F8dnvES7zWPRBNZET3dI?= =?utf-8?q?Av21CdN3f/Q7RdLXnn/1tmuPZ+ZJDi8LMA0/DW7EC6NLeErZ9FF4vKCEMCakBUqDe?= =?utf-8?q?EQjg+lZim/6EA4dlG2kkE7Dhx6sKYXim+CdISyfD3HVDZpC1t7CgtOFkTndTROxkN?= =?utf-8?q?3UqMDkW9Bfj/cY4kNJ9MOXCOHqE3RiWHxYsZrssKemG6td76GRS/EFGmrgRr5FVAT?= =?utf-8?q?bRSaYvNStSIappLOzNjo9oOctEXbDLyPCwFnuWrpVIwPo1yTFXjv3adQFJqqx+DjP?= =?utf-8?q?aRfE/Pvriqurd5aMq8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ylrxoS4eGQuQ7XJN6r9dY9qW+u0d4W+HOCXsIoQpDV1UzEbkRI1?= =?utf-8?q?9N6+4tQBfcN+FpfcBdGaOzNPMQiXVxrafMd4yr1TcipVm5Iawwf07bkiEUlCQD/4+?= =?utf-8?q?rBuVoXClLJj3xlw1M93+VX+LeYYsSpwHCFGZOt6UEcEpPg+mcDLVUOh4e1ULYBc8+?= =?utf-8?q?uXGzpHi5EQzKa6RCzo/XRf4TdnYLKZYkfQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iBwmtSWc8ssVK9UtgJdBovbyHOft?= =?utf-8?q?9aIvS199x81IW/uuKLCK9Vqc3jC0Z2x9+8k9IbyETTEsRuPZgIjusg5llH7mawhx6?= =?utf-8?q?SL8plDbl3gFZue49p1c1M9uRaw/nVIlynQyBXcK9+AM0vxiGJCL4cgQb4IvXBDX7Y?= =?utf-8?q?k0TIBt5WZGF3bFmcnnBvFgYVca8Mk7y5kVMKTR5ulYfskel5NN6dfoCWVJ2HvaD2r?= =?utf-8?q?tFRINcbOzRgQm2nKmPN3Mumb/G6XIpAY9WGU5RL3WEUwZ15UcRb5UPebBLp9iB6ND?= =?utf-8?q?e4gKLpf0uc8iywA8jCnOxZ0FhIYiKCWgWPTDhAfDBcRW2vCcgMDhjWQ85qMqCu7Cr?= =?utf-8?q?SJXqf7pWYdE35Z1SDVWsPoIP6YGT9HRnNaSdBwM4UlqAmVeDJouY0lecDxyvKMw7S?= =?utf-8?q?fXHk0RYcCp6BzE7UKli6U3Jf8Rsq9GFXd38YdcOFHbRW2mYAV8QvBBAwFftkmlLKT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fxW1K5p8IX?= =?utf-8?q?QCRkRbiucrGg0BFpS3R02xYYCxhWzUromfQYijCJTv4BILDDlAHpisoyPMupJFbDP?= =?utf-8?q?+r3ubve1MXb7Cp9ySFAH/6nSqGXyOaG73fIeQfpkYdk8QnYU/yOzzDqR9eCuS69Sd?= =?utf-8?q?YdFoFYrifA5n+GZZCrs1HwEStQ/vI73QLm3KXHIc/vz9DUdI+jeCpfdr7KBAeibHu?= =?utf-8?q?MNfKySakLXyw?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c872be37-318a-4c30-84a4-08dca24c4816 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 08:26:09.1283 (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: i/3FsvXXlpKiQ/trTpOcFR4nl3xo863+Q3hCN40j8EtqeFZbOykqanksKYZWDsDXTTsSzcC8QYzTeRWJSrSdUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_012615_705051_90302F29 X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Initialize workqueue before requesting mailbox channel, otherwise if mailbox interrupt comes before workqueue ready, the imx_rproc_rx_callback will trigger issue. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 48c48b53a3aa..9e99bb27c033 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -1087,6 +1087,8 @@ static int imx_rproc_probe(struct platform_device *pdev) return -ENOMEM; } + INIT_WORK(&priv->rproc_work, imx_rproc_vq_work); + ret = imx_rproc_xtr_mbox_init(rproc); if (ret) goto err_put_wkq; @@ -1105,8 +1107,6 @@ static int imx_rproc_probe(struct platform_device *pdev) if (ret) goto err_put_scu; - INIT_WORK(&priv->rproc_work, imx_rproc_vq_work); - if (rproc->state != RPROC_DETACHED) rproc->auto_boot = of_property_read_bool(np, "fsl,auto-boot"); From patchwork Fri Jul 12 08:34:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13731391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BAEE2C3DA4D for ; Fri, 12 Jul 2024 08:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nfk6hYeTvAVbb6NwTf8pjeY4ISq3NZVDlCa/ldb3uc0=; b=g2YmZ0+rIJBEvrBVry0hWP2Igv Rphb4aSa1ZHrNBGU7oovkZZt7G7ppGPZ2sgiulBdOT0r0asN6jkUxwjoFQoRYBTkyG/tKLBEz5ZQG +dtEzMCoLZU8tvgKrZ8iX6nIuZubLfDdwpuq95ipGzjrVgaN8psbT3sO7T/ejlaAm/OHg1Ix72cRR LAVeGBoltLIeneh2O6BeOEIMtVNC0hXjiTMGlgQohpeRMGAOptpdb7bw1haSBg7K+p24tu1unBjFo mbNI34J+6t+XplX5lxvxy+zU/lgG813Zq2DXA/qVBiy85mhqV8Se4huUfkGIRptuIQUMwY0itgbU1 PhJx9dcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBdH-0000000GtVM-0CFg; Fri, 12 Jul 2024 08:27:59 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBbd-0000000Gsvt-1Njj for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2024 08:26:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BRJPCQB3vdXsbbho7rI3u+YFk4SIMLMuMRhV4GHEavG4g4DzkVeWAIeYk+TxGSwRG4YeImXbhFXFJwgd8jGhcHGXzQhw19/Sx8JuRML/oriUMtwC1Dq9iLpL9vqdGT5v7N7JeXN7bmmfwnZ/i03Bs9JvaKrQMV7w+hy9r1oOiVK8w6cX5BHWsUGJIv1XzbwKnDTzU5DWOmnNnrPzJm5EUqfwXc+AjFVoZ1nB12JbUUq9KrGfXq73CxKirniNd2QKDXLzeZIkYpnv9yQ7EbwlI700rmYoxg0OL6ZSykNa1VwrtqQrPSvKl6vBnpQBO3qIMY+x9JM9u8Yc5doeNmZHYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=nfk6hYeTvAVbb6NwTf8pjeY4ISq3NZVDlCa/ldb3uc0=; b=n2j80f8/ujImEDasriMK89KfgHAn2YOW2l3LZuP33c7PyGN1ipbyLhC2LBD1cKBHcp4pSDdox69kRGGymtPSJcxYs+oXWSk0hp2Kl9S5WvUwY6tXC9n70jHZfV4e8zuQOkWp6c0sT11BRDc5lUUbwv9GMGLmNytEaN6DTvG/ekZOkL/r7w92R3bEgsBEWTWJWm0WYRtWSFFGAfep4pESoCS6wLxnbgp1V0Oi4xw4vUh4hVwPH0xZUc6A6wy6uRtTS9x19TYYr2R13Vm+vvnf1FQxctxHY6ylQOsPLD8tK6ibdKYfulcWNxOzM3YRomUYjAlrQe/WEJu38abRSzy9wA== 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=nfk6hYeTvAVbb6NwTf8pjeY4ISq3NZVDlCa/ldb3uc0=; b=Us3yOxJ1Sj1gL1i0DPD5Op7u25K83uw6y8QOCCDvMey0Gda7NpUaYKbNOTTMTF1ehcuHAGYE73nFB+EqW29OjjXjPYvqbWNKCgUxXRtD7aC00k1RZz4bUbL5ETHh033aSf9XSlA4RRznaPCrYT9/n0xek3ROIjB9+nz9SMkzn40= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.22; Fri, 12 Jul 2024 08:26:13 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%4]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 08:26:13 +0000 From: "Peng Fan (OSS)" Date: Fri, 12 Jul 2024 16:34:57 +0800 Subject: [PATCH 4/6] remoteproc: imx_rproc: merge TCML/U Message-Id: <20240712-imx_rproc-v1-4-7bcf6732d328@nxp.com> References: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> In-Reply-To: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Richard Zhu Cc: linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720773307; l=2091; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=7XLi95a2fj18PTwvd4aD+z32TmYp3Rvrd5HBV+VL3fM=; b=i9yJfrRLWdMmwag9n5JrflmCc+5Ej4tw+7rRXfX7riI4j/O/t9237XsVxMJVX4n2kOaHqYapQ RtTTvaEls7JBLxiDPms8ZWfjYKg7h3RBbnnlQWEyaPZHOZ3wGd9NeAH X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::12) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: 20273a52-432e-46e8-ca5b-08dca24c4a5e X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?xa294EFv8pPtEFC1GaKY8CjLeiWgy37?= =?utf-8?q?SdRRliX8sdyeyyqvHZVzuGs31yKAoiR/rz0pW0n5Zyr5SOwcSFwIM0hf+kCDE2x8/?= =?utf-8?q?9WBS9y/wlqbSaIZalh7Sk34ANkxRl4xqY3qctzVQacxtiJ6kTLlNGTOrKzMxKhj6l?= =?utf-8?q?LHB+0XK3nRVMKHoysbbVTe/6R5NPh6cBRWuhXSb47vvAjI0wXUy4KfuwM5X5LAKbK?= =?utf-8?q?+xyjBOR/W7hrpH3zK3QZLaXYhplOpuVzhHTYp+1w1jLxeVWoWzU5U5qCPq+H8sjrJ?= =?utf-8?q?TeG/ilJDG0QjwDWTUSEO4a+ifMYMC0tVAmwkmnKUkFaufYePmpqDl2KC/tbnqp+Kb?= =?utf-8?q?czQYdkjV3AQ4CR3ToXI3YcGlzyV3RcdKEMRkkxVoJPkuOgiNrKa+pzUkvRBiEWcJl?= =?utf-8?q?VuCyllQfVNqySZ7VK0P02fiUZuI+dhFrlcc7vlFky2FHujtam2+H+OEfeA+lhIkLd?= =?utf-8?q?dejKQtfI+QJPFttnyuxV9YeGlpffcT/SkyFHvPixVbDVFGwMPsi3YSI8xQq29HeDJ?= =?utf-8?q?Xb6VF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SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?67Qp4JgSmVWAsjioaL1A/B6FRi2n?= =?utf-8?q?2MU/x9vW9dGRs5PgsbC4f5LuFBABxn/7mVovC1WV4+OPrhUa5FBQjdLCNVtK2NNQO?= =?utf-8?q?YjYuzjFy7qCtr7ugEvvfMVFhrdyYrCC8sOdRo3YjkJEL7meKkkJMA15G5IuGNUHZG?= =?utf-8?q?kLqvyur8MzCAphovyoUA/MTLHow8MV7EORF7QEcZSJ20Ty7gs5Vpnoi4yNO2RSgbs?= =?utf-8?q?vVRD2BXEHtzHYCWsUE8n/ZZIS/lro6jE95wTUDuf67GKZaMLuETyPuZ1CI0dm6I2X?= =?utf-8?q?lnPy3aOvuVIgWqSPlh/cnWmbVakxX0+GcQQyyz0rLlW/8bNQhtV73r+JdGfzj3twe?= =?utf-8?q?eV5c54NQcpx0adGH8+B9s1E38rBAT/x9ysHWgB0FubyOlaK7EXwS+tBh6NdCiIf+9?= =?utf-8?q?bx9aBz7RBU5tMZv+7AG32o2dvSIB9JiH/uQ1//KDmYqkH9iKOPEyFSgbamAnWZ63f?= =?utf-8?q?I1LlZlpNdCn3YNkOwkn5aud+KYzEkEmlCPJG9e2iMBcX8IyQ0IJfadaO6/GSVfrBI?= =?utf-8?q?tfP/DefGrDsZ/TsgD+esAmdMr4nFVVuWi8H4XClI4XGXQ/MkTJ31w+JDhou5tSJaU?= =?utf-8?q?tTwsDwEPiRQRU7P0MmgEvCytVz9b2nI8DnhBT8Rezvm3GLfUfntp/tFs+gUwDeNA8?= =?utf-8?q?I4yHHstgE2u/LOXjWIZYny3ymGA+LCz/fDgOI+yUxstT/lkIzi9Qut/j9Mj97d2x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-Id: 20273a52-432e-46e8-ca5b-08dca24c4a5e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 08:26:13.0250 (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: UvFAmn9h12OxwDvlHKcqsq0xa8QRxRaADApBavgpyQjAJuvKcJ95n+O/Am+rgG8w2xO1i7OdE7X20JWQ15GUXg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_012617_413355_F32EABAD X-CRM114-Status: GOOD ( 11.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Merge contiguous TCML/U regions into one to avoid load elf files which has large sections failure. Signed-off-by: Peng Fan Reviewed-by: Iuliana Prodan --- drivers/remoteproc/imx_rproc.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 9e99bb27c033..552fccebf7e2 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -119,20 +119,16 @@ struct imx_rproc { static const struct imx_rproc_att imx_rproc_att_imx93[] = { /* dev addr , sys addr , size , flags */ /* TCM CODE NON-SECURE */ - { 0x0FFC0000, 0x201C0000, 0x00020000, ATT_OWN | ATT_IOMEM }, - { 0x0FFE0000, 0x201E0000, 0x00020000, ATT_OWN | ATT_IOMEM }, + { 0x0FFC0000, 0x201C0000, 0x00040000, ATT_OWN | ATT_IOMEM }, /* TCM CODE SECURE */ - { 0x1FFC0000, 0x201C0000, 0x00020000, ATT_OWN | ATT_IOMEM }, - { 0x1FFE0000, 0x201E0000, 0x00020000, ATT_OWN | ATT_IOMEM }, + { 0x1FFC0000, 0x201C0000, 0x00040000, ATT_OWN | ATT_IOMEM }, /* TCM SYS NON-SECURE*/ - { 0x20000000, 0x20200000, 0x00020000, ATT_OWN | ATT_IOMEM }, - { 0x20020000, 0x20220000, 0x00020000, ATT_OWN | ATT_IOMEM }, + { 0x20000000, 0x20200000, 0x00040000, ATT_OWN | ATT_IOMEM }, /* TCM SYS SECURE*/ - { 0x30000000, 0x20200000, 0x00020000, ATT_OWN | ATT_IOMEM }, - { 0x30020000, 0x20220000, 0x00020000, ATT_OWN | ATT_IOMEM }, + { 0x30000000, 0x20200000, 0x00040000, ATT_OWN | ATT_IOMEM }, /* DDR */ { 0x80000000, 0x80000000, 0x10000000, 0 }, @@ -211,10 +207,8 @@ static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { { 0x08000000, 0x08000000, 0x08000000, 0 }, /* DDR (Code) - alias */ { 0x10000000, 0x40000000, 0x0FFE0000, 0 }, - /* TCML */ - { 0x1FFE0000, 0x007E0000, 0x00020000, ATT_OWN | ATT_IOMEM}, - /* TCMU */ - { 0x20000000, 0x00800000, 0x00020000, ATT_OWN | ATT_IOMEM}, + /* TCML/U */ + { 0x1FFE0000, 0x007E0000, 0x00040000, ATT_OWN | ATT_IOMEM}, /* OCRAM_S */ { 0x20180000, 0x00180000, 0x00008000, ATT_OWN }, /* OCRAM */ From patchwork Fri Jul 12 08:34:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13731393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65D13C2BD09 for ; Fri, 12 Jul 2024 08:28:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UUX6R497YRg7q1iy7q2/yhhuRn5+gy3qVyTi3N3KxUE=; b=ak1b5u+CbRIS+jxItQO0YHhhZo IWyy8JzJD7R3PZV4nlf2ijzLp+uCaGRC4Z4prHPSMIureB5NnO1TBzqzW3v1tFPHWFWcCP6Kv8muJ C/5gOiiSHVQ8l2GWHFOcmyIzBKUKy75KD9z4M3nD6a5vGGLmjwl+4B1SX06nLthh5Xlxr1xHBkogB QaG2diklTIUFUrk45pnmQo4MeqBYIiNhb/wyuQ7jp0QF2zd55fkj1PKC8rQ6Ll61nqOp3DgOpnP7y 7N+uC7W7oI9UZ/kX4JuT8CjcDMV1Bh1+HaWT0QXQvAiujF/2yuCLh3b2yzX698LU8/g8AOze6NeqK dNEECI0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBdH-0000000GtVx-2nKO; Fri, 12 Jul 2024 08:27:59 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBbe-0000000Gsvt-3j5i for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2024 08:26:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IlDzC5YJB3Ha+U/G2z73wdETtFwgrNZP+0Bm7Tuxs/tT/G/qmoGkYQHw4gmBGsK14s2vYmzcGPFXDYmOrJd2+xUfKXxAQfaVUyg+ur9XLHmB7HnuiHJSLSNB2Ef7tYyZ/CI6+FGWumaD/eej+cOEYxvXATDSBkNd+6eRdWmlqYhPKxuUxjwOiGiVXOsHddWSFte7lkchuJNMjQx6Cl/RglJyNuY4MeTXORK2JbxgO4N5b7ABGgTedQOxg02cRcIYQVDvwLLY7NOlxOER6W0G2KzAqyXsAIuQSKlsS0pogv1M14oqlo+k0i7mRkgrcIHuOJp2gdT3uzzoaKQNxBYiSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=UUX6R497YRg7q1iy7q2/yhhuRn5+gy3qVyTi3N3KxUE=; b=X0N/tZh+qBAjMeYCGsmsi6axAStWR66yBanWheOLzT24TQitcKN5xULw8l+PNLgJpi19NyjK305iAI3fpEv+qpbPqn2BD9wp8izNqpp2Mc14KIjWcfZcdfLFIpzx5ix4lQKnbfmUd/6WTzhYRr0q2rS7l5YGBDmVeneOjH7aVOAmw+jr+KlZjs8Us0EvRl05IZr5I0VjOO4sj7Uq5NldM9fDpEIHSceikhir8w14rd/DR3aY86xuOd3VpI1WuZ+ncKiyOnKtBtKfxqE5/kBPhK1gzDPY/2MtndMtDqteb5uLRqcL0HwdPn63M9JUxo3xQZxf2DxSxNz9VD9YDVb7Tg== 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=UUX6R497YRg7q1iy7q2/yhhuRn5+gy3qVyTi3N3KxUE=; b=HwQcagt/+X21LAIVTOgn+WxESDHHmC7rIZWGhx1Ycb0dujiey8i3CtevTsjmqDyqGzR+pSgryqJinyDfOLbZmhb0jh7xyBJk1ujGxGtOympdckybmfZgpG1Jwg0mgWEi2xzmSTeQFisuov2xb3iGx354UQ7OpRms8aZnyKijRuw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.22; Fri, 12 Jul 2024 08:26:16 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%4]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 08:26:16 +0000 From: "Peng Fan (OSS)" Date: Fri, 12 Jul 2024 16:34:58 +0800 Subject: [PATCH 5/6] remoteproc: imx_rproc: allow tx_block to be set Message-Id: <20240712-imx_rproc-v1-5-7bcf6732d328@nxp.com> References: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> In-Reply-To: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Richard Zhu Cc: linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan , Jacky Bai X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720773307; l=2319; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=p7aJwJNDnCiunEqGoMTxl7aI0DSNvgXZL6nZNHRBXks=; b=oVNucySmyuBcOoI187p7YzPR4LqOFvyuL+1dvez+QJLQtwHmN5kh+JyacHsrPnEKetmauw+5s NVZWqQS2JNxDplPOVI4SslJyuAcEX+4vewNULpUqdzIggMkTB1oTZlB X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::12) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: fde0177e-91c5-402e-1b69-08dca24c4ca6 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?4gXy2mNzp7By49dBbuO817dGOl3q3MP?= =?utf-8?q?QS7sFiR6CoAx/ppXf2gRV4yLpkK6IbglOiTgdgYtcyIqqdnMyBqLQ49u+41h95uH0?= =?utf-8?q?NbH4uqkZ6vGxtDeYWGDlpTxmk0LfnnEQJoj5g93dq1qYKOAMIKR+s0eJZikvUQv2y?= =?utf-8?q?kI9UEahl+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AXtX3M6LQMoJi2162oLsgbSVx2HjTAcFcwOgoeQBve0?= =?utf-8?q?YQUHawaTmqpZf4MfldZeiiqzapVLUC6hQDOYr38jMKVuG2gx63BGVifImJ02d8awM?= =?utf-8?q?d8QJilMoz4J/DauMsIJS9KOTGmHVNnTvmzuQnAblsmNz+51rDMJffIreLFq9whGpW?= =?utf-8?q?6Dd5Xdq6MZkEHNcfQ6t0Yr8+IUzYtSbYirKAvPgp6F512IspSW66Ao2wLSkukjPwO?= =?utf-8?q?NJnzl4VOt1aVnCkiJoEZrRc6emLlVNUf/P75WvXRxd1yg5Az6WG1qX7xhNn4/CZtr?= =?utf-8?q?bA6sbHJH7jJFCsw9FWQUc07Pf81nddqmgw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rvNNQAFh01veOVg/O6akhwVkljr6?= =?utf-8?q?kdqXSQAb8AqscJNds0Lm7AmYoMfAqiyI5R7terMgW94oidVqD1WY1cz93HaBrunL6?= =?utf-8?q?MHb5hA1I0Khbj04/YWsOnO7COoieaTwk5F7rtrbhlF9jf0GDpdO74r9endX9IGM9f?= =?utf-8?q?SR4glqihSj3gCVqA8QteAxUptOokWxurbhKLrl9SGrzuSu7q6Iuoc/9DqtTKToRcQ?= =?utf-8?q?gwqjMwlGMB8YW07iElibJxXsoyUfv9IPMATdj7XaFyJ762t7MJiC2aQoSTGojt+Ja?= =?utf-8?q?EtQ+DxPsa73G5p1mskD53DDOVDrx6ota5ZDkvE6Fcm+iXYPEvCgEyfcticCPat8qr?= =?utf-8?q?8kgQ5n5AaESjABUqCT6RDgen13p9b9fi4+J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ySdLDkkRT1rv57Pc/VknMzp6jGVNlw?= =?utf-8?q?a+koVRHDKB6+JZgh9HJpi5FBNLbcs4M+TzebFb7PSjMce0YoOsYYRkDDC5ShK7PMU?= =?utf-8?q?pIVSLLkcgq5zzTR+dsRvfT2Jwsak5dFNpTeVIE9dr+i73y3RvicrtasZby/IMf59l?= =?utf-8?q?xLQZ4Mttkb9QDd4rPvDH+v2mCwTx4z8Q7oxgmYIm8R+gPcWIe29VLfsbijAUHwJPQ?= =?utf-8?q?6MreAN7uAg1IMmHvjIgR8efouj+vOAAIwwyy7a+qbIwcbUfvxNwooEmoX/xM4crhl?= =?utf-8?q?YJ/n0G5jLZ8u?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fde0177e-91c5-402e-1b69-08dca24c4ca6 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 08:26:16.7902 (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: +goJhrMDSxft3VAHBJGMTkBbfNyxyzlhhmyXgZhSb1XpTrGdbGbAtZU8F8pYOoxnO7OEumL8+V8XooBFNsr6Sg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_012618_973778_36ED15EE X-CRM114-Status: GOOD ( 12.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Current tx_block is set to true, but there is case that no need to wait response. Linux just needs to send data to remote processor, so let's allow tx_block could be set to false. Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 552fccebf7e2..01cf1dfb2e87 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -90,7 +90,7 @@ struct imx_rproc_mem { #define ATT_CORE_MASK 0xffff #define ATT_CORE(I) BIT((I)) -static int imx_rproc_xtr_mbox_init(struct rproc *rproc); +static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block); static void imx_rproc_free_mbox(struct rproc *rproc); struct imx_rproc { @@ -369,7 +369,7 @@ static int imx_rproc_start(struct rproc *rproc) struct arm_smccc_res res; int ret; - ret = imx_rproc_xtr_mbox_init(rproc); + ret = imx_rproc_xtr_mbox_init(rproc, true); if (ret) return ret; @@ -629,7 +629,7 @@ static void imx_rproc_kick(struct rproc *rproc, int vqid) static int imx_rproc_attach(struct rproc *rproc) { - return imx_rproc_xtr_mbox_init(rproc); + return imx_rproc_xtr_mbox_init(rproc, true); } static int imx_rproc_detach(struct rproc *rproc) @@ -794,7 +794,7 @@ static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg) queue_work(priv->workqueue, &priv->rproc_work); } -static int imx_rproc_xtr_mbox_init(struct rproc *rproc) +static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block) { struct imx_rproc *priv = rproc->priv; struct device *dev = priv->dev; @@ -817,7 +817,7 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc) cl = &priv->cl; cl->dev = dev; - cl->tx_block = true; + cl->tx_block = tx_block; cl->tx_tout = 100; cl->knows_txdone = false; cl->rx_callback = imx_rproc_rx_callback; @@ -1083,7 +1083,7 @@ static int imx_rproc_probe(struct platform_device *pdev) INIT_WORK(&priv->rproc_work, imx_rproc_vq_work); - ret = imx_rproc_xtr_mbox_init(rproc); + ret = imx_rproc_xtr_mbox_init(rproc, true); if (ret) goto err_put_wkq; From patchwork Fri Jul 12 08:34:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13731392 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4979EC3DA45 for ; Fri, 12 Jul 2024 08:28:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0vbBdALk7Dt7D/DXgkbkRMc+ZTf7bDhD5YGcNlMAt8g=; b=xdNEVXNgXOplZJz1I1XZH0l3X6 3X279s6Kg3lu3m13yVYIeo8BbIv1Soc4wkyHSYL2YBMqadN3tL+aFbFUGNybhoBLSUwZE8AohAlEW pVXVQSXqrBqnnYmNyOL/KVaye24lEN5PB0c+x6itoPW9ONidUWOifIxS0yIGlmf3Wbk1gsFHNCkcp +vI9ljlAtOdSfF7fd+VXPxgPV7e2QeWilX9rMNWlz7dVeCzcjDWGLNy6wZ0QggxKGq/3lqt2XgtB2 s6tO7im9gM6ZhRWbfXNKR8wqEVXgiSFIk7F/+feFTJG6THdMX+sQvvEqhY9Z5nDYAyRtRTfHBgbti fpYfMlXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBdI-0000000GtWf-1fa7; Fri, 12 Jul 2024 08:28:00 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBbj-0000000Gszn-1qUf for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2024 08:26:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=M/AajlnpKB/gMnUfffBkw/WBmjfMgX8kXCJSrgxIMcP5PYITde1fYTAjII0bW91HacQw9DB4KPbsO7TtRW/XlKplpJleFgYnzxo2qJKBbs2ONKdiu1EhPHEEhjUZOG4fq5sydJaCcAlwvvvuW6oSUrvOEsCd6AXPtcQqiX3U94ITTE43UCRJNh68GtmwhptS1eTdKof+viFxz2csZ4ECUGhT24lnmxolvnUp/YmVEq059ifqiSS+uAp3FcTVrggc8yQ2MqYaIvhnuKPs+pELL27qgtS32tPo6zzj2pnsbs5mHmkngMF312b6/lVt8/vDf6oLhL5KwuVOzfbItno8Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=0vbBdALk7Dt7D/DXgkbkRMc+ZTf7bDhD5YGcNlMAt8g=; b=vDMDLKAGPWuUKoSi44wrbdXYmv4cYrKDYFzvZba/21zxj9osiv01rSNvixFVL1MjnuhgYdhnu+nJ4Dn1M7ec+ySDXEpm5Pkk2tYbUlX92qepdXzS+lb5tZTvdcN7JFiem8QA4LneT1d0L+37R6VxkIE2wfzSrHENZlBc0asSg9DcHRHzR2ZPGnUfmnN1vkZh9BEwwlIlpD3gqhvlr3x8ZRNoDDEfr/zVxjL50Sf4uxjsueWAWod+wxHC21Z+yQr1cqT27tpOEBc/zaAk54vy1MrIoga4oxYllRTe+Gj9C0JTK4nVMBIBB6RBE+TBTEFNK1O6Ylo2Y9gvNjS7QitI2A== 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=0vbBdALk7Dt7D/DXgkbkRMc+ZTf7bDhD5YGcNlMAt8g=; b=FrFOvG3IlLOLrFJ604DyeeYF2Eyav7ldjn4ngmqrYLDvsQvEVePcCnpDhZlc8/j/PZNI5uROqv/gu8t732aSuuMV3gMhLDbgJ4u6CjRSGV4XSvY7GbBJQ/FDyvPqRhbjFhWgUrhyxUVswwYflI8rXQYb8ESWPEOBT8aY6Xa/yic= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.22; Fri, 12 Jul 2024 08:26:20 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%4]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 08:26:20 +0000 From: "Peng Fan (OSS)" Date: Fri, 12 Jul 2024 16:34:59 +0800 Subject: [PATCH 6/6] remoteproc: imx_rproc: handle system off for i.MX7ULP Message-Id: <20240712-imx_rproc-v1-6-7bcf6732d328@nxp.com> References: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> In-Reply-To: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Richard Zhu Cc: linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan , Jacky Bai X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720773307; l=2938; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=C4WWZBa/4F0rqsRfT5vBgK7Yyzk7BZUYKwHPL5XAbGk=; b=cQIZuDUpZH6glPAucwaT2CORGE0InjVZao9iJDbVvi6iccKXWOHj+AZE2P0KsyaaXhN2jtrGy goF16jcCn85AYFQpcg90PX3JnMQePrM2Sk5g9ODJZPU+H2RgotQaAUY X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::12) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: c1bd6c9b-f0a5-4a74-f70d-08dca24c4ee4 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Z8I/v7AaafvkqDIbK4UH1iOnTfYLtSd?= =?utf-8?q?25sKQLp2RQxMlr6asmXW41OOfxRZzM3HG9LFLtB8PLTZE8QiDIsIoMJkNHkW1bvWF?= =?utf-8?q?rZNsmPU/xO/kBRAQjnbK5rJoR/Yi/XbGARtDTSUE9+CzxixI2QaERoz80vMqYecZ8?= =?utf-8?q?MUkWoRAdjam4gXl5Ny2GU22z08SfrfRa+STSy1s4fC3v6LeoV5T+MIDH/lAO6ZTuY?= =?utf-8?q?qun4j9qW7Kq612UaHehxp92JDvL/+4GRYA6zRMvGPhtbjhqKbtMoTGgKQm+52w4/y?= =?utf-8?q?0UDoHh5Tf+jzb9lDy9zDavVxNGvq0NrjZbF+FSEazhVcGwToEhiHuDd2idAqP2krc?= =?utf-8?q?Mo3ZfNZVmcWO7uqi0z7K4OIAo9mLpBd/gcApxVsazMiU3QqAZ5L0fz6sN5UCjhvKI?= =?utf-8?q?uA9S9tn2iSdO8D7CuCy+Wt7RdG/GgMl1kWJEX0Njfnyg21oCFBxuv57+r/J7guz7j?= =?utf-8?q?qe0Ty/hOoDJIuq5uOIwk2D6+viRqD6O0XDlrY54O9/5PxbQ4W9Xe4tJ8/r/5R7iCT?= =?utf-8?q?nTEnreZkFQF/fzVgLW6aUYm/LmSSKCtKPqDwzpcWxadFv7Y8oYnpmS3IvMTbDXQpR?= =?utf-8?q?LxDQLDeenpBzyX8J69ofC7Bb2GTBV3mCoMBoEyvmbCq7Mu9SYocVd/dInrtdmMOyw?= =?utf-8?q?lxhvM48q8wD5U13bLZWFzyxzfjEKyAE0SuK+md50h7hyP7CmsDKT/RyvgYTkNS+/z?= =?utf-8?q?+MJzp1ZUNgaHvS1Qe/TZ97GLJJF90flZZP/mJ1HjouABVYTAHnSmIrjfi68w88rcw?= =?utf-8?q?0KzTY8lm/ikcAItPbVdMYaUZxJ7yNCelfBK824Q/E9FNMe84oHN9MdkSByhhSnYoY?= =?utf-8?q?lDPuETAGa4vHWiesPMfQtAJpbOmkob0flTFRkuSHzfueA/HClLl2UfpM0HX6gsUxq?= =?utf-8?q?2gaxmKBt31DO+gen4AX+Arkcj7erwjAjOBZz8D6We82UWJ84WasY09HeXpcaiWjGT?= =?utf-8?q?4Lilse4g3XcWOiuIfycYbJ8np+mlMs97bgZkqN8R8JWsPTlO8jFWxOs/4aukLzaIt?= =?utf-8?q?zFl6dNtMMFf65BexAc90Z3PHmbucliKL7uOmLdoyBpMaUWwBvRI2/IJ43f8DsnAD1?= =?utf-8?q?nRfo+zBspLRLAMdAslsOp8We5zyOy+OaXVQ0ulYwNKjH5hzR4b12jr8myl3Yzfvgs?= =?utf-8?q?810VlYvZltMScdig9dMqPe88Ias+8rRZBLiuWyMYpYT8Ve/FiT+ftztnzaB6GhYqt?= =?utf-8?q?7W+XfJxYEeF4WsZVE7V9nIHx+6xN2M3wNKzkGgQ+0ExFfGFT4yFBsA2RGFs8V/1tC?= =?utf-8?q?ClDS/wwwPoGyvRAQhK9c+jQdkM5/Bt28m0jppDtV5V2eexa0nnlGiOqAaz8GJT5Bz?= =?utf-8?q?YzRTG1wo+hS9nUFpe/tO4J+yLsLKIb606A=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Ea+cwz58JLr5raKsWw/c/inFjtDS?= =?utf-8?q?vPwL1Hyavf2VwMsPm5IPmBCxKPVKgO/yds0vXpJNSWOb3IDVirOVR7SGbqoqDeCv0?= =?utf-8?q?t+sIWqoESc8FnzaLilrztto5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U5vtrTiwFbSnHBowOjncPDyAp7xPb3ul2HCM/Y1M/Zr55JLONX1wF7B?= =?utf-8?q?hQXF38q8WREMPNvyh3R66ueLwAzZwgno7wv0xCVHTRJJXu55wWNLvRTdMd7vZ1ftX?= =?utf-8?q?s4fJHrR11rDi7YEkrkp2GOSz6ijgh7Rflbe5IRpu3sMSCYRB4sPlK6M9E1aYHMzyt?= =?utf-8?q?A2Z602TuUYroos8EI0TSOCw818WjIlRxePw6kiSm2gMUAxS0zr8sYnebTPnTekuIA?= =?utf-8?q?96lBgKAc4YOPAapQXTtQJBlDDsMl6iVANl5EzlKnHqv0JCyjO/ODgXdXOyyKGlNhx?= =?utf-8?q?/zoCMHvZDCh0bGqET24TQza8RSOYWAcS4NdXo9QsBQDCoRHO4JmOyZ2ABsunWD492?= =?utf-8?q?kTRjrn7HX622ivpEhTCIeSzD/dEQ3ml1+EUbRtsik08+9wrsYkIAn8bUxWX1b0jAz?= =?utf-8?q?xRkyUvrFKhd4plW5mq3qIm8KzroLU1Kga49wHy3DpMeHT4VabtOha5PoDHC+yfu/b?= =?utf-8?q?oBhE52NdIxiXKrwjWzQHqIOzyJM7IG2KKtbhWFyaUATUtcDnxdy44xOABqByTV/Ob?= =?utf-8?q?XuEgFjZl3MAv?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1bd6c9b-f0a5-4a74-f70d-08dca24c4ee4 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 08:26:20.5739 (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: zvFfVaqOR60f7a9+F5EXeJRwrwDB3dpeR3ht0pc+oP3CcrPLR3wsdWynkFqKoysatRosw3+a/YZKzyhJdgAL6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_012623_529534_052F06DE X-CRM114-Status: GOOD ( 16.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan The i.MX7ULP Cortex-A7 is under control of Cortex-M4. The i.MX7ULP Linux poweroff and restart rely on rpmsg driver to send a message to Cortex-M4 firmware. Then Cortex-A7 could poweroff or restart by Cortex-M4 to configure the i.MX7ULP power controller properly. However the reboot and restart kernel common code use atomic notifier, so with blocking tx mailbox will trigger kernel dump, because of blocking mailbox will use wait_for_completion_timeout. In such case, linux no need to wait for completion. Current patch is to use non-blocking tx mailbox channel when system is going to poweroff or restart. Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 01cf1dfb2e87..e1abf110abc9 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -114,6 +115,7 @@ struct imx_rproc { u32 entry; /* cpu start address */ u32 core_index; struct dev_pm_domain_list *pd_list; + struct sys_off_data data; }; static const struct imx_rproc_att imx_rproc_att_imx93[] = { @@ -1050,6 +1052,22 @@ static int imx_rproc_clk_enable(struct imx_rproc *priv) return 0; } +static int imx_rproc_sys_off_handler(struct sys_off_data *data) +{ + struct rproc *rproc = data->cb_data; + int ret; + + imx_rproc_free_mbox(rproc); + + ret = imx_rproc_xtr_mbox_init(rproc, false); + if (ret) { + dev_err(&rproc->dev, "Failed to request non-blocking mbox\n"); + return NOTIFY_BAD; + } + + return NOTIFY_DONE; +} + static int imx_rproc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -1104,6 +1122,24 @@ static int imx_rproc_probe(struct platform_device *pdev) if (rproc->state != RPROC_DETACHED) rproc->auto_boot = of_property_read_bool(np, "fsl,auto-boot"); + if (of_device_is_compatible(dev->of_node, "fsl,imx7ulp-cm4")) { + ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_POWER_OFF_PREPARE, + SYS_OFF_PRIO_DEFAULT, + imx_rproc_sys_off_handler, rproc); + if (ret) { + dev_err(dev, "register power off handler failure\n"); + goto err_put_clk; + } + + ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_RESTART_PREPARE, + SYS_OFF_PRIO_DEFAULT, + imx_rproc_sys_off_handler, rproc); + if (ret) { + dev_err(dev, "register restart handler failure\n"); + goto err_put_clk; + } + } + ret = rproc_add(rproc); if (ret) { dev_err(dev, "rproc_add failed\n");