From patchwork Fri Jun 16 11:28:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Perttunen X-Patchwork-Id: 9791133 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 EF8C860325 for ; Fri, 16 Jun 2017 11:30:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4D8E2863F for ; Fri, 16 Jun 2017 11:30:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D871B28644; Fri, 16 Jun 2017 11:30:10 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable 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 953792863F for ; Fri, 16 Jun 2017 11:30:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447AbdFPL3k (ORCPT ); Fri, 16 Jun 2017 07:29:40 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:60063 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752372AbdFPL3h (ORCPT ); Fri, 16 Jun 2017 07:29:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=SYjfJAKfE/rt5PPwhPcQn8ULWG3DtNFaf1fzvQ8NV3g=; b=ywjgzErE33bS1ASM0ESy5T4OPXq+uR3W1g9YACgDar7hmb+q9fI+OVmJT12NzEcGBVel9gOyLgTw2XNFjET52PipYX0+64wiDCRdUsXS3OoVr+Wib6CttdQWuXKvfzka6/LsQ96g+RZY5gb09/eBCoyJwPUcptb115daSrh1tbcjndIdsaB8JEBqx2PcYVaDU7E5irNcWTPfivGBenRgxOtq+UzlJFNShZfIpirlPQ+XO+KmNHxjHqaEhzbK1w6vwJy/U73oeEU4WjoFxHZx4OEW4glD+2VLVi2Zz2V/py02LihUBlPT63it5rdd7vdcbqo06FZptjnP/Mi3EXrkoQ==; Received: from dsl-hkibng41-56732b-124.dhcp.inet.fi ([86.115.43.124] helo=localhost.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dLpRO-00080N-Sc; Fri, 16 Jun 2017 14:29:26 +0300 From: Mikko Perttunen To: robh+dt@kernel.org, mark.rutland@arm.com, rui.zhang@intel.com, edubezval@gmail.com, thierry.reding@gmail.com, jonathanh@nvidia.com Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mikko Perttunen Subject: [PATCH 3/4] firmware: tegra: Expose tegra_bpmp_mrq_return Date: Fri, 16 Jun 2017 14:28:24 +0300 Message-Id: <20170616112825.31025-3-mperttunen@nvidia.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170616112825.31025-1-mperttunen@nvidia.com> References: <20170616112825.31025-1-mperttunen@nvidia.com> X-SA-Exim-Connect-IP: 86.115.43.124 X-SA-Exim-Mail-From: mperttunen@nvidia.COM X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Expose and export the tegra_bpmp_mrq_return function for use of drivers outside the core BPMP driver. This function is used to reply to messages originating from the BPMP, which is required in the thermal driver. Signed-off-by: Mikko Perttunen --- drivers/firmware/tegra/bpmp.c | 5 +++-- include/soc/tegra/bpmp.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c index 84e4c9a58a0c..72ffccd891f4 100644 --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c @@ -379,8 +379,8 @@ static struct tegra_bpmp_mrq *tegra_bpmp_find_mrq(struct tegra_bpmp *bpmp, return NULL; } -static void tegra_bpmp_mrq_return(struct tegra_bpmp_channel *channel, - int code, const void *data, size_t size) +void tegra_bpmp_mrq_return(struct tegra_bpmp_channel *channel, int code, + const void *data, size_t size) { unsigned long flags = channel->ib->flags; struct tegra_bpmp *bpmp = channel->bpmp; @@ -418,6 +418,7 @@ static void tegra_bpmp_mrq_return(struct tegra_bpmp_channel *channel, mbox_client_txdone(bpmp->mbox.channel, 0); } } +EXPORT_SYMBOL_GPL(tegra_bpmp_mrq_return); static void tegra_bpmp_handle_mrq(struct tegra_bpmp *bpmp, unsigned int mrq, diff --git a/include/soc/tegra/bpmp.h b/include/soc/tegra/bpmp.h index 13dcd44e91bb..179a3a0f4963 100644 --- a/include/soc/tegra/bpmp.h +++ b/include/soc/tegra/bpmp.h @@ -114,6 +114,8 @@ int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp, struct tegra_bpmp_message *msg); int tegra_bpmp_transfer(struct tegra_bpmp *bpmp, struct tegra_bpmp_message *msg); +void tegra_bpmp_mrq_return(struct tegra_bpmp_channel *channel, int code, + const void *data, size_t size); int tegra_bpmp_request_mrq(struct tegra_bpmp *bpmp, unsigned int mrq, tegra_bpmp_mrq_handler_t handler, void *data);