From patchwork Fri Jan 5 23:58:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 123578 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1428767qgn; Fri, 5 Jan 2018 15:59:18 -0800 (PST) X-Google-Smtp-Source: ACJfBoulUm3MoS6rI+wAZs+C65a6JNBDr9q8lVU6FcGMLgs1tMZT1JisAVp96X1kNNxbiyljgblB X-Received: by 10.84.253.133 with SMTP id a5mr4620717plm.96.1515196758141; Fri, 05 Jan 2018 15:59:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515196758; cv=none; d=google.com; s=arc-20160816; b=ejKiI5hiIwahQEypbJ/UP2Q8cwJRncttncPtt+Nyq6Vzq1qp4LmvJgKxGR08M6ZbB9 jV9i0rNGK1eBbr5uTSUfPG91nX9k6UIRN6hK1MGry0qkcgC/kbaHPiqoMscorhW/jFUe /2bzGDoU1vgwQovef5RA9eNGXelqm+aijQ+Ecq6Y70fcoJmzQCgV7jOrON8F2hoOC9jV T2rRcyypxN7d6ZNk0FmmlaEBS3p8Shbmv+2rYUnioEHs0vtabt33zBxVRQ3bJ5oKBEVz eXch7lJKxQCwyjfugVHPk/TNZlQw5wH6lYXdjJlIcIvxn21rewtbXTjNSKuCT6mQm1Uo 1nVA== 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=0FTXsY+dMAMEQ9VdpNvs0ss1ap3PWV++7EMlqaRuwp4=; b=Or0+Nh6ftEuyeefuYJxABiQlRsA+s5CCTkia3uOk8zenzZl4p5FPFnnZz//iEDt9WZ qEPGvMTM1I8iUxl1paVHi4K8cQOexyxBuCtzVLmdjCuftVWc2+tS+iuc2fTRtN7WsdJp tOFk1CXIc+nTB8R7v4kHT8leaHdiurRwgyId9eaoefAE4epLd8GXVNGk7Snta1Iw791/ ytIx9q/Qt96Kr5aMsZArjzGsePKg8KJ2t911zEjcwbpScgHirnjbRBJQ0DhcHaNoZRIo NWgdOT1Vl6F23XXZOczcD24jvipWBKp7lAUv0sBIufrnKBHlbI7d0AU/GqUkmhIA3cXX Iunw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xqjn411J; 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 1si4712802plp.167.2018.01.05.15.59.17; Fri, 05 Jan 2018 15:59:18 -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=Xqjn411J; 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 S1753478AbeAEX7Q (ORCPT + 28 others); Fri, 5 Jan 2018 18:59:16 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38016 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753388AbeAEX6T (ORCPT ); Fri, 5 Jan 2018 18:58:19 -0500 Received: by mail-pf0-f195.google.com with SMTP id u25so2815197pfg.5 for ; Fri, 05 Jan 2018 15:58:18 -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=0FTXsY+dMAMEQ9VdpNvs0ss1ap3PWV++7EMlqaRuwp4=; b=Xqjn411JHI5MPkfzlJSUNRjzCo2qwtDaZMTZSTvSAzx0FJsY+rAdArlk0Fz4Gyp8mb w8gHfZ9BPfgpmmFnzjs69sNItVpvAy/VdaSgGTxlWCnUvcfOx4dlvUcllqnERHkZZapy EfaX3m9Ef4p4pgMGe+MoDgTwzNZA8ptNne8QI= 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=0FTXsY+dMAMEQ9VdpNvs0ss1ap3PWV++7EMlqaRuwp4=; b=WXMfcleQ89b0amrff0REVSqRetP46FLIOYnibW8Tef8QMHgiJCnMaf7Sthx49kw79f FJRuPYiLTpF5TFge064zeu85nYYx7FC42MMkmPY2jZbVeQz6q6EkhwNnIFzaMGrVzztz Hcwb0GINIluz1xl1lZE4ST7WAvfNmjr0zIQr5FUDP73erO5YdbtyBLQQrgIdslonJUnI eo8c6FbGyIS5hs7bqPw5J6s/KgIdDGpZEMWKf9tbwpkGVNWWYBAeH8lVkQNbk47eUCX3 Lv44S4gLzyul5qkiWVzuuZUp2DGeGVMMABfLe9ue8ixU/Lro18EQmL/9hCFwm2/MNHxh HYbw== X-Gm-Message-State: AKGB3mKvX6y99OsRktMK8ImCgtpcxe9OTQ6BHaLQVjATKG2cLPyxnhiZ mqmlxHhZeZkRgxHbpifijavxBw== X-Received: by 10.98.75.7 with SMTP id y7mr4392262pfa.196.1515196698437; Fri, 05 Jan 2018 15:58:18 -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 x4sm14473188pfk.51.2018.01.05.15.58.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 15:58:17 -0800 (PST) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Loic Pallardy Subject: [PATCH v2 7/8] remoteproc: Drop dangling find_rsc_table dummies Date: Fri, 5 Jan 2018 15:58:04 -0800 Message-Id: <20180105235805.9948-8-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180105235805.9948-1-bjorn.andersson@linaro.org> References: <20180105235805.9948-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 --- Changes since v1: - None 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 56156c12bd73..373c167892d7 100644 --- a/drivers/remoteproc/qcom_adsp_pil.c +++ b/drivers/remoteproc/qcom_adsp_pil.c @@ -177,7 +177,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 d487040b528b..6eb9161f80b3 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 832e20271664..728be9834d8b 100644 --- a/drivers/remoteproc/qcom_common.h +++ b/drivers/remoteproc/qcom_common.h @@ -27,10 +27,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 3ea668d9fd4c..b4e5e725848d 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c @@ -303,16 +303,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) @@ -926,7 +916,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 e53fc6f268fc..3f0609236a76 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -308,7 +308,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 1bce63a06424..1ffb1f0c43d6 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, .get_boot_addr = rproc_elf_get_boot_addr, .load = rproc_elf_load_segments, .sanity_check = rproc_elf_sanity_check, diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index cc853745e3a1..728d421fffe9 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -333,7 +333,6 @@ struct firmware; * @kick: kick a virtqueue (virtqueue id given as a parameter) * @da_to_va: optional platform hook to perform address translations * @load_rsc_table: load resource table from firmware image - * @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 @@ -346,9 +345,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);