Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp151076ybz; Fri, 24 Apr 2020 13:27:22 -0700 (PDT) X-Google-Smtp-Source: APiQypLtXMB9lhiRVNbQrpP8Vlf09AMx6ukIuBuOs/ZdSpqv+8wisEEw/obXeKNM9jESG0GmnJQp X-Received: by 2002:a50:fc82:: with SMTP id f2mr8515951edq.38.1587760042648; Fri, 24 Apr 2020 13:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587760042; cv=none; d=google.com; s=arc-20160816; b=ZBa+i4Z/tCwqnboTpdocqk1Nj2nIwLO/sFrazAlQdlXbysbrLS92YjicVXsUkQqxQ2 9VkVn70t2wlDEYZkW4ZLc3hh5I40dpXCe8NLfwurKN5IPliAdP+e74t7mY6pjqYnwW/P w2ezjkT3e0YOF+YlFPStn2cSS4gffVm5XthblFK0HWLYqbIHyJY+Pb1xVfiiq+IACdcH IsETaWcpMEVXB5lzMgX+IP+856g6+LHv7Pw7wxAW6ok6Y9bnkoPLCZJvsQHRayMKx+JL r+Fwx0gn8zw5ovlAvWnZb9wAQs9GTBy94EcwjZF4lAsde1OnjufhpLaTJyh1iaTxRRzV CbOQ== 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=Zs8zqxSLmCFU6lZYzSjBYa2nEV+/JbKTSnr0oNB1H9M=; b=DERrsNsrWF/iLBCwa1X21OxOsVLZm0qFb0Avc/pLO/8JSPvCCiNCEMZqM9qoNzYbb3 sjx2l9O/otODcPsY3kC1uLOzXKFRdTXYqQMWLamnTB6Hua5+Y/wqWpEHT2z57g16Di3u 0ZzWO5AFecCZpA3c1XnXbV4wkmWUkO7HRqmEgqAScz4Csw9zdZE6QuRe+vkhMAJXWZRo n06vvl4IfvUMbszknMnjOY7BCBojXEZoRxwLCwMOd3OieQaWMRcI2cQESKrI18fYC4JR yMs53S1EuHTseKSNfx8DEY3pCF9GWupOyUZcqZo6yLEq2pZ0BxBgavLokqld6fg9FGTD FZpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OBm+YaG5; 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 y9si3679080edr.281.2020.04.24.13.26.58; Fri, 24 Apr 2020 13:27:22 -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=OBm+YaG5; 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 S1729564AbgDXUZX (ORCPT + 99 others); Fri, 24 Apr 2020 16:25:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729555AbgDXUZV (ORCPT ); Fri, 24 Apr 2020 16:25:21 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F70BC09B04A for ; Fri, 24 Apr 2020 13:25:20 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id d24so4153044pll.8 for ; Fri, 24 Apr 2020 13:25: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=Zs8zqxSLmCFU6lZYzSjBYa2nEV+/JbKTSnr0oNB1H9M=; b=OBm+YaG5e7Hf79gRnIDBZNaKsh8b7ZMTm3+BICnzVBFchzziucaX2vdz1Hv2U4wWWp EcT/3bMOuXUFNAWq5WKuengPx+5y2fcGvHKhTvEZzrMcAp9+kNgx8ULtRQaj1VsNvOpQ qj2Yrg8Vn3xU5CSUU+C/M0KviqQ0YKH++EEcCiL3V5CUSo5gfl6Zuwp+cdPpX1BkMt1+ BCTEf18ioZntEnAvgClbjfDXsHKPgGNrXVRhyrUUGe3RotINDtjIgWezMoHtIKkprwEm 52k/IRykm18cYzv6tyXkxGpk0acftWHy4zSTQ2/lKYv3MiF+lIksGYegWWlFFILFYXqk pNEw== 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=Zs8zqxSLmCFU6lZYzSjBYa2nEV+/JbKTSnr0oNB1H9M=; b=OeC8Angcro9PWjdizbCoTq9YGOfVO8bs+3RVOkyw+Cb0kL/oJ5E8SQxr+9tugVvFPn 3d2YNa5QBZuhkIEEPUmM+K942z+9cm8m68I5Ltj40slDrJPF0TQ2Kh92PKb7QPkByQ8Z mo0+4H9qvrvZQHPCpdYKlG++IRHOS0nlhINoNBpm3P76D2T9ip4EiUTEqssh0T10YHhd X6gKq1tbHeDAqSVot2BgEvwNhpp/XccrvxTHG53u+D0CNE0PxCEe8aVQ28STjsNl+DQl X9ttlwWY5Lw5tnBjk2f7xlpZNe//f9nas5i74OzajN6KD8AB1byUS+JVDAkxwmp8yJEY nLww== X-Gm-Message-State: AGi0PuYeKOvzJunxdtQ++TzG9YjJr00yqu7lzs45wcMy7iZRC5Ox42NK IUADwwIQmyB9H2ufvi6j4jrX/A== X-Received: by 2002:a17:90a:82:: with SMTP id a2mr8752961pja.47.1587759920159; Fri, 24 Apr 2020 13:25:20 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id c1sm6553245pfc.94.2020.04.24.13.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Apr 2020 13:25:19 -0700 (PDT) From: Mathieu Poirier To: bjorn.andersson@linaro.org, ohad@wizery.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com Cc: 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: [PATCH v2 11/12] remoteproc: stm32: Introduce new loaded rsc ops for synchronisation Date: Fri, 24 Apr 2020 14:25:04 -0600 Message-Id: <20200424202505.29562-12-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200424202505.29562-1-mathieu.poirier@linaro.org> References: <20200424202505.29562-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 Introduce new elf find loaded resource table rproc_ops functions to be used when synchonising with an MCU. 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 --- drivers/remoteproc/stm32_rproc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index b8ae8aed5585..dcae6103e3df 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -319,6 +319,15 @@ static int stm32_rproc_sync_parse_fw(struct rproc *rproc, return stm32_rproc_sync_elf_load_rsc_table(rproc, fw); } +static struct resource_table * +stm32_rproc_sync_elf_find_loaded_rsc_table(struct rproc *rproc, + const struct firmware *fw) +{ + struct stm32_rproc *ddata = rproc->priv; + + return (struct resource_table *)ddata->rsc_va; +} + static irqreturn_t stm32_rproc_wdg(int irq, void *data) { struct platform_device *pdev = data; @@ -593,6 +602,7 @@ static __maybe_unused struct rproc_ops st_rproc_sync_ops = { .start = stm32_rproc_sync_start, .stop = stm32_rproc_stop, .parse_fw = stm32_rproc_sync_parse_fw, + .find_loaded_rsc_table = stm32_rproc_sync_elf_find_loaded_rsc_table, }; static const struct of_device_id stm32_rproc_match[] = { -- 2.20.1