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: 121869 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6064181qgn; Wed, 13 Dec 2017 14:42:14 -0800 (PST) X-Google-Smtp-Source: ACJfBovUwNpHUX89LJ4h5AoqCbVSuMOaFVnnGHIN+/B1bE5iQ4jEfLhe9GzL4HCiNwbE9XKmpr8a X-Received: by 10.101.97.129 with SMTP id c1mr6801235pgv.223.1513204934847; Wed, 13 Dec 2017 14:42:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513204934; cv=none; d=google.com; s=arc-20160816; b=kwRnEK6zyHNM0HP8ut37bKeo7lPfciNTCyN8niLxSaiqBJkdpjGFjxYvEUVO85kgJ0 cN9+1G+6LDNFEJvBsyH1iTNejuhYYVJEviCUpaFA/6j3ecPo4/Y5gy0MwGQAhCBI7xhi t27JrFmvNJ0QtzDMLXqXpUEeBhk8+8cFsPTgRijh0t+Uac/jK/susTTqq38SaW9hMdyI SWwnkut+Wu1q+qfZajeZQMMoeJS7QpVcxD9ssNU2py2FcDZixn9EIztYPMW+IwVDCt1F bQ7nvKuSxBR2KAObBNfVfYNXH1G8GYD/TYA2CdKmSRH2ZxF3yDF1gAoyud/9SUp5MjHs mdQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=GixXrPtN7C4F1IbFKY5NE0N5KCRHgkl7tgsQwa53cu8=; b=DldbkYHHpUXBuYwpnvYQ/cp8mHDJjq1RB+pHqEYaPPTvL19s5MLeDUhHOgCUshFNuk S0I7DUuypDQiM4SOI58UntOcHqazzEKaFvcRaXJAr4KOlPbMLrEORWT4tdnaZ1AoInwz xjIFJdj68mWy16N6KHUJJnf1npMLwteNJntVQMHYof1dZqAxAbK2Qvy5OXhTtUhll/LJ tEkDm4Bf/100aSMkAz+kynHOgWXtF/uucTTZUGgwQ8RCa7jfWfD/agGJzmD9Mt/I5hHF oTBGrIZI3kfaSuccz/dX+XT7jfTb5jioQDX3uxI4zuw0saawcoYYjpP17z8wNyfRwXn1 YOyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dafV7x3O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si1873271pgr.469.2017.12.13.14.42.14; Wed, 13 Dec 2017 14:42:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dafV7x3O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753180AbdLMWmJ (ORCPT + 23 others); Wed, 13 Dec 2017 17:42:09 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:46300 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752931AbdLMWlY (ORCPT ); Wed, 13 Dec 2017 17:41:24 -0500 Received: by mail-pg0-f68.google.com with SMTP id b11so2044488pgu.13 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=mMtdkAFf6sJAxO7/d/pxGII7sXGLziCOGkvtMoG+JsyElUb4yi/ZJSyx14VNL4Nknz SW/NTWXbVqxOlYUeYppbmR+5IPtPaQJDwkuWXo0ge49+YlIHL4rA7h1iivLFA/qqb37R 3BvqyTrm6rqA2ONWq+2NkLBBZgp3xtwZTiGpwKiXU710NVWYyhuy9KxZU97gklFohwj9 Abf95HYYYY9P+nkxpr4PsFEsCEvFiCCXor7Xy5aNuyu0TpFZJb1EiYkkv2tG6MdX3oj9 11pqu+sU+a+eKV2c1jf1uI0lNIdmyg/rUfRQvc5J4f/3sOWI5CjcsKc3sBMYroMp9ZbD 4qpQ== X-Gm-Message-State: AKGB3mKDpTAjaXTgSsEiyzZyOtwrmFHxnkI6ILhm898brlU4d/TNHczb GOMHiovPfK5dRIHUlObzLdNNb/DQz44= 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.15.0 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);