From patchwork Fri May 27 16:13:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 68774 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp176099qge; Fri, 27 May 2016 09:13:36 -0700 (PDT) X-Received: by 10.98.152.66 with SMTP id q63mr23771682pfd.38.1464365616728; Fri, 27 May 2016 09:13:36 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rb3si29200875pab.89.2016.05.27.09.13.36; Fri, 27 May 2016 09:13:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751307AbcE0QNf (ORCPT + 7 others); Fri, 27 May 2016 12:13:35 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36209 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753187AbcE0QNd (ORCPT ); Fri, 27 May 2016 12:13:33 -0400 Received: by mail-wm0-f50.google.com with SMTP id n129so279988019wmn.1 for ; Fri, 27 May 2016 09:13:33 -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:user-agent; bh=IHze0TW1xQRZ7Vml9LqwXqO/5CrYFjMG9144VBEffH4=; b=HL1tndwSxiax3uVDwM5j9aTu96fGe6nLKSMQ4vnLgvt8/uYuxe9ilPIJphHewJINu6 7dat4kV69MdHohn0XZhF6u0yna4k3nkX8lZM0pQ91SKJjaFGQdcaO7v2SvWu20cgNfrc 8On9gjbP2gd+hcGMvZv86850z/XqSgacEBu64= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IHze0TW1xQRZ7Vml9LqwXqO/5CrYFjMG9144VBEffH4=; b=Zw7ViXivvnI7B7PNAB1WVh61GexB/au9LWMyaDcYFNtYGkrwL4IVgiAo16M+PQ58Km QgPyi+PuvXQYHxTwK+iFdCyhSGBFiC+LJwnTuCfaXMpvKtu+/cHWcu+DznwVcOxjjkzu NGhd6R3T0VTgsB4AbKBfhmND89shBowXrPKzfz1586FPM/yZ2/nUhcEor0sLgbQ8OQpq NjG07Hbs/bNqvAbeE6awA87jIhjBPQ+N2xHu3hDISuPXvHe/qsfiz0E7p66TjKDcxYJp X3KTiGA2WMfYZXm33xcCBFvcm/ny3vY1TqnG8q1sTiz0s94UBQcVl3XOpgbhpO0FLc5f W6hg== X-Gm-Message-State: ALyK8tJKH5FnXSWIcz/3YeFD0AO+/uTKAjDjGcL3UMRknB7kWEMwyhh5BW2Ng4Vz70a0HtRa X-Received: by 10.194.201.97 with SMTP id jz1mr15202633wjc.44.1464365612254; Fri, 27 May 2016 09:13:32 -0700 (PDT) Received: from griffinp-ThinkPad-X1-Carbon-2nd (cpc84731-aztw28-2-0-cust112.18-1.cable.virginm.net. [82.37.67.113]) by smtp.gmail.com with ESMTPSA id g192sm6971596wme.15.2016.05.27.09.13.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 May 2016 09:13:31 -0700 (PDT) Date: Fri, 27 May 2016 17:13:29 +0100 From: Peter Griffin To: Patrice Chotard Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, srinivas.kandagatla@gmail.com, maxime.coquelin@st.com, vinod.koul@intel.com, ohad@wizery.com, bjorn.andersson@linaro.org, arnd@arndb.de, lee.jones@linaro.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-remoteproc@vger.kernel.org Subject: Re: [PATCH v4 01/18] remoteproc: st_xp70_rproc: add a xp70 slimcore rproc driver Message-ID: <20160527161329.GA29319@griffinp-ThinkPad-X1-Carbon-2nd> References: <1464192412-16386-1-git-send-email-peter.griffin@linaro.org> <1464192412-16386-3-git-send-email-peter.griffin@linaro.org> <57484867.6030608@st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <57484867.6030608@st.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Patrice, On Fri, 27 May 2016, Patrice Chotard wrote: > >+struct rproc *xp70_rproc_alloc(struct platform_device *pdev, char *fw_name); > >+void xp70_rproc_put(struct st_xp70_rproc *xp70_rproc); > >+ > >+#endif > > Hi Peter > > Applying this series on top of v4.6 kernel leads to the following > compilation error due to patch 01/18 : > > drivers/remoteproc/st_xp70_rproc.c: In function 'xp70_rproc_alloc': > drivers/remoteproc/st_xp70_rproc.c:291:2: error: implicit > declaration of function 'rproc_get_elf_ops' > [-Werror=implicit-function-declaration] > elf_ops = rproc_get_elf_ops(); > ^ > LD [M] drivers/remoteproc/remoteproc.o Whoops. Looks like I forgot to include the first patch of the series. Doh! I will include it when I send v5. The missing patch looks like this. Bjorn do you have any issues with adding this interface? regards, Peter. >From 4664bb628cb5c99a43976a0b74ae1ee6cb05a68e Mon Sep 17 00:00:00 2001 From: Peter Griffin Date: Wed, 25 May 2016 09:54:02 +0100 Subject: [PATCH 01/19] remoteproc: add a rproc_get_elf_ops interface This allows us to re-use some of the generic fw_ops such as rproc_elf_sanity_check() and rproc_elf_load_segments() whilst overriding some of the others with our own implementation. Signed-off-by: Peter Griffin --- drivers/remoteproc/remoteproc_elf_loader.c | 6 ++++++ include/linux/remoteproc.h | 2 ++ 2 files changed, 8 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index ce283a5..a3e06df 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -335,3 +335,9 @@ const struct rproc_fw_ops rproc_elf_fw_ops = { .sanity_check = rproc_elf_sanity_check, .get_boot_addr = rproc_elf_get_boot_addr }; + +const struct rproc_fw_ops *rproc_get_elf_ops(void) +{ + return &rproc_elf_fw_ops; +} +EXPORT_SYMBOL_GPL(rproc_get_elf_ops); diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 9c4e138..b0b06c8 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -495,6 +495,8 @@ int rproc_boot(struct rproc *rproc); void rproc_shutdown(struct rproc *rproc); void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type); +const struct rproc_fw_ops *rproc_get_elf_ops(void); + static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) { return container_of(vdev, struct rproc_vdev, vdev);