Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2011710ybh; Tue, 14 Jul 2020 13:07:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5BKBDDfXJmCo13aD1Q7yKyG+loXRKn7FqxW8VKMGS23Cc8+fQGQtlrkA6ppQ7FBTUp60f X-Received: by 2002:a17:906:410a:: with SMTP id j10mr6161732ejk.201.1594757232870; Tue, 14 Jul 2020 13:07:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594757232; cv=none; d=google.com; s=arc-20160816; b=T1QS9FRQS1TBb2z778LRWBtZbBHivO8rhIHucnoBe9WKpgjxNi5kTP1+lytofO8UKW O9jNM4JmkNPO4jPZU73r90wn/8l9j1l4XRAs8Cb8CZPTmOd8axBtTBtJgjCrz2MYWFOq LDgMpCRm71o2E1RhQ+V8hRXvIOPbzHf774FayG0MeUuqfRHYk4LJ7HyOx4tXUbQ5Y2/2 E4S4pyNKyi6KBtPdQc9m5uf4jV14LBDHG4qGP8qKZLkf8U5GBS5LkbcwWkfcfnwCOJPd OrY2PEXsoz0GAYUhPiuCHfbl2sW6qXTcCpBrfR6bGepMH0evIUeqi7lFBXtdYPNTc8Rb CXFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lt6hUGBu1W7gsJ62+tKE3hemun/1WgbhEsuA1Og1vF8=; b=y2AiQ1t3thw4hL6GfFRdFRTBJLnrvvl498/ew20oDwz8EGbs7/F/YiZfYSoC/K3wsj A6R4GQecxXM8ge8V+ADHfp6/IZkaF8od4H1OPuCsE22TW1e3Y5OxzyaLMj9YAzqMPX1v kdMnaD7/SGBUn7knbtehyoxPy3B81mj9IxgAgp7kkq21zcNTJV2tzX8hUaE/Jth1VeXy AaJpSx9o+EpWgxvyAYcXgG+eNGyQI00SWJgA/Stx/t5ImBL/eCENyTieg1APDzGHf+bT xEXgdpjDUiiOZkuJRhBWCkhO+WS8jqq7W60M038+bOoll+0yQ8qXTT8daMCa4vL6ux+U GKXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z0Qfzvcu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la26si10759235ejb.587.2020.07.14.13.06.49; Tue, 14 Jul 2020 13:07:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z0Qfzvcu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729952AbgGNUEz (ORCPT + 99 others); Tue, 14 Jul 2020 16:04:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729874AbgGNUEx (ORCPT ); Tue, 14 Jul 2020 16:04:53 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D5CEC061794 for ; Tue, 14 Jul 2020 13:04:53 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id q17so8036404pfu.8 for ; Tue, 14 Jul 2020 13:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lt6hUGBu1W7gsJ62+tKE3hemun/1WgbhEsuA1Og1vF8=; b=z0QfzvcuY8UXpEMaWd0eYrnoexDsWkEkaUr1ko+xuaYhkXow4CV0zu9U/tVxsgMzHs rKsB25o67wL+CYAXzhh4j3OVlTXaOLqZkOq9NTO5k+usChXYc+AbA/4RkSbHU2vAGcvs 1DsudTiGZpMlrZEeBILbFSqa3dLVSgBmmNODhRtdVRBd7JbbslLNwqSFfeWBGo6cal+2 cNfnYjH1BLLYZhF3xezF9OheQvF5XQ5qAMJeaSpqDKRxsdWu0Dmc3OO6zr/JmObUovLp bRzbavVxlWZjhj57NoeSjNZXMt35fPeaGU1dQc7ny++7Pk2mriTJU4id633LLAAMkS5i Q5cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lt6hUGBu1W7gsJ62+tKE3hemun/1WgbhEsuA1Og1vF8=; b=C4x4aA230lxoaIZV+IfEr7VGrnlGjJP7N6aRA/2eyUKTF6birSaXpTJrKX7+Y10YMT +NHNzKjAUxeBvVDaTpIk0sks2lC/WDAu71DJ5Ifb5OT3thy+ALH6RPq3JSCioKqw9UPW SyFDkXbkLORgBPrjzJeFV8sqQnDPEpeaj2lXbplhfJvqE4cV7r7FG4pJS4E2Pwj97OFr ygAGYwwIcD2AAREce8tKkckK6+boFjlvPjCSlNVwkt3YjGB7BqTM2i4dI5A3EVqXgd3t GAn26pBoVgTVqzU4fBSiK/u1dSi1fIvPIXTIbaJYFloOyrxTWwjkBk/df5K6SmHuxiWW LxvQ== X-Gm-Message-State: AOAM5335BnpDMHmBAr1bx8PA8Wo3Mgah2sURBkoij+Qu8biFzNzk98lH tDx8mRb3SQr+aj1D5eQvytEvSQ== X-Received: by 2002:a63:3ece:: with SMTP id l197mr4751414pga.313.1594757093193; Tue, 14 Jul 2020 13:04:53 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id t13sm3262959pjs.17.2020.07.14.13.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 13:04:52 -0700 (PDT) From: Mathieu Poirier To: ohad@wizery.com, bjorn.andersson@linaro.org, loic.pallardy@st.com, arnaud.pouliquen@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v6 04/11] remoteproc: stm32: Remove memory translation from DT parsing Date: Tue, 14 Jul 2020 14:04:38 -0600 Message-Id: <20200714200445.1427257-5-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200714200445.1427257-1-mathieu.poirier@linaro.org> References: <20200714200445.1427257-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Other than one has to be done after the other, there is no correlation between memory translation and DT parsing. As such move function stm32_rproc_of_memory_translations() to stm32_rproc_probe() so that stm32_rproc_parse_dt() can be extended to look for attach bindings in a clean way. Signed-off-by: Mathieu Poirier Reviewed-by: Loic Pallardy Reviewed-by: Bjorn Andersson --- drivers/remoteproc/stm32_rproc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index cbba995a80a2..986f34a336a7 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -607,7 +607,7 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev, *auto_boot = of_property_read_bool(np, "st,auto-boot"); - return stm32_rproc_of_memory_translations(pdev, ddata); + return 0; } static int stm32_rproc_probe(struct platform_device *pdev) @@ -634,6 +634,10 @@ static int stm32_rproc_probe(struct platform_device *pdev) if (ret) goto free_rproc; + ret = stm32_rproc_of_memory_translations(pdev, ddata); + if (ret) + goto free_rproc; + rproc->has_iommu = false; ddata->workqueue = create_workqueue(dev_name(dev)); if (!ddata->workqueue) { -- 2.25.1