From patchwork Wed Dec 13 22:41:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 10111023 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 592BC60352 for ; Wed, 13 Dec 2017 22:42:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CFC028AAC for ; Wed, 13 Dec 2017 22:42:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41F3E28F75; Wed, 13 Dec 2017 22:42:27 +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=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 C1BA428AAC for ; Wed, 13 Dec 2017 22:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbdLMWmI (ORCPT ); Wed, 13 Dec 2017 17:42:08 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:42838 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752925AbdLMWlY (ORCPT ); Wed, 13 Dec 2017 17:41:24 -0500 Received: by mail-pg0-f67.google.com with SMTP id e14so2052762pgr.9 for ; Wed, 13 Dec 2017 14:41:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GixXrPtN7C4F1IbFKY5NE0N5KCRHgkl7tgsQwa53cu8=; b=dafV7x3OIbz9qFeABCEqo6y+XgkwBLJix0wQ4uwY+xfv29AjMwooIuvRs17tbGx16D x4zzeBMBLGF/W0xm11syLDOSQ3/b6ANdylN0eo+JtChvD3hRi9vmKqes9rIpHD1/FuyJ BVZiLSpvMKFEkXBtsHQ2c4uxDeltamnRCt/2E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GixXrPtN7C4F1IbFKY5NE0N5KCRHgkl7tgsQwa53cu8=; b=FawFNypqtpBS7w1TP7zBp05xP4ZEofhJH3HoaW081nnUFBSJ4EU8PJTc8EClemSTVY BuYsDNOnmkeQBXytd7I7eD273M4GK0RsaDm86Z9XEotY1+eOSYYHVprz4Lcm/h0s/bLY mhB9j0BYEQB/9Q+KCnQG0HJPIuvBEvdxAt68ITSiUQEGie04R7hecctM+/P0AjcVCsRB 0yD3yoBJxFr24v7odgcUmnp2cyDWIZu5H1a4Iqwi3P0Jiwt2V/iyWNZ6Ubw2z86fw9r7 SP0tCVCZiQnS2hy08pFz7+Gtfp+W/mcn9QQ6Aubt4xvMuHA9rTfN66Y5VYGHUjscU74S lwYw== X-Gm-Message-State: AKGB3mKaqhUPPM/QkxARCLamM8e0RhLM8fJ3YrJobZKhEpPljQEMmuZ8 koJIladOjMeNCDIQZH7MBRZ9Fg== X-Google-Smtp-Source: ACJfBotGDPro15SDkltH8iqWhiYDpx9IrciVnyvR3y1i2wAM4uCo8KHKRuK/ynPXqPDLDWqBcOspHA== X-Received: by 10.159.197.67 with SMTP id d3mr7347817plo.409.1513204883835; Wed, 13 Dec 2017 14:41:23 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id x15sm4464205pfh.27.2017.12.13.14.41.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Dec 2017 14:41:23 -0800 (PST) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/8] remoteproc: Drop dangling find_rsc_table dummies Date: Wed, 13 Dec 2017 14:41:10 -0800 Message-Id: <20171213224111.17864-8-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171213224111.17864-1-bjorn.andersson@linaro.org> References: <20171213224111.17864-1-bjorn.andersson@linaro.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 As the core now deals with the lack of a resource table, remove the dangling custom dummy implementations of find_rsc_table from drivers. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_adsp_pil.c | 1 - drivers/remoteproc/qcom_common.c | 19 ------------------- drivers/remoteproc/qcom_common.h | 4 ---- drivers/remoteproc/qcom_q6v5_pil.c | 11 ----------- drivers/remoteproc/qcom_wcnss.c | 1 - drivers/remoteproc/st_slim_rproc.c | 18 ------------------ include/linux/remoteproc.h | 4 ---- 7 files changed, 58 deletions(-) diff --git a/drivers/remoteproc/qcom_adsp_pil.c b/drivers/remoteproc/qcom_adsp_pil.c index 7b9d810b23f1..b0b0d5ca1ca0 100644 --- a/drivers/remoteproc/qcom_adsp_pil.c +++ b/drivers/remoteproc/qcom_adsp_pil.c @@ -181,7 +181,6 @@ static const struct rproc_ops adsp_ops = { .start = adsp_start, .stop = adsp_stop, .da_to_va = adsp_da_to_va, - .find_rsc_table = qcom_mdt_find_rsc_table, .load = adsp_load, }; diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c index 818ee3657043..ce2dcc4f7de7 100644 --- a/drivers/remoteproc/qcom_common.c +++ b/drivers/remoteproc/qcom_common.c @@ -32,25 +32,6 @@ static BLOCKING_NOTIFIER_HEAD(ssr_notifiers); -/** - * qcom_mdt_find_rsc_table() - provide dummy resource table for remoteproc - * @rproc: remoteproc handle - * @fw: firmware header - * @tablesz: outgoing size of the table - * - * Returns a dummy table. - */ -struct resource_table *qcom_mdt_find_rsc_table(struct rproc *rproc, - const struct firmware *fw, - int *tablesz) -{ - static struct resource_table table = { .ver = 1, }; - - *tablesz = sizeof(table); - return &table; -} -EXPORT_SYMBOL_GPL(qcom_mdt_find_rsc_table); - static int glink_subdev_probe(struct rproc_subdev *subdev) { struct qcom_rproc_glink *glink = to_glink_subdev(subdev); diff --git a/drivers/remoteproc/qcom_common.h b/drivers/remoteproc/qcom_common.h index 541586e528b3..73efed969bfd 100644 --- a/drivers/remoteproc/qcom_common.h +++ b/drivers/remoteproc/qcom_common.h @@ -30,10 +30,6 @@ struct qcom_rproc_ssr { const char *name; }; -struct resource_table *qcom_mdt_find_rsc_table(struct rproc *rproc, - const struct firmware *fw, - int *tablesz); - void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink); void qcom_remove_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink); diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c index fbff5d842581..6f6ea0414366 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c @@ -304,16 +304,6 @@ static void q6v5_clk_disable(struct device *dev, clk_disable_unprepare(clks[i]); } -static struct resource_table *q6v5_find_rsc_table(struct rproc *rproc, - const struct firmware *fw, - int *tablesz) -{ - static struct resource_table table = { .ver = 1, }; - - *tablesz = sizeof(table); - return &table; -} - static int q6v5_xfer_mem_ownership(struct q6v5 *qproc, int *current_perm, bool remote_owner, phys_addr_t addr, size_t size) @@ -927,7 +917,6 @@ static const struct rproc_ops q6v5_ops = { .start = q6v5_start, .stop = q6v5_stop, .da_to_va = q6v5_da_to_va, - .find_rsc_table = q6v5_find_rsc_table, .load = q6v5_load, }; diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index cc44ec598522..1fa5253020dd 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -310,7 +310,6 @@ static const struct rproc_ops wcnss_ops = { .start = wcnss_start, .stop = wcnss_stop, .da_to_va = wcnss_da_to_va, - .find_rsc_table = qcom_mdt_find_rsc_table, .load = wcnss_load, }; diff --git a/drivers/remoteproc/st_slim_rproc.c b/drivers/remoteproc/st_slim_rproc.c index 1538ea915c49..c6a2a8b68c7a 100644 --- a/drivers/remoteproc/st_slim_rproc.c +++ b/drivers/remoteproc/st_slim_rproc.c @@ -200,28 +200,10 @@ static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, int len) return va; } -/* - * Firmware handler operations: sanity, boot address, load ... - */ - -static struct resource_table empty_rsc_tbl = { - .ver = 1, - .num = 0, -}; - -static struct resource_table *slim_rproc_find_rsc_table(struct rproc *rproc, - const struct firmware *fw, - int *tablesz) -{ - *tablesz = sizeof(empty_rsc_tbl); - return &empty_rsc_tbl; -} - static const struct rproc_ops slim_rproc_ops = { .start = slim_rproc_start, .stop = slim_rproc_stop, .da_to_va = slim_rproc_da_to_va, - .find_rsc_table = slim_rproc_find_rsc_table, }; /** diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index ec1ada7cc6d7..51ddde7535b9 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -332,7 +332,6 @@ struct firmware; * @stop: power off the device * @kick: kick a virtqueue (virtqueue id given as a parameter) * @da_to_va: optional platform hook to perform address translations - * @find_rsc_table: find the resource table inside the firmware image * @find_loaded_rsc_table: find the loaded resouce table * @load: load firmeware to memory, where the remote processor * expects to find it @@ -345,9 +344,6 @@ struct rproc_ops { void (*kick)(struct rproc *rproc, int vqid); void * (*da_to_va)(struct rproc *rproc, u64 da, int len); int (*load_rsc_table)(struct rproc *rproc, const struct firmware *fw); - struct resource_table *(*find_rsc_table)(struct rproc *rproc, - const struct firmware *fw, - int *tablesz); struct resource_table *(*find_loaded_rsc_table)( struct rproc *rproc, const struct firmware *fw); int (*load)(struct rproc *rproc, const struct firmware *fw);