Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp11357ybt; Tue, 7 Jul 2020 14:35:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkfbv+PvcMtgCNDQWSTlgVW8x6wnAs9btliH8jTv5pI6ggzxF4gjoEQkl7NOMbVCl1dY3t X-Received: by 2002:a05:6402:1250:: with SMTP id l16mr64733955edw.362.1594157757525; Tue, 07 Jul 2020 14:35:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594157757; cv=none; d=google.com; s=arc-20160816; b=zT2/52ymhYHx4xDtKf60qP0ZV65llNUZR6JiHb23NRLaEB9oHXDdwnMHuKMh5DZc+h D1NOUZGcC3vGDvTjtFj5Q2cNuVgC3RU1GwObjQHyF2UEqwq4DSTU3kkUyr9WoumLSb9F g+vlCLv7VLw3gIfljuFejHxIAyZ1r2BzL1T7i3zrPmpO3uYik17SZsrBBJDe4b1+mbIA QvErmWQrTb0Xp2PQYprcNAAmgQfSySkMNqDGMDLPFz9P5J748uVlVbZVbBDMI3+ToZLM ZJMBmFWzg2PEansKoKdXiOa1L1iaVpPsJsxo4swi9yz6tKbtv1etmGmiHXvxiQKhOiza D9dA== 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=lQhzo+O1buFhpWsM2ZGXyJbT4V1EQMXosfGPGBckUmfDiyfzW9b5k6sbLdC73BoXYy MFBvoJlM6kAt8EMA8L8/wTHrsVTDhnsjSxwgfcgN4C9jJMJHaKe2joU/XvW3I/dk3AbJ VaK1l0f/2L2bRc08PRz2Xpb9YOBQ52b3H36Wsb8TbIPvlJA6iwWPnwFfSRLN86hfd0/L KNIAKNFwqnAqqPMU/QfLpNDSf+pLu8Ly+z2wBiuEG1Uxd/o1J/+1IRdBy3TxAwEOLm9N E4BgraZYlHWLOwocnVetY88ItgN9BeKEiwIgektKt+Rauu7AKDZphN1hxctxLMRZt8Gy WSWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EYA+6vGb; 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 h22si16380152ejf.599.2020.07.07.14.35.34; Tue, 07 Jul 2020 14:35:57 -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=EYA+6vGb; 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 S1729282AbgGGVbW (ORCPT + 99 others); Tue, 7 Jul 2020 17:31:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729281AbgGGVbU (ORCPT ); Tue, 7 Jul 2020 17:31:20 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A2A9C061755 for ; Tue, 7 Jul 2020 14:31:20 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id p3so20602629pgh.3 for ; Tue, 07 Jul 2020 14:31:20 -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=EYA+6vGb/dMe9sd7/qMvUrBIuiCU2hyLidvuwJvMVTaVq7cJfuCekg36Ms2kRMi08U 6yXLvuXAolskKfdtO1Kut8RhdLL5mPrSSkRzXdDo8V6v03M/b2a8sTYMy+zeHW4x+XNx A1RJ+1yVSpdbDPAFSUYJuDofNh3IrjQF0YAhPGrxQeJzyj6KYzz9J01cNkW1FIfEOq2B ZfT/JtOeRUnX94GOiiFdR2XOHVHfcCG5ApyDEh4q77/HJiNqgNK3Ik+9Cl3N2HiwPKXR aHl1WOcih1ambPW3OyrNmvKYprl1TgbNrDbwJXCIthofRqHwGqHD2W/Ofyb9O3kKsd+T WN2w== 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=mjWQIMUplw0guK56BDXSraJ4aikdhBZtTtzIAQpDspxkaqWXdPvnN6tIZFGmtzpkyh DdsJhry2ZhyxuPBwppWR9uZVP9l6qZ/CCxnHCkT3VA7o7T6a/VehpdmDncty62A6M+PB zlhsM4TGg6VfiQHe2a1kv6A8qCoZUXXQxN3ci3uAr0XkCpe9K+PA7Lw1yW6T0V1i5B8n aHVlJlpdNa8Yy94NWZEAX+l2ny+FgQ7bAZpQKOU48JSYLGGqfPiHBl28h9oepehEFZ40 k1Pu9tbg5V5EgduBZ8/Yy5k/JyF06mBKS9Jp18sAlI1NAjRR1WzbPtkR26IiZP5oMCpi 3SXQ== X-Gm-Message-State: AOAM531Zh0/JxzcUXn5QARRi4Lt/nYd2oiXU54wyrtKMVBlRh30W4izq mj7Y+Q338q1JsotQdZsqsTGj0Q== X-Received: by 2002:a63:8c10:: with SMTP id m16mr47225696pgd.149.1594157479588; Tue, 07 Jul 2020 14:31:19 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id o128sm23560832pfg.127.2020.07.07.14.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 14:31:19 -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 v5 04/11] remoteproc: stm32: Remove memory translation from DT parsing Date: Tue, 7 Jul 2020 15:31:05 -0600 Message-Id: <20200707213112.928383-5-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200707213112.928383-1-mathieu.poirier@linaro.org> References: <20200707213112.928383-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