From patchwork Tue Nov 14 10:53:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan Ramabadhran X-Patchwork-Id: 10057327 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 996546023A for ; Tue, 14 Nov 2017 10:53:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92CC3293F9 for ; Tue, 14 Nov 2017 10:53:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87B4529410; Tue, 14 Nov 2017 10:53:58 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6693A293F9 for ; Tue, 14 Nov 2017 10:53:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754174AbdKNKxv (ORCPT ); Tue, 14 Nov 2017 05:53:51 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:44294 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753743AbdKNKxg (ORCPT ); Tue, 14 Nov 2017 05:53:36 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E711F60719; Tue, 14 Nov 2017 10:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510656815; bh=fWEBk6XbvB+AwA2wmAS4M45ZxIKsvFC2ouusZUHd8+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IL78HSZnafeC99f5kgR+vzndULIWjGfZYBNYgReH82ypn64SLyZziSyAkru6i8tP5 4eLvWjucfrdPQBj43sp4WCVLDB4HeyqzJFt4g2usOZpiuwQLPsZHmWeCZICrZ8IckQ twPuW1xUSC3WXWlSXtn+KGR7LNQFOCdDDuMJSrb8= Received: from srichara-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sricharan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3D41C6084F; Tue, 14 Nov 2017 10:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510656815; bh=fWEBk6XbvB+AwA2wmAS4M45ZxIKsvFC2ouusZUHd8+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IL78HSZnafeC99f5kgR+vzndULIWjGfZYBNYgReH82ypn64SLyZziSyAkru6i8tP5 4eLvWjucfrdPQBj43sp4WCVLDB4HeyqzJFt4g2usOZpiuwQLPsZHmWeCZICrZ8IckQ twPuW1xUSC3WXWlSXtn+KGR7LNQFOCdDDuMJSrb8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3D41C6084F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sricharan@codeaurora.org From: Sricharan R To: bjorn.andersson@linaro.org, ohad@wizery.com, robh+dt@kernel.org, mark.rutland@arm.com, andy.gross@linaro.org, david.brown@linaro.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org Cc: sricharan@codeaurora.org Subject: [PATCH v5 2/6] remoteproc: Export rproc_elf_get_boot_addr Date: Tue, 14 Nov 2017 16:23:10 +0530 Message-Id: <1510656794-3815-3-git-send-email-sricharan@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1510656794-3815-1-git-send-email-sricharan@codeaurora.org> References: <1510656794-3815-1-git-send-email-sricharan@codeaurora.org> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Export rproc_elf_get_boot_addr so that it can be used by any remoteproc to get the bootaddr of the elf type firmware images. This is used in the subsequent patch by the q6v5 based remoteproc while loading its elf based mdt type image. Signed-off-by: Sricharan R --- drivers/remoteproc/remoteproc_elf_loader.c | 2 +- drivers/remoteproc/remoteproc_internal.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index c523983..f6d07d9 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -110,13 +110,13 @@ * Note that the boot address is not a configurable property of all remote * processors. Some will always boot at a specific hard-coded address. */ -static u32 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw) { struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data; return ehdr->e_entry; } +EXPORT_SYMBOL(rproc_elf_get_boot_addr); /** * rproc_elf_load_segments() - load firmware segments to memory diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index c1077be..1bbbfea 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -124,4 +124,7 @@ struct resource_table *rproc_find_loaded_rsc_table(struct rproc *rproc, extern const struct rproc_fw_ops rproc_elf_fw_ops; +/* from remoteproc_elf_loader.c */ +u32 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw); + #endif /* REMOTEPROC_INTERNAL_H */