From patchwork Fri Jul 24 08:08:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682741 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6BEAF913 for ; Fri, 24 Jul 2020 08:55:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 441F62070B for ; Fri, 24 Jul 2020 08:55:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YJkP0Dv9"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="mSPpMZFt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 441F62070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zHZq/qnF1BypCvxy26nSW9B8Xgd0ux+zSvwxDSqR0NE=; b=YJkP0Dv9sxy7VACBIs95exrhI 2AK/Phuo9ZHbAnrVzIByiMMzimLtBi5GnTUWVfClloie69GDtK4eBiaGVMsUXcFL7sHlZLWuzLcII XPLj+w4L+luEsCE/e86tPP4uKnEYfz7j2osTSGNqYCmQ2c/79CXVqfO0i4yr8Bz7r9mQio5QCPjhU 6hN6Q0m3UzyZ1q6hxSMOWoWc8j5w2h2BwVKPtNvq/gC1/dpiuIo+B/zJQK5A0n/TVfky6Z7lYl9Pj Y2lmK64JHoDlfyjwUD/qAGdEG4Pv3OBnC3BHB5l27HiIgwJFB2FM0x86e4AYY/MSWuOhTRjWTxsMZ Wm7VZ9SnQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysUv-0007qM-RW; Fri, 24 Jul 2020 07:52:06 +0000 Received: from mail-eopbgr00071.outbound.protection.outlook.com ([40.107.0.71] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysMh-0002wY-HK for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:43:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oZdtDTEuZ4AKsaD1LSGpV0kvkzqu2o7L44Ckqk3sA9jsBmwdR7xio7cREeI6LWDXql59j9YZwqpzqt+6uo8qvK9PnAnsO/THo+UKIqmZQvSDUEH7DFAPC07hGArmwotcGy2rcD/cH2xzr8lm8ea8LGKNl/CglTEp+VXWnKed39kjlqjKRCPXgiOQt0F1rj8QiELBsOwd6IoJXJUR3QKgcc5KWwxJBKxZuu7dDSRp9GmdgoGVRrx0STpEtUU5uegQsDfSKsi2x/1W8Us8wTZ8PvoElJzeAF7UqgWypTvFyghhHRaWl7xnNrhT/WaBMoyX21wUBXwzdJ09pvMpM+MJUQ== 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=LWr0ss9DEwgiTYRm0sghYVPuZPbmFJHyVAX3E5aY34c=; b=lEAzjuDacg61a4kSKnxSSbIABY4DcYeAxSXGLzUXbUcIjKZHcEmtzBN1XtxSNt//qtLA5yoEhKCjlWFNLqx7JW+ElphGCHCEQ2Qhix9gS2dcymRpMWQ1epE865wD5BzUEXj1RSkL0RtnPfE6HXPBbqnrZkMBvE2kw8EIWpTCb1rupAkLBSLtbSLZZ8z4jlnjPQnyKJiAZHZpvHLPI/53xQKzJKS7s0K4cWRHcCNf4Hle58TjAC+Libt5GBiInhORwated+HwvsvooTqEm+DCYzeDED3q4bGweAwe3FlC8ZuWWRhemKF7qIaIvDJgJYBm0o9lRU022RzRzswEVzlgVA== 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=LWr0ss9DEwgiTYRm0sghYVPuZPbmFJHyVAX3E5aY34c=; b=mSPpMZFtVmwdlwRJ6x0r5CXkrDpuZHO8sJ3FETqivxM6/se+V0zyAP3A1UubRHx0mxrEfYuFBGmBysETgJZwpG2MQX94GxdGJkBll8DETjPIGVmi1t+V5Vj6gT9RdwCf76YMCIh+H0ostD8HPb18qaRR1QqkpMSShFlBCtIxgW0= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6857.eurprd04.prod.outlook.com (2603:10a6:10:114::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.24; Fri, 24 Jul 2020 07:43:32 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:43:32 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 01/10] dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M Date: Fri, 24 Jul 2020 16:08:04 +0800 Message-Id: <20200724080813.24884-2-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:43:28 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b1f0475d-8746-4dde-2d87-08d82fa5436f X-MS-TrafficTypeDiagnostic: DB8PR04MB6857: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CmF1xSMj1ByBMkordCDBahnPeFaq74L0QL/hJRByb6X0GyCD64EVc4GLGxBRojocHf42QRbvorRukR/5NGLZUai+TQq1q5OWixQenGfWVgcomfGhJjVbgc7Qh+37N+UB2EVqxikoV8VwOm/q866l/PMzwwHFi/iGDUQolyvwbFnJGAG3pjDnIQhHNvUf+j/0ruS1V9/mLLK83Q6A3QXiMoNqkKyODmoVp/oeziSJKI6yhNqkwtKJv+C+6mYZMwn07+BJk7ZsAZP545FKshOLuYV0DonFoC67xpYD1L6wSSXchLFevMgSyFcUM5FtLgdvzlT/bEm61bywAiF9j5fq9Q== 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; SFTY:; SFS:(4636009)(366004)(136003)(346002)(376002)(39860400002)(396003)(6512007)(478600001)(8676002)(2616005)(7416002)(316002)(44832011)(956004)(66946007)(66476007)(66556008)(1076003)(5660300002)(6506007)(186003)(26005)(8936002)(6666004)(2906002)(6486002)(16526019)(86362001)(4326008)(36756003)(83380400001)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 07+t0MmtcS3JZavbFXl5xwi5hiDIPfkPjF6YZ3FXJJljofYfcrKDQ//qHsmemXJ1J7GW9VdK0AsTwIGfwj8xz6ub2Rdj+kvXDZK5W+lT93zQB4pWupDmifpJ12rkTtbk5ght7gb3ewAXtKwPMtWlDddMrBxIQgSX4ZWNauwBnzJCTBjGqeRySaw1zQp8zHvYh0cXKAMzN0n75WBy4VeWrI70URZXNt0nurNNHb50Ze0lF2X2et8P+lAbUEBSKjl0cJSUMpQXvUTSCSuIxw9uxLYoyhOgGwKRAnh3WayDmAjZLbCXVM4tDPcgsIcs7LjNiLIwJycTykFJ0zLFTSGnjAyGAMp/QAvyUKDghgRI0Fpp26nJdhB9dn8GBNZwIIc8SwYC3eG7YljDV72yMjeEY4hDPYyEtB1e8k+1uTVC2mkjv4n5sOI432EGV19kLW7wYTiJ6FL0modi7SNFhT15HOXM1bBKNy0mqqjmg7nLjpCJfxCwIEVknY1vdNLEBYiz X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1f0475d-8746-4dde-2d87-08d82fa5436f X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:43:32.4242 (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: C+ybt5fd2x61bQ/J9CkQnj2u8sli2xPKTycjLZImZCbI459uakQ0OsA699ZX06IfXZ/+lyAo4S8MZENu17o/Bw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6857 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034335_636712_269AA06B X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.0.71 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.0.71 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add i.MX8MQ/M compatible string Signed-off-by: Peng Fan --- Documentation/devicetree/bindings/remoteproc/imx-rproc.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt b/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt index fbcefd965dc4..46f7623512db 100644 --- a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt +++ b/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt @@ -8,6 +8,8 @@ Required properties: - compatible Should be one of: "fsl,imx7d-cm4" "fsl,imx6sx-cm4" + "fsl,imx8mq-cm4" + "fsl,imx8mm-cm4" - clocks Clock for co-processor (See: ../clock/clock-bindings.txt) - syscon Phandle to syscon block which provide access to System Reset Controller @@ -15,6 +17,7 @@ Required properties: Optional properties: - memory-region list of phandels to the reserved memory regions. (See: ../reserved-memory/reserved-memory.txt) +- rsc-da address of resource table Example: m4_reserved_sysmem1: cm4@80000000 { From patchwork Fri Jul 24 08:08:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682715 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C17B313A4 for ; Fri, 24 Jul 2020 08:50:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9830B206C1 for ; Fri, 24 Jul 2020 08:50:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iKbSi41R"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="PyUlTqns" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9830B206C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zyji6FPfUc9kb0IK/OGFl1Y2cxQ/BtpPLd+IY7OGaeg=; b=iKbSi41RWiQHhXEwTrUCnUk8U DVUY4ty7DcrNXeyOPNfWg436Ya7oEmz6l+lqcjzLgPDU7wg0zTiI1T6HNA7guoLzCFGFN4/melSUx FRnM4ay5xBw5xc5sXhTd5wz2oQdp4XCaO18bylm5kom1riv/u2S+lrG6faSC+elQlYUTsN+mDCaYy tNzDSqwiX41ViumYKgBITRq4Ca7k5oLjJZMiJbYB4QI+8Rcq5qoHsPsykmZ48YCrtch1XrREdyLTA dXvg4DCpsjfOS/JxTWYlpFFPRwvNZxSwHN/OsqQBiYbBSCtRKXRO5qvC/uGWY9wD23bPbNUn1u9W7 TNKVKx8Og==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysVI-000847-Fs; Fri, 24 Jul 2020 07:52:28 +0000 Received: from mail-eopbgr00078.outbound.protection.outlook.com ([40.107.0.78] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysMl-00030w-7o for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:43:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gFzRI7KLnNxu3bBPEkLyGrMhCnCqq94h94caPu5V0mzER4Psaovd4EsXQ+eqvFwUXmUU/rFs2p40fBLyZEEEJLub44CE/iTZBebACle9arvBI3VNiHMrWcHcFY0kJuauZSB4+JSV8MoKwS4pcn0JiKk2lawG2gd9A2Kn2la4XtC820i1sAofPuF3X/bk5HYWZyc2ehJUWQ6+zbhrrMjhGLuZNtjYeO40z++u+zrZ2oKC8Bf6ELm2fhzC7oBZ8eZ4RD2ysn2kGlKtrwAM6MfpLALzsMFvTcTx/cQJvIoupj1IjlRWcegXAoPDQoe6oa4khdB9KZ0KLJj3g2LKTJOybg== 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=0fidPlfCdQaDys0o4S57MP6gfjwdrJb1sVgbFpSf4cc=; b=g9Oqh1uIE1ZdOlSIw90TmbkwdQTgrtoWphDVacvG5O0YI6rBWsJ/ArJOx+d894tW+vAhwv/m/MtDurHqvPFqUNuPzG0wf0ZEu6JE8BFWbC1wJiUR5k5rdwGLcEv9MlJ/F6/DQQe3Ay+E6c5i4vXPqgpjz5Pg0sZghU1T2TZ/nkKiogntPvq2vbnhW6jo7YUSEd/EoD9fYunTa0zV0DZLx6RmzWsjKmZjeVQJ6+vGZ4p03drwNK9GqTtITCacmG60G4ZsBz93pD3KzZxJghebw5IPjc/zhuagx3NXEbwYRmALY0xU8oXdFN1TfEBRwwMYxTpUTU16LFk+qY/i2/p9ZQ== 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=0fidPlfCdQaDys0o4S57MP6gfjwdrJb1sVgbFpSf4cc=; b=PyUlTqnsj4Ao4uCz6jJSXi/wRVOg0EmIugfVVh/sQvhm34TPtLKzCncy3jbJpNe0yPRRI28JWfILD807IojfHTEcK2dgwGZbi94djo4jfJkhM6d0fDpUbm8vmzpkC6qK41SwjQbR5DDBpZv5yYArNcovaoznZOKh/g5a4IsQXiA= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6857.eurprd04.prod.outlook.com (2603:10a6:10:114::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.24; Fri, 24 Jul 2020 07:43:37 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:43:37 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 02/10] remoteproc: imx_rproc: correct err message Date: Fri, 24 Jul 2020 16:08:05 +0800 Message-Id: <20200724080813.24884-3-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:43:32 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5ed607c8-c160-4f43-018f-08d82fa54623 X-MS-TrafficTypeDiagnostic: DB8PR04MB6857: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:935; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RWV0SW0044ceK/zO9595IBP72WEyEbhRiifey4p/pCTdJlXZjR0Lpp/Nf0anwKS/nCZCai98gBpWJU2DCBPcD8JcsKHljf0W/m945SPBET4QAS073JI+CUnK4jhkolYP/jw+d/JXzTKMjnCcq7hcK1r8x5Kn7CBbGcfHQ8ESfg0l03IK0FPdL5trU6vt858WsrFKvwcmqpQnecuQ4AD8YkXNNshL8ezeoUEPwZeQ++oBoOyAWLx3q51XD02OIitof1C+I/gjP04vsm7g2lTZdY4gqupF3xngWRMlcNg44CpiQynGXhHu8iIgZiR/J/6nqsInvMtmVq0aYO6NzA6WnA== 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; SFTY:; SFS:(4636009)(366004)(136003)(346002)(376002)(39860400002)(396003)(6512007)(15650500001)(478600001)(8676002)(2616005)(7416002)(316002)(44832011)(956004)(66946007)(66476007)(66556008)(1076003)(5660300002)(4744005)(6506007)(186003)(26005)(8936002)(6666004)(2906002)(6486002)(16526019)(86362001)(4326008)(36756003)(83380400001)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: cUNKEbviQdwQ3dml1Zxbf/auaTDX5esR9prWLCvd9tDZLs/AqLalbMienG6eIf1lBHpCq82n2x7HQxIB4F7wWO+n7cAmLAwwNnLef/+DIUsKJ4Tg6cVNDhktgKGiaMhJleCJzkCTgF7gnIOw6rGd3z5H+JWw9KbNeemvGrVEHaBgnQ5I+x0pl/RYhFcZw5+MUkNg1Qeclwsk29RmZ4QxTsPDRyiLyKL/Q5oz32H41T+nmYio7+Kw1OvcuqaTHW4+V8kLvA5PK4lrzPtMfWqxWYQRtdYyJHp5cfUxF4Oh6e3xrd76jSOIJmNDL0my1aZdzW+2iJurTl8EWSLnxIS1q0G0Zno6F3B8Z1YB9bXyMRU3zIOZ1H+w1f8Ug0saoN+l7ZCL4z8wWmo7W8wztfhcSysHv36jnsMw690cjU54FbivoqmQWO45Rj5hBD+27Lamdr1J7YQNOe0rD/qpe94kpNvp4CiXeLb8h/POUo5u/GPOwMR3gbnBe/sHmXD+Go37 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ed607c8-c160-4f43-018f-08d82fa54623 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:43:36.9791 (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: 8UB6dBx5/oTk6nhJtfNiqnrnyACOOL36WoSCrlGWQxZxKytPpLMqThZnngeppM2OdMJOQ0c76odRWpBvFs3opg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6857 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034339_374377_7895F6E9 X-CRM114-Status: GOOD ( 10.67 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.0.78 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.0.78 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It is using devm_ioremap, so not devm_ioremap_resource. Correct the error message and print out sa/size. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- 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 8957ed271d20..3b3904ebac75 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -268,7 +268,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, att->sa, att->size); if (!priv->mem[b].cpu_addr) { - dev_err(dev, "devm_ioremap_resource failed\n"); + dev_err(dev, "devm_ioremap sa:0x%x size:0x%x failed\n", att->sa, att->size); return -ENOMEM; } priv->mem[b].sys_addr = att->sa; From patchwork Fri Jul 24 08:08:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682829 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66606618 for ; Fri, 24 Jul 2020 10:13:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E4F9206F0 for ; Fri, 24 Jul 2020 10:13:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OjKMyuIR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="ZCQPE6YV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E4F9206F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sF/3ftDGekR2y8KrlfwlnRdNPDAQUAab+wew1BYASFA=; b=OjKMyuIR5lioAu88q3mnMVVnY 4ZNLgL0JzE/4m6uC1qYpw5hug874QlUO+gbzqisFZKYv3vQWUvtDOd034cLpH3mGDkzCH5bbzJVt/ gk9pZNblpYWl4QJUrcvqYOg7hTMBl+98S33pzAR+nnKl//yw4oSjaSbYu69Y411f6aghXs+1iyefk L8p90UaStFmgA1aEdEyodB+NFB7K8kG6FJYYtoOIpXCBoTe1tmtPqw7UVJytkRBsTm6jVwrnYVnz6 iBY15havdGfYhXoxeOOLzLoXii9+9T5hIPyEKklxQz103ycrMz1QR9KG2lFwVFCvcXv4FXQjsRXF6 zaYf5D5NQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysVl-0008Lg-9t; Fri, 24 Jul 2020 07:52:57 +0000 Received: from mail-eopbgr80059.outbound.protection.outlook.com ([40.107.8.59] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysMq-00033X-1M for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:43:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QmpJxX7COcZNG+pTWyHWicFmSFQ7G1IOgjFqNvlCz5reFWkMev77J1flEvk8KADVXQArLNTuZQvk8HFgzLZKGm342fr8j4bHbQnf4f7YrZsj+OdtHb2R0lAoAhWyInS9NZ4pPgg6utpHDGRqEDkyDX6rkm1aAbcvBENNsOfuTrhDqhy/8qPYtTZjvu04c3XU15MdqtXO4aIWugutESX6Bb0SKwQZg4nO9dBzaOsrZIqx2J7qPSGUYCmFIcEdvMbQ3VHKq2iTnxkOR9PTJxCNhrma30Zmsp+dghL5PNF9VHCY9NndTN/coV8YKywc889Hne+arsiPby7Z0tAIjNMs1w== 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=YdNMZtH7GA3m7WuCVTf+3ch988T+aebmrLLYbcmLdns=; b=m6cFjMkIuRV2S6uNFLFPwywloiO9xbpcp+tG8JOg7W4guJFbwCqU+JXmEgPee6XkiUx/kE3VlIMrSKDxL2Nh7yvHUZtzXJoOSic8Atm8T/CtyqNLYAGHo/2o+1fXPb7UkbSlwUaqEELdIEfhiwdKuY03pN0+CzXXJW6RGD7E0CQaIhqNbusQ3CTuoU2HiQQSACr+Il2rRM3Z4W/FPP9AZettZAdmhNEogj0jmmlykzsG7rOj/jblCLWhK3cNVNLEMG03f/w2WiqYkXUzsoUlDRbMcDx1oQGstLMGaOf2HjXGxqQ+ICGuGcPNjv35MP4fRZ7sMcEWG1/adYNr/BHYMg== 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=YdNMZtH7GA3m7WuCVTf+3ch988T+aebmrLLYbcmLdns=; b=ZCQPE6YVO+2LAHqNOBvys0Jct47cKY7mATMak/BJOdGFe292BC18mbJrIUdD6+sI5FuSIIC1o4u7HjivxCAvND7J5p5VI+DW9yEH9DYGw/FwDnn/SgLzx+N9PCqG9emPvOY40X/OXCMqfz/K+ygdgwa5RB5qAPzWsstJiUSOW0Y= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6857.eurprd04.prod.outlook.com (2603:10a6:10:114::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.24; Fri, 24 Jul 2020 07:43:41 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:43:41 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 03/10] remoteproc: imx: use devm_ioremap Date: Fri, 24 Jul 2020 16:08:06 +0800 Message-Id: <20200724080813.24884-4-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:43:37 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7b7e7497-b0da-49f1-d59d-08d82fa548d6 X-MS-TrafficTypeDiagnostic: DB8PR04MB6857: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kfXCY6Dv9fvxQkS/INfX1qU93V0S2K7jh+4+Lie4j14bgeQjxA/fZVtwJp5MjttTRAjUOVwMl4WNRaKkGc1CqCbBt4G0Zu1Q1j9N96CyHl5Qho1c7S+MjG4A655fxSoE56LGjPmbMzLeGOSViBrrzf9bLj5CV0Ov2EU83fUft7X2IAAjndd+vhhd9Q/n7yI0jZcgS+VFAczEaKOb2cGKO6qwXbsaSGdDrugyszbiNvHEnRxuq7Z8gzdCNtQxzmBzW8ZEe3EMfXGtv4MF9GSQqya+YDkNpoZWRv89EvYxiw/T7BvN+qC2glorQBp83SRqf5rqUeED5qywJ5upW5KB4A== 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; SFTY:; SFS:(4636009)(366004)(136003)(346002)(376002)(39860400002)(396003)(6512007)(478600001)(8676002)(2616005)(7416002)(316002)(44832011)(956004)(66946007)(66476007)(66556008)(1076003)(5660300002)(6506007)(186003)(26005)(8936002)(6666004)(2906002)(6486002)(16526019)(86362001)(4326008)(36756003)(83380400001)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: t4Gcwf73+sJ2Z8iOUDOAzLcur+BN0kPRaX8Dnj1rfiubHBEmXVQLaaP+U5Lhyr5rHL5U9R3JAqSVilf6pSXaoiQHUbZKK4ZlQLDlR9fGEvwN0NRTS4VOomCN7OjGdTqXGcyrAgtwFV6gd+xuns1Lzb8V+I8k+WlRvUChHGtPRNDhF4AE+seBwIJnwVxHbDA4ZcXXO+TAUj5Jpf39an5wDd9dNlWl1NbB23SweJsIwOMh88gdW7Z6LCqeXP47wRfoLJh5uPJ/slrgR99ebsD1PoKXVwhwQ5cbW3tIJ0I1sES7GXfYyuWLEb3iIgiY1JqsbuEHmkMRSO+Kal7w3YMxwkDb+nAUCT5vKaWBYBDQhx5nJDHKr1LsIiDfRLEmklWyFWofAD3BcnCvhniA8lk8p/Pm10Ohpao28B72z86tio2ngUWuWnssGlZCfdKbxlA28YbD4W9zPwIcpxMdgq2juEg7srDH8kRxuUYTGVFFlLQuJTf4rqA/fXSwy/7oYdzp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b7e7497-b0da-49f1-d59d-08d82fa548d6 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:43:41.4721 (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: 885mKcTdaad3U9cuJr694p/8ncnTz+BN9YqDOtmErqgNYeFIy7UjFSdBE/CGCI+JrvxcVpQomV16ZxDbVRbx1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6857 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034344_173777_A525B021 X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.8.59 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.8.59 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org We might need to map an region multiple times, becaue the region might be shared between remote processors, such i.MX8QM with dual M4 cores. So use devm_ioremap, not devm_ioremap_resource. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan Reviewed-by: Oleksij Rempel --- drivers/remoteproc/imx_rproc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 3b3904ebac75..82594a800a1b 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -296,9 +296,10 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, if (b >= IMX7D_RPROC_MEM_MAX) break; - priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res); + /* Not use resource version, because we might share region*/ + priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, res.start, resource_size(&res)); if (IS_ERR(priv->mem[b].cpu_addr)) { - dev_err(dev, "devm_ioremap_resource failed\n"); + dev_err(dev, "devm_ioremap %pR failed\n", &res); err = PTR_ERR(priv->mem[b].cpu_addr); return err; } From patchwork Fri Jul 24 08:08:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682815 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C855A722 for ; Fri, 24 Jul 2020 09:47:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A00DB2070B for ; Fri, 24 Jul 2020 09:47:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="M7M4vDsp"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="KKzU9I0e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A00DB2070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GNCLaE3FuIflifbdSiuWQJExY2EuQhTm/rcgvHxy03U=; b=M7M4vDspe0XN9+tD9dmj+Q3c8 bNqgEE/S6jFC50IaHoWfjRjb+G/13bhidRjBz5mru3OWbiWdB5/dgCYwgvOvyomYMagPXfdi+TTSl qU2QH4UciTHh8kKEv+wVP1wWha/nE1OSuRmdxPLrbcWYRyLeEFLbz5urRjqyVvPdRVg3SRoflglC1 0Wh6gm2axWap7Rv/iZh8BZNuPGncG4tKlngB9HLcllHnO3VZBxVSXjkILrHmQgaW5ah9/d8Wr9yM9 fvJ8POVETd3XnQxwJTV2OL+yslsVDhl+OThyxC/14lwy0DAqq52NVl9Rk0+1v+w7ipEPmRemjPaBU GewgUbvJw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysW9-0008WQ-94; Fri, 24 Jul 2020 07:53:21 +0000 Received: from mail-eopbgr00072.outbound.protection.outlook.com ([40.107.0.72] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysMu-00035p-Aw for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:43:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C2tiadCDcgVysWcTaDmrb90WH6OU5fjAfkOfUsSzIlUvnNuM4qOdKqYa/y0Q7jOkewOkvBgg24HC2gkHMOxFNxSXrZL/cw0LeGARlTBDK1zmhJ+E63AMkdafb3zAXrzUYFd9/xz4Moo5G0bUM4R/ul82oWjj3EpZSshJAL9LCxKCe92JgwWSejvqZR6V+vRBEjKEiPl6IqSEZ3eAE+mDM4MhjWE+hHG2BKmaOArJey3BPLz+G7UOTJEnMCnYKRm0HcfRAKpkAK3s4ItyimsEpUgn3vrU61yL/2gTF6QMwfPyvlXrGzDinahwKS4GTMn46Q7Szkx6fadf/N19ZcqJ9A== 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=JA/x/bUv5KXcx+/ykfUIpTYgVe0nzp2lijRi348Hiqo=; b=ZYcTLQ5gdZhoO8BO8edDlv6qy4fyMldAINkXVHnENny0q8lldQTetq5Abn7N6Su3d012BUxoYCSP8eUbVNJX8822Ge0j9oGM45wV70WJ/Uh9P8S/d2SnLCELUwWHmW+H4qV7e0BA96ylvRnbbG5HbotIq24+Mw/+i4J+lDGBgBxrbZAfh0GTCykwXwcr04aPCZ9lpcVciJNiYt92+ev8rNP68pkTQ4DsCVtgjqGPjF+eZDBuaWWMbUOUcpUBc3GwkxqIuE/ku/A4DOa6qlUOIvwaMrRIiGmOro6dcNSSBJSu6tIBKJd08a40KHQC8rN2gO/ls80jt26xJinkzAWsZg== 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=JA/x/bUv5KXcx+/ykfUIpTYgVe0nzp2lijRi348Hiqo=; b=KKzU9I0eQ3gwdHqdutFyOrCJX/x9YX/B3oQmbJEIXuPEsWvWPvTts9TeQO8xrZe7PMqJLjckSVVmcHVbKNmIH8MbqmPB+70ls0vGEtKsjUEf1JcmT47gbddS9frCpmPjOmVnPFtfnRBMKBfDGHoAp2fq+lht6CbQoNIHvPdyDIc= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6857.eurprd04.prod.outlook.com (2603:10a6:10:114::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.24; Fri, 24 Jul 2020 07:43:46 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:43:46 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 04/10] remoteproc: imx_rproc: make syscon optional Date: Fri, 24 Jul 2020 16:08:07 +0800 Message-Id: <20200724080813.24884-5-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:43:41 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 423b0dc2-b7e3-4c02-c362-08d82fa54b90 X-MS-TrafficTypeDiagnostic: DB8PR04MB6857: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:317; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p9/7aDh06IcTShIovbPtF5fy73v1zrc2f5WcjoMSUkjnp1OViCrJ+qZJnjZhLhqGULmld/qkYpxv/TsIbqKTv32UcHzFGCINVjqf9OZCxuJXhAUlnl8AYsjUoxq+5vwGjjD8w7FI+1qzRDvID60KxQJfrla6tvhx5hQ7oC65v3ZHhnjelZhawaaaO02aqomdDkDza/mjPQMLsBWJMkCJkJ9QtgB6iu9CcjchC2MY87gkwoCvxXxn9AX4Oh9ti5iNMvViWcjiUuNWZDjhINqXRvninMuOGr/TQtfUsTi5fbkJU4JaIXq6rWsmNc6ROzbJi6Z9hJPPijKPePSjtVsoOw== 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; SFTY:; SFS:(4636009)(366004)(136003)(346002)(376002)(39860400002)(396003)(6512007)(478600001)(8676002)(2616005)(7416002)(316002)(44832011)(956004)(66946007)(66476007)(66556008)(1076003)(5660300002)(6506007)(186003)(26005)(8936002)(6666004)(2906002)(6486002)(16526019)(86362001)(4326008)(36756003)(83380400001)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: WxKaPsudXHKHSa8zFDz5ur7KTZdeDmaFT8sXnjSRhr1YY2lLC+kaZCUy/J09sRbeRjZ+Ihi6BJ6ZbE7+v9fa1jeVPD/Ac07qGAe9DFMnbYIVj5SGLfjLsxx9c2sJmEoc3UY1wHhCjaxURfJf9/Rzjq33HIBTNs/mtN0+Pi2aJuZTYkQt9NMqWftaRNqcM5CY8y0PDSnFrBKbFWHKI1BaUZPgqt1358rAvA/HER75IWOZ9V2t61bLzC80pW9Oi/fSG8/11646DpV2QRszmKSMsUz9nA0lZPwzQwNkW/iN3TxhXm+fQub4PzkYemUPYB1aapude/l67W1ODf7Ao5AawB4ii/k0ie/dst+M5X8LlWhVYAXdTBm6WBi+eGgxBbaz3fTCTCjG7zIELkzZsvqcUP9DVE3YIa+uu91ga4YF7rEQCKQNHE6cqG2raJtPrWGrUn8QSuuZsFW2IX5XEQbcYH0lGK4iksWYc+LSftlRrU+DTeJhNqM1t89JXDaaraPW X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 423b0dc2-b7e3-4c02-c362-08d82fa54b90 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:43:45.9311 (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: 4g0sKkM3czf98YlOxvhBKz9ZYeC7JW2eV3B6MnDavos8EMqzPV3A/cEbKmAAdmLfCoQTnyVJJBXt7yvXAcetFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6857 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034348_449377_6DE35AC3 X-CRM114-Status: GOOD ( 11.95 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.0.72 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.0.72 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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. 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, From patchwork Fri Jul 24 08:08:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682619 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E455C13B4 for ; Fri, 24 Jul 2020 07:57:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC5B02073E for ; Fri, 24 Jul 2020 07:57:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y5cvCjUq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="o0awVNa5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC5B02073E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=65Tbh839inwvznzr+hpujGOilbAeYJpXOk+OKmCuuzs=; b=Y5cvCjUqXcd7Eyyb731LO4Ex2 Q+DHWulBsgyeIECOGDynvK95GttNAYIv3bHCEl5zPsrZ4KhNGUQNqo696odtsj2f065L13eY/FC/F tEa7TIu3hTztL/sFOAYcw4BgmWBV2t/l9IXs5HY0fbKrpWi07Fy2q0/nEnAS0aqtAyBCMHOPhHR6/ 3tUM604+rZ57Hl5ROITXmX2Z388XG3of2wsv6rdLP6bc65iSVZAyJ6rezK0N/V7kX85AvUkrLCmBb jerJPtAGxEV5WWFB/LI6RhlsSQjnlPCyIXbuS+vy75NWe+KnGjkWRkdF7FmZXhhvWLDu0KT0cPHX6 q4+W65whg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysXv-0000Fp-Pd; Fri, 24 Jul 2020 07:55:11 +0000 Received: from mail-eopbgr70047.outbound.protection.outlook.com ([40.107.7.47] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysN0-00038j-HM for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:43:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qct0S3GJG6MZiot8qDwOKQRlMDN2X8+Re8FsJreACPW77xgb7a9Kax55fvPaHuF4c4IJ5EfuSgn1wPZ9ONAwxeOVRbAV8L7iCVZKAx93PlzHzqD6zZEAiqY8oarYGIFDwF0v1tHa92PG0g5Agwo7+ha8YsTqadAScgNcn//CrT6rkIronWoOoQcYIIJ/xXVPGTZSh6/vXU7o00jLJ/QHdd9gaGKId4QXRt5K5PlUI5dxHdh6pKqtxByGPhBnxWlgb9mUf7QQAsIWSar4vr64vmv8bQTUJd+SA15FEwFZcm3pMvef88hUi1F+L4ZbiHQO0Wwioiph4S5m6DRDCnt6FA== 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=UhuUE7ee1k1h3yS9lk8HoshtF1lfSheIfdm5bhrs3BA=; b=hJ9F4qO0Y8ZvwKOHI+o58Y0PUz2JpQrlxupP0W0Vu4oaKhf7buOVEvquZBFbivPRbAv3gn14wEhjDtrUWbuIcyNbXggkBftfNNdWp2MAazIXE0DNbXltMKRYGoJ5NkurdneFKQEtYAZNsbreCmK0HHq721wjf40M6ibwXsZdLP/JKp1IlhMvUzy9ByBfOdiDerFc+ydx4MHKbXJoSXafROeQH4+RQTzs6tLYNd4744U0SKXJeChA28H0lrVlh+rj3QSFOldmKQjFL5HcK7hlFvj59UrmNmlHsVWGl870pkjW2eSKKsMfhk94YO0DsHjoe88luV7ctHccB90jL+lPYA== 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=UhuUE7ee1k1h3yS9lk8HoshtF1lfSheIfdm5bhrs3BA=; b=o0awVNa5CAtDIrLXr21g09y9uLrZnH6kLUYd8Q5AikCMsqW7qKnnunAhw9c3U5sLnHO5D3bO2hMfl4NAWOXXAjulNCWNF4J5cFmkTGkoQ1j3S4jrhC4nHyW91kUCJ1P0LPAqR+NPCRBCnHSWDqDvoY9DzyxU2VoDHRu3WK3Nq8U= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6858.eurprd04.prod.outlook.com (2603:10a6:10:113::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Fri, 24 Jul 2020 07:43:50 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:43:50 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 05/10] remoteproc: imx_rproc: make clk optional Date: Fri, 24 Jul 2020 16:08:08 +0800 Message-Id: <20200724080813.24884-6-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:43:46 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 69227ae4-e128-4523-1ee0-08d82fa54e2b X-MS-TrafficTypeDiagnostic: DB8PR04MB6858: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:632; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gx3o/Z9ptJH9ZZJXcPUIqNGvsZcl4mcpdDx+O5JQ2xhXLmK2JpIS8o9fpbrFLcYPVOsc00k8h+uQ6bq+NF6GTlG3apgzQf+k4+VwuEFJW0iiKUeIMuyRvjiYITeaLViun+v9ZRCs4Oqv8Wktwb8+0+nKm3bl5/pCPUwwDmIgCU5bPX8SAilzwBEfWEUU/5y4saSEaXzIZtFM6AtlOhwigrOHQNa2tQ7USa0tUxBT2pumaVRwU7Qs7amTMAvEhB4PUBii+RkdRCZhSvR+9P1dPIzHgpOFmY1zYdUM2p7o9kXaRpSoVKcxL5yMQOilvOvEc7Wa6CcvTI6ejNXhe76naQ== 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; SFTY:; SFS:(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(52116002)(36756003)(83380400001)(478600001)(1076003)(2906002)(6666004)(16526019)(186003)(26005)(6506007)(44832011)(956004)(2616005)(86362001)(6486002)(66946007)(316002)(8936002)(7416002)(6512007)(66476007)(66556008)(4326008)(8676002)(5660300002)(4744005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: mGUoIIONerSKVNR6TzwjYXhQ1cHC7L0471RTG3Mt83uiq/OxOW9k8aG4bBMZDlBWvjsV3wdevyntf9m3Hsh18EqY8oDiyCE4vb2OKv5DGooPDgz8HIvfXBqbsz00r37l9oKd/jd1mjAkdUeV6V/z3LwfJ29cRT4ZBueNpOF8ctcFerXJlRIg4J6KtpucDrBgVDCesSOpzlH+3uSeOB8QuoNcMeNlc05V+OEUuDYvzph41tN9sYsbzKdgtY076DXb5i/mzODlVNA+ex+/lV7yB3kg2Ip1r4HOG2CaLq0hA9I7xYOFQdMZd/xWHYuTIaLLeLdPT+b78BGN2hwYelb9sJir5dIFdKBRs2wAIqxBSA/FU41/IQuvIZiFt03Dqq3nX2c71mr0vmqsHFLarzz4hXoofXTqpDPgqvRe/QMUjgKKKIpHe/IC0J4b4M/YMcA0KX4sryIwWmpsUo7UoCfp6+syTrp0lgFtXCxt+1DNjeIEmSTmqVgAnkb1fXB274oN X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69227ae4-e128-4523-1ee0-08d82fa54e2b X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:43:50.4621 (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: eQgTwVvXQin7F2MExJ4LBtUPuqXN1vacCUX8B609N4vsYb/zfoxvgdPk7GOI7tp+TPALHutUkbN7zXWFhl8+Tw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6858 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034354_627177_CB808B50 X-CRM114-Status: GOOD ( 11.42 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.7.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.7.47 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org To i.MX7ULP Dual Boot, M4 is the master to control everything, so it not need clk from A7. Reviewed-by: Richard Zhu 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 4fad5c0b1c05..aee790efbf7b 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -362,7 +362,7 @@ static int imx_rproc_probe(struct platform_device *pdev) goto err_put_rproc; } - priv->clk = devm_clk_get(dev, NULL); + priv->clk = devm_clk_get_optional(dev, NULL); if (IS_ERR(priv->clk)) { dev_err(dev, "Failed to get clock\n"); ret = PTR_ERR(priv->clk); From patchwork Fri Jul 24 08:08:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682617 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F63F1392 for ; Fri, 24 Jul 2020 07:57:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 572E2206EB for ; Fri, 24 Jul 2020 07:57:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YnoVG97A"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="kxuG2qKC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 572E2206EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7qyZyC5bWGYx8sfF43Q3q+B62qYt7+3H6jctavoJp08=; b=YnoVG97ADIoa2dnB+7lr4LP6t tpmFH2rjS2NpLCeoAkq/sO58/ojEXt0jXUkYV+vsBrfwnfydrqgLZxbRT1sFeSSkpQI987Z3eA0Ly BBpuzHvO7N79qAKY24P7+KpeG5KUYX7UVjOHrRopGL/TJJ4m3mDA92bADbrkA4p0M9dwdPc8Jsiy7 7m8OV5s1z81JrY1/0d/hxuJqIxhCimQKapH+/K65z0tw1qFEjm86K5LPLpmC8H/qYNI6UgDCfeGWM trUwKS27ad7XQx6OzrKEZMJYnkB5+xe1n3WvZoA2lGe1SIxbXsZFmVD/abwL7tLefe1xd0OY9q0uQ 6JHy/dyyg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysXx-0000Km-UK; Fri, 24 Jul 2020 07:55:13 +0000 Received: from mail-eopbgr70047.outbound.protection.outlook.com ([40.107.7.47] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysN2-00038j-9A for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:43:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oBLMZdQNxOvzteK/H+gE6T4pg65KA+hYX1fNRFyhAuZMTVypZBnQaDLQbt+oz5CKxAK13EYeCqklrVgXXWSn/SpR+QMBVxGY25/g1DTM+o3u/ApQIqKGDq9vtUoJwT7qAv0Lmstcx0JEG9jDfRdfc0ECSzbBfVcilt6nGcEx2EErjpDgmP5bH9p2Abrpy5G0439lR5JSxZ4lzUlCbiAn4NsDgoLZC/iBnCpeM5Hk+6Jv2gE/dLvy9UkO7XNCB4lepuuHW78e1+JkMtXNvK1xddeRiliscCGA/jRMTjjurmuGqCIFFoBd8YcB7lq1/5ux2Y17cshUVQC43UFt1PpitA== 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=R9PER7tJVHanuJZgCm9ErNp4Xtl84HfXSUbuBJPMqvM=; b=XxL9D67GGpTahHdvHIEnv4Dg5CybLK2a/ghpKBh7NxCYmvVOivBmVoujEGcS5nxeUVvG5qXDuz8ego3+18yfg+VEJ1uCBNEwgUdBDH18rEyurXVdbZewYmzdY8mNBRrWeMUW11viQRP8bZz+IreMxPGfYvF/BB1wydUHAD2TOJ9U1nGuLm3Iwx6OCDDWHgbYj6pfCysRfYAxV2DirOQwBhwnJCnkvDHTiRppcJ1dw81xh2SZKc7/EVSHXQZKxYJwDHzMMrNCDBZvKgzPj9NbO2y/qrV5HoxQULxmTntr+r9TsUdWD6bclFwIMYvFshv/ZtZ2P+8BTLzKRnKIn0WewA== 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=R9PER7tJVHanuJZgCm9ErNp4Xtl84HfXSUbuBJPMqvM=; b=kxuG2qKCU2MZQb7aqj2eXtnu4WxfOd78e/vfEBsBbSeY7op/jYsm9vcwoPPClmDLbGyDvXVYzsc3Dhb+2E5kwYyURNJxRkLteHPPfL4Mwz5rNIPXI8te/5n1//XYiStp6oicRt6TKY1sJL4qgZk8+IHKrNYlxasCiDko9Ai5530= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6858.eurprd04.prod.outlook.com (2603:10a6:10:113::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Fri, 24 Jul 2020 07:43:55 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:43:55 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 06/10] remoteproc: imx_rproc: add load hook Date: Fri, 24 Jul 2020 16:08:09 +0800 Message-Id: <20200724080813.24884-7-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:43:50 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 09efdae1-9660-43d4-4047-08d82fa550f1 X-MS-TrafficTypeDiagnostic: DB8PR04MB6858: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2eVnLRBXqM2usHHpmO+CDx5E6eZTkI7D8jvuDEPe5MeDFaRSFichJM1HSELAr1Cap36j9LFEhB3M7roub49JGVZwtQwgsqCu3ztOG07fqNKhDwkXV5AjjQQfjDb/DLO1EUlILJdpdLeLPblbAKZ3EWCjZULmxm4nKLYCwUUJyI8wC42KCln/U2DIGeSMY6n46mTsjDTyWlIwZWCCSWEP3/6wmQdsPcHwv9pxc6VETlbXT+FfO9bfrIN1Hgqjn97meKW05r/AbW2bl/rLNA1wx7ghhAalTpvrEhErTwXlKaHaVTFkERTiAAUDIo0J6omo 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; SFTY:; SFS:(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(52116002)(36756003)(478600001)(1076003)(2906002)(6666004)(16526019)(186003)(26005)(6506007)(44832011)(956004)(2616005)(86362001)(6486002)(66946007)(316002)(8936002)(7416002)(6512007)(66476007)(66556008)(4326008)(8676002)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: bQisqhNZcBXoHnrt1CeG53YrUuBqxIxwOHfytyrQQgbJlbPZPQdhN2CIsU9Wt0nlM57bgSf9q2FgASRgWhGwBJEkBCidZAZ+SHL2DMN/gOMnUpZHuS4WVr/06Z8T1N/sKGpiaG8sX8k1e80JKQerPAOi0/wGuwnp1yKBDcLLuOpiRFLhNctBw5Qn/g4nfgYg2DbedgqHAADt0xWDKryMqyrnE/FCLnM/59wASZO0V8IE2cejU78VowLjLANfe8d36tikTCmB5x5Lm4oIxlE92nUCiwgSLBdoimAm/PEvWFZS0KNikJCcvGotecjidB1RJoPSLmQc6JbBmT3/H3EOA24keWbHyZDP7QxFnzZuMFjVEW2OV6b5xKHvzuIAMCgAIVf9WnxJ8REsdI71722aHy83rLeIb6KWRklMQlJDmqQOB91Y1ZLaK/xik3RNiNZ7JFFfRk3jiMkZAIFxHHtOLN/H51u/apdUNeyz+zEsZoc= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09efdae1-9660-43d4-4047-08d82fa550f1 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:43:54.9481 (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: 18pW4hA7DfvczYWr/Fc+gzcqS7dJ5xipyYvG50SpDGu5T02XsvSszVtoSpxXp7gO+F2SkmOXkVE1L91IsXJkqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6858 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034356_392644_537C3C6A X-CRM114-Status: GOOD ( 16.30 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.7.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.7.47 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org To i.MX8, we not able to see the correct data written into TCM when using ioremap_wc, so use ioremap. However common elf loader using memset. To arm64, "dc zva, dst" is used in memset. Per ARM DDI 0487A.j, chapter C5.3.8 DC ZVA, Data Cache Zero by VA, "If the memory region being zeroed is any type of Device memory, this instruction can give an alignment fault which is prioritized in the same way as other alignment faults that are determined by the memory type." On i.MX platforms, when elf is loaded to onchip TCM area, the region is ioremapped, so "dc zva, dst" will trigger abort. So add i.MX specific loader to address the TCM write issue. The change not impact i.MX6/7 function. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 76 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index aee790efbf7b..c23726091228 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -15,6 +16,9 @@ #include #include +#include "remoteproc_internal.h" +#include "remoteproc_elf_helpers.h" + #define IMX7D_SRC_SCR 0x0C #define IMX7D_ENABLE_M4 BIT(3) #define IMX7D_SW_M4P_RST BIT(2) @@ -247,10 +251,82 @@ static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) return va; } +static int imx_rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) +{ + struct device *dev = &rproc->dev; + const void *ehdr, *phdr; + int i, ret = 0; + u16 phnum; + const u8 *elf_data = fw->data; + u8 class = fw_elf_get_class(fw); + u32 elf_phdr_get_size = elf_size_of_phdr(class); + + ehdr = elf_data; + phnum = elf_hdr_get_e_phnum(class, ehdr); + phdr = elf_data + elf_hdr_get_e_phoff(class, ehdr); + + /* go through the available ELF segments */ + for (i = 0; i < phnum; i++, phdr += elf_phdr_get_size) { + u64 da = elf_phdr_get_p_paddr(class, phdr); + u64 memsz = elf_phdr_get_p_memsz(class, phdr); + u64 filesz = elf_phdr_get_p_filesz(class, phdr); + u64 offset = elf_phdr_get_p_offset(class, phdr); + u32 type = elf_phdr_get_p_type(class, phdr); + void *ptr; + + if (type != PT_LOAD) + continue; + + dev_dbg(dev, "phdr: type %d da 0x%llx memsz 0x%llx filesz 0x%llx\n", + type, da, memsz, filesz); + + if (filesz > memsz) { + dev_err(dev, "bad phdr filesz 0x%llx memsz 0x%llx\n", + filesz, memsz); + ret = -EINVAL; + break; + } + + if (offset + filesz > fw->size) { + dev_err(dev, "truncated fw: need 0x%llx avail 0x%zx\n", + offset + filesz, fw->size); + ret = -EINVAL; + break; + } + + if (!rproc_u64_fit_in_size_t(memsz)) { + dev_err(dev, "size (%llx) does not fit in size_t type\n", + memsz); + ret = -EOVERFLOW; + break; + } + + /* grab the kernel address for this device address */ + ptr = rproc_da_to_va(rproc, da, memsz); + if (!ptr) { + dev_err(dev, "bad phdr da 0x%llx mem 0x%llx\n", da, + memsz); + ret = -EINVAL; + break; + } + + /* put the segment where the remote processor expects it */ + if (filesz) + memcpy_toio(ptr, elf_data + offset, filesz); + } + + return ret; +} + static const struct rproc_ops imx_rproc_ops = { .start = imx_rproc_start, .stop = imx_rproc_stop, .da_to_va = imx_rproc_da_to_va, + .load = imx_rproc_elf_load_segments, + .parse_fw = rproc_elf_load_rsc_table, + .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table, + .sanity_check = rproc_elf_sanity_check, + .get_boot_addr = rproc_elf_get_boot_addr, }; static int imx_rproc_addr_init(struct imx_rproc *priv, From patchwork Fri Jul 24 08:08:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682615 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9A4913B4 for ; Fri, 24 Jul 2020 07:57:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C13D72073E for ; Fri, 24 Jul 2020 07:57:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gjIrOpbT"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="HkHfo/Ts" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C13D72073E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kXQUo/p1kb174P4Vnh3LHCclWmVzVaUGJwWl4ZiTJKw=; b=gjIrOpbTRka1+mUF2lwGfMcVD tUwWDnhiByeTVrFE28BVJjXhyez/9tmfVVEAhWmsC0bddJl8avK7q1Kh55AA5pqyiwSMFkp4iXLjO RejaEwaBETKjodOzEp+P5tntZsxmalUg9WilR1r1DFLsCdzDPQovM27gJktAwNSrl4pBsCTaMxvJp vkDXNkgqsRQZ2meC1PJZb/MvZhLh4cRGOnln/6/71MADs0zcOEYpbljhahIbtd6JNrzkm0GJ5iZ5M q3z9tOdoT6vOSL1pHU06GmC9F90a1rz6ijRtmN0W/YJVcWFpAT2ljhEgYuK5m4mnK2QdPtAoNr6q/ 342O/uf0Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysY2-0000LW-BN; Fri, 24 Jul 2020 07:55:18 +0000 Received: from mail-vi1eur05on2056.outbound.protection.outlook.com ([40.107.21.56] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysN8-0003D3-9E for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:44:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O/SV76Gjq4sasbhY+NDQXcRlRm9keyg+5wUqFPSLn+MkyTNSpAlFTGl+obIgBZun2Zes4maAZhgkkQRT9V/DEn8BsflX9lSDzakdAGiLGWLBNgudEZt3tG0rYMGVnjm7O7ZxKe/3WCBeKLTaZLPVpFMow54InFUGHKQ5/VASRfAh9kLXsxQa7JzRxJ9hnvh8UQK12S417XyJoUiF6PGcaoUdBZO/5bt0Q1fnwBB3gpz93FCpkJAzdw0R1+QnFHKK2pamPA6WzFUSLm33pq1ZJSLeLF1ymXAVJnX/cXOwN3FrKz8fBh/hR/KbkKpusJu68gZkOWj1/ZGMabxAV1DRkw== 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=WNKBHTMrmY8wF7CYQVz+bZy3kgVPVLfKbD5Xvr6bNBU=; b=YNFfVeHUMgY+OknLbOSM9wiJtISbQ0KpxPkqXyr2xNz0AZYWy1NmE4jBA7cy+eHRAPyadwI35p5rje+GC6DlcMWM8m2mQHoHLnQUfau6LyVeTj8rxuozpd5oTxb0nXJQ1iSNmvzygSUfn6PPz2yiCc97CAhkYnwmOT2xTjHEMuleuFGXvarlhe9PItg9oCyE7gyOXHaGhuQty8J6iBoMjTH7ABiKBY0Wh8xt1FR3holY7oYHTsMwLG+XfJjL27YJvuVJ7f9bej50m5mH3CG9mGijKlwdjtvhCPkTJ3VrAeyEuSp3p8do8T8KT9GXZMJzuVtlXpltAEDGg0cXC22Y3A== 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=WNKBHTMrmY8wF7CYQVz+bZy3kgVPVLfKbD5Xvr6bNBU=; b=HkHfo/Ts1kD8h4YZh7RuBKYWclzwFdeZHAdHWsRjY1Rn5y51ajq8BUm56byhnMJkt7Dso/NRs0mjruvKu/BbeOFxjuDq0Ek/fKN/hTD1BIGON/Jyw/pQN6j4qAfdJFfPIyxFNnTSfmTG2TxFYfIqasRomaXC0K2BP10jLUKJxmk= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6858.eurprd04.prod.outlook.com (2603:10a6:10:113::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Fri, 24 Jul 2020 07:43:59 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:43:59 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 07/10] remoteproc: imx_rproc: add i.MX specific parse fw hook Date: Fri, 24 Jul 2020 16:08:10 +0800 Message-Id: <20200724080813.24884-8-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:43:55 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: be5bf5c4-b3d2-402f-ad0f-08d82fa5538c X-MS-TrafficTypeDiagnostic: DB8PR04MB6858: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2887; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4wuKCks85IhmC2+OYiUrsGTU3FBHO5id70PmdIGFSN+BYsWU+vjdT9TJXWUVfd3FiQ68KnPKiavTxntw2SOkuRoab+0RWnwLKszCNk4u9g3iJNUU5e06Z3SWOdrbgTM/5TYl2iCMgiXJ6RhfnV6LBV36UCOsK4DPXT3M6QsY3d2+ii8lVeYwiHG/pJq8Jf66mbguEuo5ruAd/FsdQ2umnNqjmCsqZFpWFO+oJcJ/G3CnlP94Upare3ypdVBoMhrBzkGq4QTk+5dRroOGh6epaMB52jIFp9x4nSjlCQkYlNXoNFmhGvZ3okUSNWrKalTJYrwl+GVQsZ9MjLJ7xBUd2g== 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; SFTY:; SFS:(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(52116002)(36756003)(83380400001)(478600001)(1076003)(2906002)(6666004)(16526019)(186003)(26005)(6506007)(44832011)(956004)(2616005)(86362001)(6486002)(66946007)(316002)(8936002)(7416002)(6512007)(66476007)(66556008)(4326008)(8676002)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 4rB80+kq6rOSHgz75BGeKeh0K3llEyUJsXaW5hN40qfvFav6rwHscRZ0QJbM5nffQ8uvYiTOrpF8Y7BZFZRiaxSzmLTxfZHS+UbaDK1AptaoRqtoZRJKfN9UiLIWvAZZ8CN+eP8YyNAkFSToGagVPgqrAakDveBA4gxLE6DHrnjUZJaL4cL/oMIuIjTOwpm/iwkT+saqk5tHUGDxrpZsk0sr/MgscIOtlWn1nkcSGWkc/GM6oGIRVpYZY/xzG5mZoZT4MZn8bFXyYQik2wtsun96kTM7oWWM628rZ7NiCDh1XoYUkJ1DHGOp9kHnVC3SktjePdoAypQFUdJXLhMEpf4t1f28IcTEO3POXQfJJ7EaC+rBF7s0Nh1WGhrteirnFFa75bO2lCGba+y0PgnH+wkfHrpgNB36rdV2dzgw0tTpDYYGbeLxeCzKO+Tnn+5RT9C1v+FuPbatA0W/8TDiJgt/ubhucBuLXKm9OMCkfJ0= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: be5bf5c4-b3d2-402f-ad0f-08d82fa5538c X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:43:59.3381 (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: JZ6B9KWUD4ZM7R/Fsst9Q4fob8QLeeijXxa6jILD3XdjWwz1Dz24GWYNuI9XcXT2BHCFPxmhjyV4pxpxxfFMpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6858 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034402_409429_798E7DE2 X-CRM114-Status: GOOD ( 18.58 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.21.56 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.56 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The hook is used to parse memory-regions and load resource table from the address the remote processor published. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 99 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index c23726091228..43000a992455 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -89,6 +90,7 @@ struct imx_rproc { const struct imx_rproc_dcfg *dcfg; struct imx_rproc_mem mem[IMX7D_RPROC_MEM_MAX]; struct clk *clk; + void *rsc_va; }; static const struct imx_rproc_att imx_rproc_att_imx7d[] = { @@ -251,6 +253,101 @@ static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) return va; } +static int imx_rproc_mem_alloc(struct rproc *rproc, + struct rproc_mem_entry *mem) +{ + struct device *dev = rproc->dev.parent; + void *va; + + dev_dbg(dev, "map memory: %p+%zx\n", &mem->dma, mem->len); + va = ioremap_wc(mem->dma, mem->len); + if (IS_ERR_OR_NULL(va)) { + dev_err(dev, "Unable to map memory region: %p+%zx\n", + &mem->dma, mem->len); + return -ENOMEM; + } + + /* Update memory entry va */ + mem->va = va; + + return 0; +} + +static int imx_rproc_mem_release(struct rproc *rproc, + struct rproc_mem_entry *mem) +{ + dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma); + iounmap(mem->va); + + return 0; +} + +static int imx_rproc_parse_memory_regions(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + struct device_node *np = priv->dev->of_node; + struct of_phandle_iterator it; + struct rproc_mem_entry *mem; + struct reserved_mem *rmem; + int index = 0; + u32 da; + + /* Register associated reserved memory regions */ + of_phandle_iterator_init(&it, np, "memory-region", NULL, 0); + while (of_phandle_iterator_next(&it) == 0) { + rmem = of_reserved_mem_lookup(it.node); + if (!rmem) { + dev_err(priv->dev, "unable to acquire memory-region\n"); + return -EINVAL; + } + + /* No need to translate pa to da, i.MX use same map */ + da = rmem->base; + + if (strcmp(it.node->name, "vdev0buffer")) { + /* Register memory region */ + mem = rproc_mem_entry_init(priv->dev, NULL, + (dma_addr_t)rmem->base, + rmem->size, da, + imx_rproc_mem_alloc, + imx_rproc_mem_release, + it.node->name); + + if (mem) + rproc_coredump_add_segment(rproc, da, + rmem->size); + } else { + /* Register reserved memory for vdev buffer alloc */ + mem = rproc_of_resm_mem_entry_init(priv->dev, index, + rmem->size, + rmem->base, + it.node->name); + } + + if (!mem) + return -ENOMEM; + + rproc_add_carveout(rproc, mem); + index++; + } + + return 0; +} + +static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) +{ + int ret = imx_rproc_parse_memory_regions(rproc); + + if (ret) + return ret; + + ret = rproc_elf_load_rsc_table(rproc, fw); + if (ret) + dev_info(&rproc->dev, "No resource table in elf\n"); + + return 0; +} + static int imx_rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) { struct device *dev = &rproc->dev; @@ -323,7 +420,7 @@ static const struct rproc_ops imx_rproc_ops = { .stop = imx_rproc_stop, .da_to_va = imx_rproc_da_to_va, .load = imx_rproc_elf_load_segments, - .parse_fw = rproc_elf_load_rsc_table, + .parse_fw = imx_rproc_parse_fw, .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table, .sanity_check = rproc_elf_sanity_check, .get_boot_addr = rproc_elf_get_boot_addr, From patchwork Fri Jul 24 08:08:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682623 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 282D51392 for ; Fri, 24 Jul 2020 07:57:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 000F1206EB for ; Fri, 24 Jul 2020 07:57:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rJB022oX"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="kTxF50qE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 000F1206EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6nqGEnITLMD7HXXSSIpFgd7PZNziVdnrjg3/hdGUG+M=; b=rJB022oXu04vFqvnsXoZYWZIb InhgiOH6QyzFVxWS2qXQ8teSs8oCNxyAAHUrhzW6A2KmYbekyINo4J13Tq/JZAVRH1AZrckw6svZx Y0Lb9JczGFr6UL2iC+PbBt8MpNWtpks8wVSlXFA9fQdHZ6mvK3wzYRTr4OQhQd5pdipiVSn9ESiOE g4lw06yxcjT4bG6M1HnsZikj6uujZ7OzU9UdTcSnEyq2EmHQ51c+Stae9VWorU6ocgAs03nSlsqjq FDEcV+oTYeKOVdpcaBa9aFcSSDfFHSBjdw/NsaUFIt+j6pKs9quxubYNq2GEH5ZwegigcneprSotv 3QU3A9w/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysY4-0000M0-KW; Fri, 24 Jul 2020 07:55:20 +0000 Received: from mail-eopbgr70042.outbound.protection.outlook.com ([40.107.7.42] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysNC-0003FP-DR for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:44:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VVGKTjYssoKqY2okkQg+6p8kQN6auWncnltEor3SwW9qI/KvEfK6RjXIA+osxGQYnSRu/yy8pN8wSUk2A3bwi2B+Go7Vg8cnpxhKonuO7GyLVsgZKTGy97XOCbfP4KDd1e0NZAE6S912KJsX9vQjVIcI54S7USZS6UsRPrgqB3dm3OgR86wHflPHySGLB8xBunJROsr75YFcA5iLrMltk+9sToALf8bNwqd5MQjFuaPhvPighiUOROW1Py3pRoLhLBX4CaAcUs4PX7e7FM1ugEdb4cseH/N6oCVG37RNkyypK27NoEWm6m6vYvQxBj2mTJ46E8ADtNDtbgLLERBv6Q== 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=OmOmcZ88KXJyAJYcF09Ib1w500GSJmSl0cg424eQR4M=; b=hTZbkyi0KTEYVuxWX0seMRzL7vtItx5q0IS8rVtILTOJXlEgqSn9PeH/J4pVRK9HKZbvGdKLma0FhbcBU8vCK1pFmoG+r8xrQ8bCc/YJ1qgKGWvRdP5mgYto8292HlzUJY2Ce/3n8pzKcFSJKPAID9BqL3Bf2PbkMAEuuNMoLZQbCSRFLSZaKIrLuHviXCBos0qnalW3QroZ1fr66+5MQHo/6GGAK+s9IRPcmqBVSRRl6BD7U/ABIVkZESL1NTpEmHgK68W4HQMvHBKhdrQP8MwCThv2xviyhYb6j/3cqs8JgNTWGFzxpSKm+mIqxAk0GagLRlHgZp99nsanYhNh7w== 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=OmOmcZ88KXJyAJYcF09Ib1w500GSJmSl0cg424eQR4M=; b=kTxF50qEPlkV5lUnd/9jTQP+OP1GydHiUIUPVCeQ0JxTBj8NLzKzvRu+qX17BmAdEExvmDcPyG4UnoSueeCQ6+IRxHtrd3v0s1M7zbkqMAT9vfD0UrxLPHaT8DfHJPIQu7ol0Dz7aN7aYVODkWwMOUlZnr6zNZY3H5uexGCV05M= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6858.eurprd04.prod.outlook.com (2603:10a6:10:113::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Fri, 24 Jul 2020 07:44:03 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:44:03 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Fri, 24 Jul 2020 16:08:11 +0800 Message-Id: <20200724080813.24884-9-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:43:59 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7b79836b-8a65-4d94-a8c3-08d82fa5562e X-MS-TrafficTypeDiagnostic: DB8PR04MB6858: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:61; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4XCpekZxBLDfbXsa0bx7ZZmiuP9DFQq8yzeML45o4Z/VkCQNEP50BrVBy1F8NdOEHcQO1g1y+7yGPABsbt+ukiAYCl5pejWZix4qWI6N1SPWB9mcs91frjV3a9+NOmli9WrV61t1Npq6rnysy+yUwMaWliyUFhzykC/fyO1RefjbYcYz9sTf24RfewtgZibAr5y1krtyqz40Y2hBX/CmDkKRPCuSGbkuqJHWIfS7hIHcSTrJ1W+ZnecFlix+bPQAszOfZvTg20rvgKD6r6TZmbsHSIdsgafIM3buLQWCxxEKKyLlN8RpIzWbOq0PTUfw1bAsgkDyddH0ScfGSyXSMQ== 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; SFTY:; SFS:(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(52116002)(36756003)(478600001)(1076003)(2906002)(6666004)(16526019)(186003)(26005)(6506007)(44832011)(956004)(2616005)(86362001)(6486002)(66946007)(316002)(8936002)(7416002)(6512007)(66476007)(66556008)(4326008)(8676002)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: im6P2HKZoVn4esXZYYz73+KuasuAbjpoDSct7EDWhSKG1RryGDycnw8EUFcPVvRC5OXporHOTVo6CusLgoc0p9Hs01DMKAjLj+y65DshKc1CL5N0r2to5r0Ns1uK2CLf4rm6JWQn8Th4kZbLr+3BBDfqvKUINgWnbMYDAZavc4IaIvT8OETNxbRLMkueoNqRM17BjfKeOPNeZhmI7/HfNaSclkO1gnJsrEwkdU/2XMYCof3cCFLaA3VATsqVwXK4O30KAtRLn3MTTceMw5cN6Jp4gFzSLo1ZpWeK7zuZ1deCaRfUj5EX1PIb1CikGrggF2OMb/MBLW85vhNAqzZtQlH7lnouaPjYlwvsABwfcS1B8diRPI1H6ch/z59IpKpRsuGhylhvzoTVcQMZPiO9M3xK1S7TF1Ysh2YDq0TErQft0+s6XIS7DGovMtSof9tPAcqLnyqO1IzPgDso9IKp05MRyW7+4KBzMAfrNPJZ/7M= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b79836b-8a65-4d94-a8c3-08d82fa5562e X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:44:03.7351 (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: nMrnI7vcLv3gzaL/JgjAkpaJ+EXTFeUFe6wWHvcEZtU+lqHnSPXrO7no/LZM2BntOi/SGReOGmg0jWAXRllWmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6858 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034406_552457_CB2AAB64 X-CRM114-Status: GOOD ( 11.27 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.7.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.7.42 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add i.MX8MQ dev/sys addr map and configuration data structure i.MX8MM share i.MX8MQ settings. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 43000a992455..03382290d6a5 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -93,6 +93,34 @@ struct imx_rproc { void *rsc_va; }; +static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { + /* dev addr , sys addr , size , flags */ + /* TCML - alias */ + { 0x00000000, 0x007e0000, 0x00020000, 0 }, + /* OCRAM_S */ + { 0x00180000, 0x00180000, 0x00008000, 0 }, + /* OCRAM */ + { 0x00900000, 0x00900000, 0x00020000, 0 }, + /* OCRAM */ + { 0x00920000, 0x00920000, 0x00020000, 0 }, + /* QSPI Code - alias */ + { 0x08000000, 0x08000000, 0x08000000, 0 }, + /* DDR (Code) - alias */ + { 0x10000000, 0x80000000, 0x0FFE0000, 0 }, + /* TCML */ + { 0x1FFE0000, 0x007E0000, 0x00020000, ATT_OWN }, + /* TCMU */ + { 0x20000000, 0x00800000, 0x00020000, ATT_OWN }, + /* OCRAM_S */ + { 0x20180000, 0x00180000, 0x00008000, ATT_OWN }, + /* OCRAM */ + { 0x20200000, 0x00900000, 0x00020000, ATT_OWN }, + /* OCRAM */ + { 0x20220000, 0x00920000, 0x00020000, ATT_OWN }, + /* DDR (Data) */ + { 0x40000000, 0x40000000, 0x80000000, 0 }, +}; + static const struct imx_rproc_att imx_rproc_att_imx7d[] = { /* dev addr , sys addr , size , flags */ /* OCRAM_S (M4 Boot code) - alias */ @@ -143,6 +171,15 @@ static const struct imx_rproc_att imx_rproc_att_imx6sx[] = { { 0x80000000, 0x80000000, 0x60000000, 0 }, }; +static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mq = { + .src_reg = IMX7D_SRC_SCR, + .src_mask = IMX7D_M4_RST_MASK, + .src_start = IMX7D_M4_START, + .src_stop = IMX7D_M4_STOP, + .att = imx_rproc_att_imx8mq, + .att_size = ARRAY_SIZE(imx_rproc_att_imx8mq), +}; + static const struct imx_rproc_dcfg imx_rproc_cfg_imx7d = { .src_reg = IMX7D_SRC_SCR, .src_mask = IMX7D_M4_RST_MASK, @@ -583,6 +620,8 @@ static int imx_rproc_remove(struct platform_device *pdev) static const struct of_device_id imx_rproc_of_match[] = { { .compatible = "fsl,imx7d-cm4", .data = &imx_rproc_cfg_imx7d }, { .compatible = "fsl,imx6sx-cm4", .data = &imx_rproc_cfg_imx6sx }, + { .compatible = "fsl,imx8mq-cm4", .data = &imx_rproc_cfg_imx8mq }, + { .compatible = "fsl,imx8mm-cm4", .data = &imx_rproc_cfg_imx8mq }, {}, }; MODULE_DEVICE_TABLE(of, imx_rproc_of_match); From patchwork Fri Jul 24 08:08:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682625 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 675E81392 for ; Fri, 24 Jul 2020 07:57:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31EB3206EB for ; Fri, 24 Jul 2020 07:57:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="U6PB6wDt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="cvfjDZ/h" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31EB3206EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mdLaeXUqU0M1e7wlmQzwH1tazYKHA4wFfr7IqXCuOJg=; b=U6PB6wDttQsiSS3OJ4cGXzOzr 5vVI4/NZGVaDr/NTbbpGrdC+Te1YVZK797i+YYfCXzQDBGJWgRLY0CaSD3xhqwhCM/WF5GQUGssrd KQTpaq03KCZrJZFoRK75Oiqqk0H7ilu7v64itIpBgtnwyXrMniLE/wxGo7GowDIlAtxCH0mu5VkPQ 7xEC0depXA110cXkabahIYODkKYQ8kFX7YHmcsKe9NYtngsspn0r+1QQKDu/RYth233r3iLx5Q3sC hwxCLUrf+YT9/LVYjdRTDkRzUTD9xgaePFcO2B1myAgGlNIIxohDQTLR3Hg1HOJjXeLbv1wAkKicj rzxQFPqJQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysY8-0000Mu-SF; Fri, 24 Jul 2020 07:55:24 +0000 Received: from mail-vi1eur05on2089.outbound.protection.outlook.com ([40.107.21.89] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysNG-0003Hg-Tw for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:44:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L1ovKxIb/lYevOxiZ/OotmUVKlz6OtOOm017HAQfqmH5iDgO8+ykWhYCboTVjlgmDO5Kmy++kopi1BlUIHRDpVs6xxCZxEzxzaXzsU3dA6PQBws39SXr+Qp/rw22mnJoLQ84IN6KFzS3K6J4edGjszpXWadmy0lcc8Lm4Kw2H4B8MKlE3uPg3/Fw3m2S1S7a+LGwAQPZ5UNmNkB6Oi0ydv/21Ud8PSr5uAb8U9O11+PDBXwstr6Vm+9SV9GjCIwM3jY+87yLFCGhcSwROJ6VR4k6qJ9ADekB1OH2nf11kD2qfrtwz8Q1CLPm+vbZJQ9Ns1We6k94Qvaz7JFFQpNojA== 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=/S5xzslLg13cyVfNnQlytWG9SZw7GUarAuSy+KDde0M=; b=QnJQ+nK4irrZTi8Tx9m+2Ay+2DuMW7xYhwjsr0fiPCF9J408lX6ZKKFWG6xNXDg484u7zp0ALuZB0JnYaS1CTVg+3zxdMP79cDUsjYLGd764XaB9zQ2t963dQAMZqeGoieWnTArtPpjcmYIY3MAb4LFheWFObMPokFgElGfgd8qvzFWdlQmgofQMTWBpD6Iws7RaWm6ivkyScCg5AJbtxDSaih4QSZrmSEqgBVhXz97xMqzgEtmDJ+BmsFIOUvUF7irxWt1Eaj66PWVKEh7ETwFb4dLk23XGpPFnLCShMvPwaajkMOSCF39KDHd2em8OL5tyQZt1GlqHdHMUOzP3SA== 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=/S5xzslLg13cyVfNnQlytWG9SZw7GUarAuSy+KDde0M=; b=cvfjDZ/hWzW4fbDyVUKCffKpDpDOR3CvvmMxqHrpQtNCAPGrqPNcqzCtFewci5lLRQLPMp9shS7784qbF2r7xtqW33PnGsBE9pGHxQBkSPyb6aCIwApAkMh5SmQljoRtqrawgNNKi46b9Z9moYVJm0Q2g8NnxfWyIiqcDNaI2vA= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6858.eurprd04.prod.outlook.com (2603:10a6:10:113::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Fri, 24 Jul 2020 07:44:08 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:44:08 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 09/10] remoteproc: imx_proc: enable virtio/mailbox Date: Fri, 24 Jul 2020 16:08:12 +0800 Message-Id: <20200724080813.24884-10-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:44:04 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9ceff2ed-4731-4da3-157c-08d82fa558ca X-MS-TrafficTypeDiagnostic: DB8PR04MB6858: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:569; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UzwWHjCFNDxRKwjcZ1Am4qfoAfYQKtHJT56NJ4I8vvsbU3biNcJxw4fOELHdlfSh29TXvGPYtmrV2iZm9ilX1oBWGaoFFMrYTo6f6xhtel34v/EiD7tLsXlKwkQCiMhHMMD2A8gknrPeg8cLsp6F0GgKVIbhVQgmKJMPZE1InJk7z2oMVDe8hgJI96L+Hh7oVl47yg5qwKqzruNet3qT3kSWFygzywYYPrQaE+Bqn+U7kw7mqTYZjU0cdW8w2tUpR0mFu9RIO1f78hZ9E7LmC4w01P9UnGfJcoOb+2TP7AdJZWaiyBA2mQ7MQXrnl12VpFCG7bAXjxaF3SVgH3GATQ== 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; SFTY:; SFS:(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(52116002)(36756003)(83380400001)(478600001)(1076003)(2906002)(6666004)(16526019)(186003)(26005)(6506007)(15650500001)(44832011)(956004)(2616005)(86362001)(6486002)(66946007)(316002)(8936002)(7416002)(6512007)(66476007)(66556008)(4326008)(8676002)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: CChrRR4/ftpbxpupoLpzgHVkiFq+SRpNDX8Dm1p2Yqm4WCM1gKLzdbVlfDr2jkC/ZLqDTfHS35d34cvczSV1mDMwZ6Mlfg4VACo7TD07OJq8NsU/xThmJPrCQ9rtv0nl563kcL4pmoZxsgd/IHdA26uFvJAORVs6kEy8g8MgIAbUkj5oY3KKnU0AJ0gY0XViARPmaeBwNkrKeYlVT0oiDzg2gTD9EQm0DE4TNQ12XGizyCtTIT32Co8ptbkEUo1SW+wUk394xVRFo7M3QDgwNCQ+xkXGL9kJhOpRl3qWtw0b+jNNwPkIgY3AS5lT3Pry9lIKYjmPzR7P0Klta8IZD78f7FY5k2y0q3qhzlKr5EYnVzYFNCQUFtr8m7A4S7LPxmpdiYqRdTwa4keKor+9g8MwissP/DYfJ2z+qBI0jArLYG7nrhxe4Tzqy6rIkS0oTXtBnlvyE8BtzSf119fSL8cM+RgN3NgOhFwHK1BTtEI= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ceff2ed-4731-4da3-157c-08d82fa558ca X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:44:08.2561 (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: xC0yi20tO9/nMiO3qC5KCZvfjzWLugk6HqTdzmmOesD0uaXFvN72OsU3LINKIfbuJhET9U7JK0bLDznxE9oLkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6858 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034411_077319_6001CAA7 X-CRM114-Status: GOOD ( 17.52 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.21.89 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.89 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Use virtio/mailbox to build connection between Remote Proccessors and Linux. Add delayed work to handle incoming messages. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 102 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 99 insertions(+), 3 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 03382290d6a5..a8ce97c04e1e 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -91,6 +92,10 @@ struct imx_rproc { struct imx_rproc_mem mem[IMX7D_RPROC_MEM_MAX]; struct clk *clk; void *rsc_va; + struct mbox_client cl; + struct mbox_chan *tx_ch; + struct mbox_chan *rx_ch; + struct delayed_work rproc_work; }; static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { @@ -452,9 +457,25 @@ static int imx_rproc_elf_load_segments(struct rproc *rproc, const struct firmwar return ret; } +static void imx_rproc_kick(struct rproc *rproc, int vqid) +{ + struct imx_rproc *priv = rproc->priv; + int err; + __u32 mmsg; + + mmsg = vqid << 16; + + priv->cl.tx_tout = 20; + err = mbox_send_message(priv->tx_ch, (void *)&mmsg); + if (err < 0) + dev_err(priv->dev, "%s: failed (%d, err:%d)\n", + __func__, vqid, err); +} + static const struct rproc_ops imx_rproc_ops = { .start = imx_rproc_start, .stop = imx_rproc_stop, + .kick = imx_rproc_kick, .da_to_va = imx_rproc_da_to_va, .load = imx_rproc_elf_load_segments, .parse_fw = imx_rproc_parse_fw, @@ -527,6 +548,67 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, return 0; } +static void imx_rproc_vq_work(struct work_struct *work) +{ + struct delayed_work *dwork = to_delayed_work(work); + struct imx_rproc *priv = container_of(dwork, struct imx_rproc, + rproc_work); + + rproc_vq_interrupt(priv->rproc, 0); + rproc_vq_interrupt(priv->rproc, 1); +} + +static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg) +{ + struct rproc *rproc = dev_get_drvdata(cl->dev); + struct imx_rproc *priv = rproc->priv; + + schedule_delayed_work(&(priv->rproc_work), 0); +} + +static int imx_rproc_xtr_mbox_init(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + struct device *dev = priv->dev; + struct mbox_client *cl; + int ret = 0; + + cl = &priv->cl; + cl->dev = dev; + cl->tx_block = true; + cl->tx_tout = 20; + cl->knows_txdone = false; + cl->rx_callback = imx_rproc_rx_callback; + + priv->tx_ch = mbox_request_channel_byname(cl, "tx"); + if (IS_ERR(priv->tx_ch)) { + if (PTR_ERR(priv->tx_ch) == -EPROBE_DEFER) + return -EPROBE_DEFER; + ret = PTR_ERR(priv->tx_ch); + dev_dbg(cl->dev, "failed to request mbox tx chan, ret %d\n", + ret); + goto err_out; + } + + priv->rx_ch = mbox_request_channel_byname(cl, "rx"); + if (IS_ERR(priv->rx_ch)) { + ret = PTR_ERR(priv->rx_ch); + dev_dbg(cl->dev, "failed to request mbox rx chan, ret %d\n", + ret); + goto err_out; + } + + return ret; + +err_out: + if (!IS_ERR(priv->tx_ch)) + mbox_free_channel(priv->tx_ch); + if (!IS_ERR(priv->rx_ch)) + mbox_free_channel(priv->rx_ch); + + return ret; +} + static int imx_rproc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -566,17 +648,24 @@ static int imx_rproc_probe(struct platform_device *pdev) dev_set_drvdata(dev, rproc); + ret = imx_rproc_xtr_mbox_init(rproc); + if (ret) { + if (ret == -EPROBE_DEFER) + goto err_put_rproc; + /* mbox is optional, so not fail here */ + } + ret = imx_rproc_addr_init(priv, pdev); if (ret) { dev_err(dev, "failed on imx_rproc_addr_init\n"); - goto err_put_rproc; + goto err_put_mbox; } priv->clk = devm_clk_get_optional(dev, NULL); if (IS_ERR(priv->clk)) { dev_err(dev, "Failed to get clock\n"); ret = PTR_ERR(priv->clk); - goto err_put_rproc; + goto err_put_mbox; } /* @@ -586,9 +675,11 @@ static int imx_rproc_probe(struct platform_device *pdev) ret = clk_prepare_enable(priv->clk); if (ret) { dev_err(&rproc->dev, "Failed to enable clock\n"); - goto err_put_rproc; + goto err_put_mbox; } + INIT_DELAYED_WORK(&(priv->rproc_work), imx_rproc_vq_work); + ret = rproc_add(rproc); if (ret) { dev_err(dev, "rproc_add failed\n"); @@ -599,6 +690,11 @@ static int imx_rproc_probe(struct platform_device *pdev) err_put_clk: clk_disable_unprepare(priv->clk); +err_put_mbox: + if (!IS_ERR(priv->tx_ch)) + mbox_free_channel(priv->tx_ch); + if (!IS_ERR(priv->rx_ch)) + mbox_free_channel(priv->rx_ch); err_put_rproc: rproc_free(rproc); From patchwork Fri Jul 24 08:08:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 11682621 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3511213B4 for ; Fri, 24 Jul 2020 07:57:18 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0CCF0206EB for ; Fri, 24 Jul 2020 07:57:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fsOed10l"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Z+xM73FO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CCF0206EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hBROvQBWkB4nrptxyHoDmCCIoJDIi6dDuYXE+Itoa9Q=; b=fsOed10l7w7QMQh9dut+6RPEF m6MTG4702YkRNLilqftd8/goRADU1Gp72WIrjbOjRJrPHnnQx5H8erkem4npb+5h65pAxuomCnB4C RvHVcTWw+MTCd1OuFA/L/Nb2Kvn7Im7mT3UP+gISgqwRPgxFgaNEqfZ6o38f1imkoBT6aeUV/ZJnH bwrthoR5RoviyXmkaclgTUTpSJWNxRUCPVKRfMn5f9BRN86sBCtbl8+j68UPerfCU+PD9v1ZySG1p K34MjjlIhjlYMzUy6ijThL8T9RNsAN8lD6548c3OWCwXjZ4LYr+edM3RQYoUO/BY1VWrM0j1F5ygN LXcikwIBw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysYB-0000N9-Dz; Fri, 24 Jul 2020 07:55:27 +0000 Received: from mail-vi1eur05on2074.outbound.protection.outlook.com ([40.107.21.74] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jysNL-0003Jr-JI for linux-arm-kernel@lists.infradead.org; Fri, 24 Jul 2020 07:44:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YV9zHcRv2QdLAWsdVbdqPx2Z5fxZWG6CtfCEOngmILAXuj/5rVPPL3peGotRtkBbYcFrnfflw/y3lFciYa4ZWFBADOc6XcLYAXWWXKyFH28sAGRf4RoojfUPnkWClY1vtPNZqdCowVh5+AiU+Bs9cXaM+Iwe0FEQd4Kr7lH87e6gJ2ShvX8puTvfpXgGyBcst2pfEJQae2D6bVA+SGM5M/tD/wIb0RWIM/xhHH/lU2F0tRcH4lU/zkSqm51GKTONjnseSEGs5Ww18WI5+iAeioRV59PKdh7nBen+ni8ADu0MA9GtnCR2vg/5uz6MmyLkLeDitPBUH2AwUcamXIxFlQ== 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=ycrD+ONW/+IkoPUuu4wnsgt/1ruih9vo8Wr0ekuz24E=; b=XSIBAhhFuIzeA0QBzFOUeA+9xGfAQcavKcS0mgJ6WbPLpdtWsyX3VRc+AjFi1Ctn8KrSvr+MdKUj8LGuvNWzxrwQNYZSiJ+3MWsowU6MY2GfQOJ85PojFrNXJSM5SOG5lBfh5G2BejiMRIyp2YJ5hInrypu3YYKhFGXJ01ccganAWz7mbQ43DLu0ZtzjBwaKXuWHIBzJmyp6Cb4ra0y20gpzQnTsryu536NTYcrsClt/pmR5voPncILv4b5eNd3GjsaVz+0itP9FcPAYQ+MGxHJUI/B85m0nA43ClmTWgQKPW8YkIgNokU97FrVQfLgEdj0m6prWQCD+CBTONx3wMA== 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=ycrD+ONW/+IkoPUuu4wnsgt/1ruih9vo8Wr0ekuz24E=; b=Z+xM73FOJVLHsoZBM548Wq377CDD4vnnOuejxoSFGmsdHl8W1KVpymtwoVH1ZdtzpheFAgP7dmDpCQnVTVZ1pTb19ahxEcr3D0Psl9ra6j39MqFSRHvtk/wr5LU4jH1P6Nknq4s2pEkdl6XQXWx3y3o1Prv/b/SS/h0mYKRcn/U= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6858.eurprd04.prod.outlook.com (2603:10a6:10:113::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Fri, 24 Jul 2020 07:44:12 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 07:44:12 +0000 From: Peng Fan To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH 10/10] remoteproc: imx_rproc: support coproc booting before Linux Date: Fri, 24 Jul 2020 16:08:13 +0800 Message-Id: <20200724080813.24884-11-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200724080813.24884-1-peng.fan@nxp.com> References: <20200724080813.24884-1-peng.fan@nxp.com> X-ClientProxiedBy: SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGAP274CA0014.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Fri, 24 Jul 2020 07:44:08 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2481b5ca-703a-413b-5505-08d82fa55b94 X-MS-TrafficTypeDiagnostic: DB8PR04MB6858: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CU9BcNYCU1wjESF7XCRpx2fQzOYD2VDLrDXGzOC1jw0bxPVfPXXoIRufQOi0yO1SuO4YgAlKAB3adbpOuxWaXwuN3XgqRKbz0oq3bZdY8HklYC9wbgqhhlu+3ZsESb5J9WxD7QctepLq3cpKRuiTcgDfIXJgSvJnsFWabtbOO/rR+DswCGorgP3ewGuu9d6Ka1EW9KDfurewYOn3nOYhXaGCtP1FP90LQXMxpqDutAZMQo0zEkBnBqtSY+wtjasTumCD1UpxztiVEYozQVORiKy5um0xf48UG7Jdh7sYP2u2kMoNzE7HnfdY9XFpn/K+GpMYjN8imjpozZ5VMmPQPQ== 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; SFTY:; SFS:(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(52116002)(36756003)(83380400001)(478600001)(1076003)(2906002)(6666004)(16526019)(186003)(26005)(6506007)(44832011)(956004)(2616005)(86362001)(6486002)(66946007)(316002)(8936002)(7416002)(6512007)(66476007)(66556008)(4326008)(8676002)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: +BXej0xxfuBoqWkqbDIdKogrwn+KqM33XmQoWEPqtwv689nhKMiy9a/GQx5fh7vsH/cLP3i/3TS2kJwnWFmAlr1wdgcTimXDPZNdM3GYT7vIWOSqNNFV1r41/1uxEgmKP6u9ysIzGwOW9eyHWGHFP2powwKL7giRwZmWW/xFkv7p41ZQlSDRRqyYR5NRGe4J0bRMZdm3REJafZKIJEzHsoa9OqDpcy8bnRhcZNRtwTXmlR6MeTjetws1nbhtA8f/qYIutTaJlfrrGpCoSO8Gj6EHJCsnvywT374toN5bfS23Zrg4nuXihPRyxUZ9zjMavDIyrvh616c/Tq7A5FA1MQnc6AoAdbC5nF01cnGBnUFgHxHsnPFNazCI4aSKxA0HHl+dyAeaBH4dhN6T96BHaF7sgUR5sFBkE4LDbli3USQ4MvDPzijiGL7RsZ33CmQxMRisK6PpKQtDRT12tzP4QhrIIrca9RMTWeckIPqKuDM= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2481b5ca-703a-413b-5505-08d82fa55b94 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 07:44:12.8890 (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: EQP6hoC7N6XHnB3Flgwp+ynlQ9oZb2a2pYsUfnyVV8i2WWsfBAwy+3/9JaZoyNpnUzfeD5edF6WgWFKChEutrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6858 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_034415_709449_9D313CD4 X-CRM114-Status: GOOD ( 15.62 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.21.74 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.74 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Peng Fan , festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Detect Coproc booted or not and Parse resource table Set remoteproc state to RPROC_DETACHED when M4 is booted early Add attach hook Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 75 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index a8ce97c04e1e..0863b3162777 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -91,6 +91,7 @@ struct imx_rproc { const struct imx_rproc_dcfg *dcfg; struct imx_rproc_mem mem[IMX7D_RPROC_MEM_MAX]; struct clk *clk; + bool early_boot; void *rsc_va; struct mbox_client cl; struct mbox_chan *tx_ch; @@ -235,6 +236,8 @@ static int imx_rproc_stop(struct rproc *rproc) dcfg->src_mask, dcfg->src_stop); if (ret) dev_err(dev, "Failed to stop M4!\n"); + else + priv->early_boot = false; return ret; } @@ -390,6 +393,32 @@ static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) return 0; } +static int imx_rproc_get_loaded_rsc_table(struct device *dev, + struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + struct device_node *np = dev->of_node; + u32 da; + int ret; + + ret = of_property_read_u32(np, "rsc-da", &da); + if (!ret) + priv->rsc_va = rproc_da_to_va(rproc, (u64)da, SZ_1K); + else + return 0; + + if (!priv->rsc_va) { + dev_err(priv->dev, "no map for rsc-da: %x\n", da); + return PTR_ERR(priv->rsc_va); + } + + rproc->table_ptr = (struct resource_table *)priv->rsc_va; + rproc->table_sz = SZ_1K; + rproc->cached_table = NULL; + + return 0; +} + static int imx_rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) { struct device *dev = &rproc->dev; @@ -472,9 +501,15 @@ static void imx_rproc_kick(struct rproc *rproc, int vqid) __func__, vqid, err); } +static int imx_rproc_attach(struct rproc *rproc) +{ + return 0; +} + static const struct rproc_ops imx_rproc_ops = { .start = imx_rproc_start, .stop = imx_rproc_stop, + .attach = imx_rproc_attach, .kick = imx_rproc_kick, .da_to_va = imx_rproc_da_to_va, .load = imx_rproc_elf_load_segments, @@ -609,6 +644,36 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc) return ret; } +static int imx_rproc_detect_mode(struct imx_rproc *priv) +{ + const struct imx_rproc_dcfg *dcfg = priv->dcfg; + struct device *dev = priv->dev; + int ret; + u32 val; + + ret = regmap_read(priv->regmap, dcfg->src_reg, &val); + if (ret) { + dev_err(dev, "Failed to read src\n"); + return ret; + } + + priv->early_boot = !(val & dcfg->src_stop); + + if (priv->early_boot) { + priv->rproc->state = RPROC_DETACHED; + + ret = imx_rproc_parse_memory_regions(priv->rproc); + if (ret) + return ret; + + ret = imx_rproc_get_loaded_rsc_table(dev, priv->rproc); + if (ret) + return ret; + } + + return 0; +} + static int imx_rproc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -661,6 +726,10 @@ static int imx_rproc_probe(struct platform_device *pdev) goto err_put_mbox; } + ret = imx_rproc_detect_mode(priv); + if (ret) + goto err_put_mbox; + priv->clk = devm_clk_get_optional(dev, NULL); if (IS_ERR(priv->clk)) { dev_err(dev, "Failed to get clock\n"); @@ -689,7 +758,8 @@ static int imx_rproc_probe(struct platform_device *pdev) return 0; err_put_clk: - clk_disable_unprepare(priv->clk); + if (!priv->early_boot) + clk_disable_unprepare(priv->clk); err_put_mbox: if (!IS_ERR(priv->tx_ch)) mbox_free_channel(priv->tx_ch); @@ -706,7 +776,8 @@ static int imx_rproc_remove(struct platform_device *pdev) struct rproc *rproc = platform_get_drvdata(pdev); struct imx_rproc *priv = rproc->priv; - clk_disable_unprepare(priv->clk); + if (!priv->early_boot) + clk_disable_unprepare(priv->clk); rproc_del(rproc); rproc_free(rproc);