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: 9138727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E02C76075C for ; Fri, 27 May 2016 16:15:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D016227CEC for ; Fri, 27 May 2016 16:15:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C490B28160; Fri, 27 May 2016 16:15:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AA0D127CEC for ; Fri, 27 May 2016 16:15:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b6KOc-0006dY-6Y; Fri, 27 May 2016 16:13:58 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b6KOY-0006b8-Kq for linux-arm-kernel@lists.infradead.org; Fri, 27 May 2016 16:13:55 +0000 Received: by mail-wm0-x22a.google.com with SMTP id a136so79974887wme.0 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=VHPkvzhAeOQ75gfLqxsPMMQCVnH81Cg2NkViR6BjvwNLCTna6B9mIOc7LFHJ/cS7cJ gM5NxvEZQunY7Pklvw1SYfX1OlwlMu9o6PBs6YdoCHiwEUErgdqVGkkMfS8FEHL5enPM BcTvLNgUEVpc0a07lb/PaXZz1dSOg6syAI73hmYYuUTwuaRpGgD0t81bgRRCYLJF9het Jji5+d2Yl1OCgiC6xwYpZMUEtm5JZmJb3/lnBNRdjHyGsFMhaATcsY4P3TKQBlYN5+7N M7SZhPz8yDA7aIS0MVRsc3OWxQPnh9ex1LwTjbQUUR7+N7s7LaeeBpaz8uc5huE1PZ8+ 7JTQ== X-Gm-Message-State: ALyK8tI1PvvE/9yXurjzJUtALljQ7765ZrqxdKAdc8J8IT2t32BsRczCM086Z1EfRgbQB3Oe 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 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160527_091354_841799_AA070B43 X-CRM114-Status: GOOD ( 16.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ohad@wizery.com, devicetree@vger.kernel.org, arnd@arndb.de, vinod.koul@intel.com, srinivas.kandagatla@gmail.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, dmaengine@vger.kernel.org, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org, maxime.coquelin@st.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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);