Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1054020ybk; Wed, 13 May 2020 22:09:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU96G/uJGaDxqA6Nmt3kjIqhrPRM/8U/z5ecpn0sKcsnxxaCQjbyalcjYl08oGA+rkiE8p X-Received: by 2002:a05:6402:128f:: with SMTP id w15mr735554edv.203.1589432959570; Wed, 13 May 2020 22:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589432959; cv=none; d=google.com; s=arc-20160816; b=LMM4xKwXvtcincjiQnCuAFnhdsiv90k/krEwn8xDcNvY1rl9tMebLxgfPuAucg6P39 JKJcRtToPRQOuCb0p5JyvoGqPJY+3RhGjFpvV/pZYWseb8ltx4aEGbWf44cS0WtVFMSU kmeWjoAtqe0TIR75PfJmrkjZhanvl2cXqMcNfD2lnWbZFdj82LRdqJYxA37mWqpEk+Bc tXk4kdZIbXQFX42IDCj2jgms/ZJrVUUaB2KPubvneyeXJ5kqBctcVyyyfcs64YwtLuzr kOCHY6uk+VCyFlQxPpVUCuv6NMngSU1ZGfd2EY+CyVPsZJfzatfFbnWoFANr8F32gcRs AQgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Tj3wTZtbDhnHZV3JGD+uPMkyVs4DjgIgPsF9FB8nJ8k=; b=zzyP4CHE2gbysHVB//wbLMedvf/VT5AQ1+3y8d3qqikjymfpYu5e/pokHFG+z6Jkok VzfGIQzFs3pjdNHtyF2EI1U+tdwmVdRkT/h8aeHUGLnyKRDGxNmZbmn3Q/n4PZGgaBWe 6Njdi6ht4qesrEJVEn8h9YpmYwijPYHlTGslRINFQEj1FzlJj+IVVeDm2d+3nMxO7eHZ BGkAxTj2x9qE2tzxwKKX9jSBhRWzGvAmUNjnGkW5IOIApQGs6KezvuC+HTYS5a43riFG u3wjk8kZC9AE8sx4llFs0YJmjY6q+RcH2C1SSHbHxS979wfbaKHzVKQyMY7cCTI0dMix HiVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Es7gB+V2; 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 dn10si1452715ejc.89.2020.05.13.22.08.57; Wed, 13 May 2020 22:09:19 -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=Es7gB+V2; 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 S1726037AbgENFFF (ORCPT + 99 others); Thu, 14 May 2020 01:05:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725838AbgENFFF (ORCPT ); Thu, 14 May 2020 01:05:05 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AEC5C061A0E for ; Wed, 13 May 2020 22:05:05 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id t9so12069027pjw.0 for ; Wed, 13 May 2020 22:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Tj3wTZtbDhnHZV3JGD+uPMkyVs4DjgIgPsF9FB8nJ8k=; b=Es7gB+V2iRrBdGZENlfFP7ZPj71j6sUTsS8b5RJjQMyycpeN/dRq6+h1KC46rIh+dG e+y1nzHg3jqoLQh7i8c5I4c9EYPm60CBZJrrgjhCe2uf7IU1sulmF1wC1vnocmblc9Tl llsaiwqDsP0oYe1Rus7kOj4t2oH3xU3fVf2P3bU5JdHVmu0y0qBPea8bJhn/p14vdYNK yBxV1rVd/BEV1c2WW0RVMFcX92t/U5FnflbXkSTm0Q35KHD/6iqB7pVnOGvM8n9UJpGc +G1BKArwMEdLVLpJHsocK6RDgotJXXtlrWu/t2mFUIrTt90g9axtbXaRVvbFAZz9l5ye X7nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Tj3wTZtbDhnHZV3JGD+uPMkyVs4DjgIgPsF9FB8nJ8k=; b=lcwE+btGct+pKyipzeM2FaatRb0W8lsV7zDUWE743SlHpIFwqOpDc6sMRBqLrhuJiJ BeIIXxAKJ8O1Ng59MHps/wNwIIAH03QhCvEiI9ScbU0HNUS1zBF0LmnlRYhMmJHp4tj3 8Tbdjo3TQIokM9+mV4HUFI1+83XVOSTh3ftH1Tg71POlOAiZ6kO6CxGStitJkPMWibdb /ShX+cQwQsa0eeiZDgcrZVbyzUMeGWuhjaxrSVErCC2RhIF4NoPX1qid66C7Eu8XTLOp hSvuuUzDrZ6uHSyN+LUKOyETaQM8KPGiCAD9knkxEnfcv1p/E1lB/2Vu4uK+srVgWhsY Ss+w== X-Gm-Message-State: AOAM531wnOYfA/shzeCQsjrzT75CLY5qScJcfm/7Q7hN1p/z3MAnmhyA X6xAMNyy/v2wD6qKWZj67mf9kA== X-Received: by 2002:a17:90a:c201:: with SMTP id e1mr5391158pjt.162.1589432704717; Wed, 13 May 2020 22:05:04 -0700 (PDT) Received: from builder.lan (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id 1sm1059453pgy.77.2020.05.13.22.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 22:05:04 -0700 (PDT) Date: Wed, 13 May 2020 22:03:33 -0700 From: Bjorn Andersson To: Mathieu Poirier Cc: ohad@wizery.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, loic.pallardy@st.com, arnaud.pouliquen@st.com, linux-remoteproc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 05/12] remoteproc: stm32: Parse syscon that will manage M4 synchronisation Message-ID: <20200514050333.GK16107@builder.lan> References: <20200424202505.29562-1-mathieu.poirier@linaro.org> <20200424202505.29562-6-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200424202505.29562-6-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 24 Apr 13:24 PDT 2020, Mathieu Poirier wrote: > Get from the DT the syncon to probe the state of the remote processor > and the location of the resource table. > > Mainly based on the work published by Arnaud Pouliquen [1]. > > [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 > > Signed-off-by: Mathieu Poirier > Reviewed-by: Loic Pallardy Reviewed-by: Bjorn Andersson > --- > drivers/remoteproc/stm32_rproc.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c > index 658439d4b00a..a285f338bed8 100644 > --- a/drivers/remoteproc/stm32_rproc.c > +++ b/drivers/remoteproc/stm32_rproc.c > @@ -70,6 +70,8 @@ struct stm32_rproc { > struct reset_control *rst; > struct stm32_syscon hold_boot; > struct stm32_syscon pdds; > + struct stm32_syscon m4_state; > + struct stm32_syscon rsctbl; > int wdg_irq; > u32 nb_rmems; > struct stm32_rproc_mem *rmems; > @@ -606,6 +608,30 @@ static int stm32_rproc_parse_dt(struct platform_device *pdev, > > *auto_boot = of_property_read_bool(np, "st,auto-boot"); > > + /* > + * See if we can check the M4 status, i.e if it was started > + * from the boot loader or not. > + */ > + err = stm32_rproc_get_syscon(np, "st,syscfg-m4-state", > + &ddata->m4_state); > + if (err) { > + /* remember this */ > + ddata->m4_state.map = NULL; > + /* no coprocessor state syscon (optional) */ > + dev_warn(dev, "m4 state not supported\n"); > + > + /* no need to go further */ > + return 0; > + } > + > + /* See if we can get the resource table */ > + err = stm32_rproc_get_syscon(np, "st,syscfg-rsc-tbl", > + &ddata->rsctbl); > + if (err) { > + /* no rsc table syscon (optional) */ > + dev_warn(dev, "rsc tbl syscon not supported\n"); > + } > + > return 0; > } > > -- > 2.20.1 >