Message ID | 1618971622-30539-7-git-send-email-peng.fan@oss.nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=2DKb=JS=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BE69C433B4 for <linux-arm-kernel@archiver.kernel.org>; Wed, 21 Apr 2021 02:39:27 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 B2E2A61414 for <linux-arm-kernel@archiver.kernel.org>; Wed, 21 Apr 2021 02:39:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2E2A61414 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bnsWHIZ7gAydQ38jnWmXSFv/ilJ1vbKmxzBIiGk6IdM=; b=jFJlijEiBpKu4J2lYlonfItRM bMr6dG0bzEAlkPdNBOJ2WNVPz9kPmRmA0mCBY8Wz08yA1fcvdY+aKKOoa1xeNvIezhPmE4oeb+Nx4 EFRppyHNWafvnPjWD4oK6E5kjIQaIg7oFEix4LC3g6+x5CiV7viMZBmO6fplneaOVc9Vpp4Scxot7 9nW/ZMLsJ0aVW03Y366oZaSbiFEwNuYWVWa8zbscuV7olwF19yu9QEH7wUe4UW2FXtFn0zrR4OO3F uCq1++99iFgezxNdx1QhdFYuiwjHUEZaBj5LrKYJ9noa7uw1YgwBQ5fHXDNCb43zR15yvkRKABfa1 c0aekE50w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZ2kC-00DUOk-91; Wed, 21 Apr 2021 02:37:36 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZ2j2-00DUCc-40 for linux-arm-kernel@desiato.infradead.org; Wed, 21 Apr 2021 02:36:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=MIME-Version:Content-Type:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=UzymBpZ5Ej2sizLxQ5Gkw5D8Y97LziPProGsnKRR5vQ=; b=kUlhwp5JYzX+L4N9MU90CHfain RmMEUbC1O/9ygIaDQ7Fl0+Lu+tv8w2IjriUgcqxTLm5/NKjJSJSpFoFyeZRZEv5dOFHnzAnTEQH1j /Rm9O+tuZcGlLLUoUfckRGsSFvAFeyCDFAoSpmV26QmE0PMbYcx77Zv9OIelZBsJL2xZJ8MAnnn0d HDFpMR/WC8+QHEtCHH1E/xdsBi+AAyauM7GJAlAaUxlOlrEX1GXCqSOUjQr7aeDAcH6z1RoJ7iqSq 8oAt/10FYS8fYnlDFc0shALtac7NzJrEzqSf9omaVXVCrsnfyzDtCrmkTvVB953vl/FYC2OBSJe/O 9V6BlvhA==; Received: from mail-eopbgr150050.outbound.protection.outlook.com ([40.107.15.50] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZ2iz-00CXsO-LC for linux-arm-kernel@lists.infradead.org; Wed, 21 Apr 2021 02:36:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oaPAMIW7KvWCBQXp1SAIoM3YiA6Nyc2XwDgG+WaFacZ4d5Se0rLK1f4kOjJ+TSNx2dVF9SobeyPbqp4FlMlVu0Hw+DqjGdyVDJ2x1NnRKEsWXs86YPC+1hhQVuQLx8ahgX9woQdvO6ONiv3654lGHuyYhGlKYjRvdUGVHoa+pHT03ygoZx+Gp7ww9bXtXyh/yCgz7gyWwN8NGZ2tr8wkpQGG2VlSm01MDx8Ll99FiQPAEEZjgMdyl/fpjwq3bfyT1cIcaNoIxx/Z1Dkcsqtexgy/g4fzaoG0oqyyIV2ITGTNvCZeZifjXIfB4ElATTKE61o7j6MSifUr08ewu4W6WQ== 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=UzymBpZ5Ej2sizLxQ5Gkw5D8Y97LziPProGsnKRR5vQ=; b=nK/GDRXW4Q/eKr25KJN/4syrpuN2tMgoxAjPsN94S2vEK1dBimLmfzNcKuPRSr0SEaehi/eYMM0JJESMDcHQC1G1oPqWyBwraOhk7W0D3qyQRkhvQZRQmsDVABC+dPWcon9YLPtpL5wkGJbmr3aboseBh/EzCzLiffZzgsJx34vxrDIW6IWVQTlN83oBegqfHo2YfnNVIwc3xGtgoyX4IiVvzUC6UYPkAqXgKBvs/op5PRe1iy5+SPKkaPBIihKF8MHaj/+w0kfXXI0laZBI+oDvTbh+wS9Q3SbM5oxrzvZVP+qDzGYUUcu4889abQHTaiBs6uxZLu9MZlY/eSduUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UzymBpZ5Ej2sizLxQ5Gkw5D8Y97LziPProGsnKRR5vQ=; b=NjtNTDKwYnALO7OT0rfhwBawpxD88DkuLuFsD/DxJd3NeVIltMu9O3SrAI2aHdjEGLp9hFoXM5wmUVPqhl/6f2BCbyj9G5/TkGHOmqvjROYl48FrzObLCgNNNsJj0S8XAS9P39xDf2nuzjw82sqrwaNR8w8hu6SRXJCNYqIoadY= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB9PR04MB8313.eurprd04.prod.outlook.com (2603:10a6:10:241::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.19; Wed, 21 Apr 2021 02:36:15 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64%8]) with mapi id 15.20.4042.020; Wed, 21 Apr 2021 02:36:15 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com> Subject: [PATCH V5 6/8] remoteproc: imx_rproc: make clk optional Date: Wed, 21 Apr 2021 10:20:20 +0800 Message-Id: <1618971622-30539-7-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618971622-30539-1-git-send-email-peng.fan@oss.nxp.com> References: <1618971622-30539-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR02CA0204.apcprd02.prod.outlook.com (2603:1096:201:20::16) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR02CA0204.apcprd02.prod.outlook.com (2603:1096:201:20::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4065.20 via Frontend Transport; Wed, 21 Apr 2021 02:36:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8cafafef-dc2a-4276-ed24-08d9046e3ab2 X-MS-TrafficTypeDiagnostic: DB9PR04MB8313: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB9PR04MB8313BB5738CDAC2F3E5F4537C9479@DB9PR04MB8313.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wDkMm3/NqcJnxu7RaHpPuoZaj7p5NE0meAJQd/Tu6jHR2ImBUEGZr+XgOFtXVMoysjdGc70XVLRy2uYRcDKISl24Ca0NQSCcvyzcGX2fG/JS5KzyhQ3l+n3IrtKoDlUEqjft5rDfcB8DklmvTPO36M//OORcWDs0JWWh9Rk+NhStDPDyAcaYqORxuqc3ZlKYA2CnGv+bB28ay7ZUCBur82HvUiF+0uxIGAVVS34Vd8YsHbShrlyGTZSnQ5qWsKHAYAFqgf8hhulJ/qI/1HxXU6Yxn/irMpNw9vE2wSCK4aN+o9YWBxnEl0IXgi/HXkT8Y+02yLZytqBecanc+T+lwdXX3lbe7Clh+zApqCS+0TogdarJ1tfchDRjNiPeYUz9u+vQ/Dh9Vace7sFCa4bKK8PdobG56ZWwCRmhfxzZw5eSn3t+FZe0UPzhmlwlokuedvoXEaBTWxotu4tFBhXYhIt5mWQtMF9PM2n3GHPHv7/ftOwYs+YRIKf0vvQh6tNKhQU9IHL0AghQFM0S1wQSKgpew/PJN9qGTL4QvAtrvDFvgmpuNX779jCWikE24ZRPZsFquZV8tmJ+8AxB5G+Uqfe68mAzI10GVgEh+SJdSTloDMlitSmCyjngGDRch0FDZwXJQvX8Z3TNgaztZrL4m7wcG+vv6ByUPv4rhXpvKb31RFHRA5bP1zEZetLa4M4d X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(136003)(39860400002)(346002)(396003)(38350700002)(26005)(186003)(38100700002)(66556008)(52116002)(5660300002)(956004)(4326008)(8676002)(66946007)(8936002)(316002)(86362001)(83380400001)(6666004)(66476007)(7416002)(6506007)(6512007)(2906002)(9686003)(478600001)(2616005)(16526019)(6486002)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: MpBH8tf/9/ZhtAib4Zn2DfHk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1ktfYtqG/v6++Np1K923jUCkPPIwYLqTdFyZOvkILWBNxzbFVr88yyncDQhBPT0QjAuW8rqYHgcU9A0KsfQzG2PLs1SUM0CCFYqx1/bUhhbQzWmMLAZDl/2uYheq6FP0OV/F4exVuNiF34W85wvWj49npAhC37BgEsBJyILQkL+Ucx+KcbF8Ugp/wmzCaY7pK6HT8YbWB8hBHG+0ZjlVc1YQzv1xhHRuLTQjEJh+MqQxrS6P0 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cafafef-dc2a-4276-ed24-08d9046e3ab2 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2021 02:36:13.0552 (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: LLIix+yqbv7ooD4DLWlRsIWSTXVE4wJm+N81tYkX/FjVPshwlbMMudV8Ex+gyJpVkjb/B/VOGfbapPamEiTIoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8313 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210420_193621_720755_B923600B X-CRM114-Status: GOOD ( 16.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
remoteproc: imx_rproc: support i.MX7ULP/8MN/8MP
|
expand
|
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 6289aeae95b6..e9d9860e4fce 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -590,6 +590,35 @@ static int imx_rproc_detect_mode(struct imx_rproc *priv) return 0; } +static int imx_rproc_clk_enable(struct imx_rproc *priv) +{ + const struct imx_rproc_dcfg *dcfg = priv->dcfg; + struct device *dev = priv->dev; + int ret; + + /* Remote core is not under control of Linux */ + if (dcfg->method == IMX_RPROC_NONE) + return 0; + + priv->clk = devm_clk_get(dev, NULL); + if (IS_ERR(priv->clk)) { + dev_err(dev, "Failed to get clock\n"); + return PTR_ERR(priv->clk); + } + + /* + * clk for M4 block including memory. Should be + * enabled before .start for FW transfer. + */ + ret = clk_prepare_enable(priv->clk); + if (ret) { + dev_err(dev, "Failed to enable clock\n"); + return ret; + } + + return 0; +} + static int imx_rproc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -648,22 +677,9 @@ static int imx_rproc_probe(struct platform_device *pdev) if (ret) goto err_put_mbox; - priv->clk = devm_clk_get(dev, NULL); - if (IS_ERR(priv->clk)) { - dev_err(dev, "Failed to get clock\n"); - ret = PTR_ERR(priv->clk); - goto err_put_mbox; - } - - /* - * clk for M4 block including memory. Should be - * enabled before .start for FW transfer. - */ - ret = clk_prepare_enable(priv->clk); - if (ret) { - dev_err(&rproc->dev, "Failed to enable clock\n"); + ret = imx_rproc_clk_enable(priv); + if (ret) goto err_put_mbox; - } INIT_WORK(&priv->rproc_work, imx_rproc_vq_work);