From patchwork Tue Feb 2 22:15:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 12063033 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F378C433DB for ; Tue, 2 Feb 2021 22:23:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2481064EDA for ; Tue, 2 Feb 2021 22:23:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2481064EDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6f06ULMsdLIYeVm8E9tdmkdDnfcE9qcbuOay6v0RAlM=; b=t3PlmCx1nFyLOzcRBgTjN8fsHM UEhFaeAgK3jWlO/sFfGf1TEGidB0y/hp24vX43nEP+pDuWp7AojL2IS29wlyfKjxDprJ/SHMAgyw+ u3M5gfS1TFPoi8pCiKduIRYspgpcYaj27UuJgOIOPYBdYIO+OxfJ7dsEuQY8UiYb8ODnbvp6VZUQK Ca3g7t1DNDzN9LRjUMlShfhcgTObpIFmUy1ubyPYNiOkPff/Qc0QjgF6z55+Al5QSPBXAUrrb0+1/ GWzOt0lLiJS0pJ0UjJRaCUIDw4NY8bfNRcFqbOexO00OZZVxR3sfurgdVLv47Ph7a5zSXHOVex9ei Mit9CfVg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7438-0001jA-4P; Tue, 02 Feb 2021 22:21:32 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l73zE-0007px-4m for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2021 22:17:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7BBB4142F; Tue, 2 Feb 2021 14:17:25 -0800 (PST) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 73B723F694; Tue, 2 Feb 2021 14:17:23 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 23/37] firmware: arm_scmi: remove legacy scmi_reset_ops protocol interface Date: Tue, 2 Feb 2021 22:15:41 +0000 Message-Id: <20210202221555.41167-24-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210202221555.41167-1-cristian.marussi@arm.com> References: <20210202221555.41167-1-cristian.marussi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210202_171728_369939_BDF08448 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: f.fainelli@gmail.com, vincent.guittot@linaro.org, sudeep.holla@arm.com, thara.gopinath@linaro.org, cristian.marussi@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, souvik.chakravarty@arm.com, etienne.carriere@linaro.org, lukasz.luba@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/reset.c | 68 ------------------------------- include/linux/scmi_protocol.h | 11 ----- 2 files changed, 79 deletions(-) diff --git a/drivers/firmware/arm_scmi/reset.c b/drivers/firmware/arm_scmi/reset.c index 9c808f5add7e..3856ceed2bd7 100644 --- a/drivers/firmware/arm_scmi/reset.c +++ b/drivers/firmware/arm_scmi/reset.c @@ -125,14 +125,6 @@ static int scmi_reset_num_domains_get(const struct scmi_protocol_handle *ph) return pi->num_domains; } -static int __scmi_reset_num_domains_get(const struct scmi_handle *handle) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_RESET); - - return scmi_reset_num_domains_get(ph); -} - static char *scmi_reset_name_get(const struct scmi_protocol_handle *ph, u32 domain) { @@ -143,15 +135,6 @@ static char *scmi_reset_name_get(const struct scmi_protocol_handle *ph, return dom->name; } -static char *__scmi_reset_name_get(const struct scmi_handle *handle, - u32 domain) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_RESET); - - return scmi_reset_name_get(ph, domain); -} - static int scmi_reset_latency_get(const struct scmi_protocol_handle *ph, u32 domain) { @@ -161,15 +144,6 @@ static int scmi_reset_latency_get(const struct scmi_protocol_handle *ph, return dom->latency_us; } -static int __scmi_reset_latency_get(const struct scmi_handle *handle, - u32 domain) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_RESET); - - return scmi_reset_latency_get(ph, domain); -} - static int scmi_domain_reset(const struct scmi_protocol_handle *ph, u32 domain, u32 flags, u32 state) { @@ -207,15 +181,6 @@ static int scmi_reset_domain_reset(const struct scmi_protocol_handle *ph, ARCH_COLD_RESET); } -static int __scmi_reset_domain_reset(const struct scmi_handle *handle, - u32 domain) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_RESET); - - return scmi_reset_domain_reset(ph, domain); -} - static int scmi_reset_domain_assert(const struct scmi_protocol_handle *ph, u32 domain) { @@ -223,39 +188,12 @@ scmi_reset_domain_assert(const struct scmi_protocol_handle *ph, u32 domain) ARCH_COLD_RESET); } -static int -__scmi_reset_domain_assert(const struct scmi_handle *handle, u32 domain) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_RESET); - - return scmi_reset_domain_assert(ph, domain); -} - static int scmi_reset_domain_deassert(const struct scmi_protocol_handle *ph, u32 domain) { return scmi_domain_reset(ph, domain, 0, ARCH_COLD_RESET); } -static int -__scmi_reset_domain_deassert(const struct scmi_handle *handle, u32 domain) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_RESET); - - return scmi_reset_domain_deassert(ph, domain); -} - -static const struct scmi_reset_ops reset_ops = { - .num_domains_get = __scmi_reset_num_domains_get, - .name_get = __scmi_reset_name_get, - .latency_get = __scmi_reset_latency_get, - .reset = __scmi_reset_domain_reset, - .assert = __scmi_reset_domain_assert, - .deassert = __scmi_reset_domain_deassert, -}; - static const struct scmi_reset_proto_ops reset_proto_ops = { .num_domains_get = scmi_reset_num_domains_get, .name_get = scmi_reset_name_get, @@ -357,7 +295,6 @@ static int scmi_reset_protocol_init(const struct scmi_protocol_handle *ph) int domain; u32 version; struct scmi_reset_info *pinfo; - struct scmi_handle *handle; ph->xops->version_get(ph, &version); @@ -382,11 +319,6 @@ static int scmi_reset_protocol_init(const struct scmi_protocol_handle *ph) } pinfo->version = version; - - /* Transient code for legacy ops interface */ - handle = scmi_map_scmi_handle(ph); - handle->reset_ops = &reset_ops; - return ph->set_priv(ph, pinfo); } diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 07a41237e74f..9bbfc970e803 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -483,15 +483,6 @@ struct scmi_reset_proto_ops { int (*deassert)(const struct scmi_protocol_handle *ph, u32 domain); }; -struct scmi_reset_ops { - int (*num_domains_get)(const struct scmi_handle *handle); - char *(*name_get)(const struct scmi_handle *handle, u32 domain); - int (*latency_get)(const struct scmi_handle *handle, u32 domain); - int (*reset)(const struct scmi_handle *handle, u32 domain); - int (*assert)(const struct scmi_handle *handle, u32 domain); - int (*deassert)(const struct scmi_handle *handle, u32 domain); -}; - /** * struct scmi_voltage_info - describe one available SCMI Voltage Domain * @@ -612,7 +603,6 @@ struct scmi_notify_ops { * @dev: pointer to the SCMI device * @version: pointer to the structure containing SCMI version information * @sensor_ops: pointer to set of sensor protocol operations - * @reset_ops: pointer to set of reset protocol operations * @voltage_ops: pointer to set of voltage protocol operations * @devm_acquire_protocol: devres managed method to get hold of a protocol, * causing its initialization and related resource @@ -635,7 +625,6 @@ struct scmi_handle { struct device *dev; struct scmi_revision_info *version; const struct scmi_sensor_ops *sensor_ops; - const struct scmi_reset_ops *reset_ops; const struct scmi_voltage_ops *voltage_ops; int __must_check (*devm_acquire_protocol)(struct scmi_device *sdev,