From patchwork Thu Nov 9 14:46:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan Ramabadhran X-Patchwork-Id: 10051095 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 46F7A60381 for ; Thu, 9 Nov 2017 14:48:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A28A2ADDA for ; Thu, 9 Nov 2017 14:48:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F1D22ADDC; Thu, 9 Nov 2017 14:48:51 +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 70AEA2ADDA for ; Thu, 9 Nov 2017 14:48:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755243AbdKIOse (ORCPT ); Thu, 9 Nov 2017 09:48:34 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:52990 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754810AbdKIOqj (ORCPT ); Thu, 9 Nov 2017 09:46:39 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id F1109607CF; Thu, 9 Nov 2017 14:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510238799; bh=fWEBk6XbvB+AwA2wmAS4M45ZxIKsvFC2ouusZUHd8+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PwgC6bn8RjqKYU9+YXJs2j5iSD55IoX9dO6GQ8lM0AMgk298CYdeA7+P4CyYAelk3 C81EuFJ92fOpQtmoKSSa+rV0eVPR9kZpGEfNHMc3N6M7mIdrjlPFg0vpedFj8x9xF4 8DQlQwXYOs+tNhMGbx5YaRhnQmpIDcqBzPPW+mwY= 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 D984C607C3; Thu, 9 Nov 2017 14:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510238798; bh=fWEBk6XbvB+AwA2wmAS4M45ZxIKsvFC2ouusZUHd8+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MIxTjjnc/Xw7SbStsnisIB/TSupMHrjQ9lorIprCtanS0KDFcyP/gJJRwiriI8BYP C6+bsywI5cd/A7hBM/8w/4ty2lzoufK09RLcgsrB7bNF5fihDiU473rYfB1nWZVbUV Vy/V5EIzzT9uScHzjCFCaQJkBYzK1V7qMSZT6uSI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D984C607C3 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 v4 2/6] remoteproc: Export rproc_elf_get_boot_addr Date: Thu, 9 Nov 2017 20:16:11 +0530 Message-Id: <1510238775-14883-3-git-send-email-sricharan@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1510238775-14883-1-git-send-email-sricharan@codeaurora.org> References: <1510238775-14883-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 */