Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1103382pxu; Wed, 6 Jan 2021 12:20:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkbv/EvFt9TrSGdztpUmwrmK6gclXka5p09RZDICFRaGUfSV3uRiqGD9dOcdsFg4sbY8V9 X-Received: by 2002:a05:6402:1c9b:: with SMTP id cy27mr5043061edb.253.1609964446890; Wed, 06 Jan 2021 12:20:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609964446; cv=none; d=google.com; s=arc-20160816; b=yg1a8XJcNIxSs/g/CmYE1OevgAR8v4kpIzD7P0C0lWsB3ICdqb/Wd6mRyzI37rAE79 bHlWiEYaXhYJ6JvF9BhKOoXQueamvgoRGMz3iprCs+R1SiL+oSxweNyO4wvbqfmlv8R/ atLl6HWnMGFlOAbaJEBbolbQwv/CVeVPtiD1GnECn8GS20PngDn/9nCkNRGx6BAOAJHT +XRgMDERdIWxQZN772HixdFK76qemFiLtj+pkHKYeZxLZCPGXvR+s/aH6/iXo6ZAMjAi wBXgk3d8Qxwzge+lVOsu0khMWT/hCwcDE4SLdZ5+7ZOGU+eI2g+ad+srGPbciwdSwh6/ FWxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=2QJfX1BICWKdo2R42oXcGOzuUsQ8OOMd6ZbGxd+07FU=; b=gEbxicTCRPAICgcVhbFjAt098IQv80zhrogJ7ESanO2JiKSRESHZS5jyRZYsjLf6wz OiYnIgTGPtuo88syxCQ7X5WnqMF5hVca1fXP4TPWBQ3j17thSXgKux81+d1pcKySs2nL 1JxTi5XhB06L4ZZugRyTyUkrbnH9hF11uJ10B5G2aTc2wUYf+LD3M6P69YKfHCv6SNtq ZVwONf5Ehd8DPetxDaG4u9MbMz1LbiALPmaPq4qwUaBQgyUH0zlKxhogS+fUiIyFpASB zxUEBAdPCKVyR+fM3NPdKXPAMNxeTLjOWi8gggrCBtrmAWE6pdsZuWif+T/Hy7G28+l+ 6sHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o22si1277758ejg.205.2021.01.06.12.20.23; Wed, 06 Jan 2021 12:20:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727804AbhAFUTI (ORCPT + 99 others); Wed, 6 Jan 2021 15:19:08 -0500 Received: from foss.arm.com ([217.140.110.172]:47148 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727796AbhAFUTI (ORCPT ); Wed, 6 Jan 2021 15:19:08 -0500 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 C6F0614FF; Wed, 6 Jan 2021 12:17:33 -0800 (PST) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2E27A3F719; Wed, 6 Jan 2021 12:17:31 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, lukasz.luba@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, thara.gopinath@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com, cristian.marussi@arm.com Subject: [PATCH v4 17/37] firmware: arm_scmi: remove legacy scmi_power_ops protocol interface Date: Wed, 6 Jan 2021 20:15:50 +0000 Message-Id: <20210106201610.26538-18-cristian.marussi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210106201610.26538-1-cristian.marussi@arm.com> References: <20210106201610.26538-1-cristian.marussi@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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/power.c | 47 ------------------------------- include/linux/scmi_protocol.h | 11 -------- 2 files changed, 58 deletions(-) diff --git a/drivers/firmware/arm_scmi/power.c b/drivers/firmware/arm_scmi/power.c index b3d1c032218c..06e3ab17a0eb 100644 --- a/drivers/firmware/arm_scmi/power.c +++ b/drivers/firmware/arm_scmi/power.c @@ -146,15 +146,6 @@ static int scmi_power_state_set(const struct scmi_protocol_handle *ph, return ret; } -static int __scmi_power_state_set(const struct scmi_handle *handle, - u32 domain, u32 state) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_POWER); - - return scmi_power_state_set(ph, domain, state); -} - static int scmi_power_state_get(const struct scmi_protocol_handle *ph, u32 domain, u32 *state) { @@ -175,15 +166,6 @@ static int scmi_power_state_get(const struct scmi_protocol_handle *ph, return ret; } -static int __scmi_power_state_get(const struct scmi_handle *handle, - u32 domain, u32 *state) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_POWER); - - return scmi_power_state_get(ph, domain, state); -} - static int scmi_power_num_domains_get(const struct scmi_protocol_handle *ph) { struct scmi_power_info *pi = ph->get_priv(ph); @@ -191,14 +173,6 @@ static int scmi_power_num_domains_get(const struct scmi_protocol_handle *ph) return pi->num_domains; } -static int __scmi_power_num_domains_get(const struct scmi_handle *handle) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_POWER); - - return scmi_power_num_domains_get(ph); -} - static char *scmi_power_name_get(const struct scmi_protocol_handle *ph, u32 domain) { @@ -208,22 +182,6 @@ static char *scmi_power_name_get(const struct scmi_protocol_handle *ph, return dom->name; } -static char *__scmi_power_name_get(const struct scmi_handle *handle, - u32 domain) -{ - const struct scmi_protocol_handle *ph = - scmi_map_protocol_handle(handle, SCMI_PROTOCOL_POWER); - - return scmi_power_name_get(ph, domain); -} - -static const struct scmi_power_ops power_ops = { - .num_domains_get = __scmi_power_num_domains_get, - .name_get = __scmi_power_name_get, - .state_set = __scmi_power_state_set, - .state_get = __scmi_power_state_get, -}; - static const struct scmi_power_proto_ops power_proto_ops = { .num_domains_get = scmi_power_num_domains_get, .name_get = scmi_power_name_get, @@ -324,7 +282,6 @@ static int scmi_power_protocol_init(const struct scmi_protocol_handle *ph) int domain; u32 version; struct scmi_power_info *pinfo; - struct scmi_handle *handle; ph->xops->version_get(ph, &version); @@ -350,10 +307,6 @@ static int scmi_power_protocol_init(const struct scmi_protocol_handle *ph) pinfo->version = version; - /* Transient code for legacy ops interface */ - handle = scmi_map_scmi_handle(ph); - handle->power_ops = &power_ops; - return ph->set_priv(ph, pinfo); } diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index c038994e8adc..73d734eda954 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -152,15 +152,6 @@ struct scmi_power_proto_ops { u32 *state); }; -struct scmi_power_ops { - int (*num_domains_get)(const struct scmi_handle *handle); - char *(*name_get)(const struct scmi_handle *handle, u32 domain); - int (*state_set)(const struct scmi_handle *handle, u32 domain, - u32 state); - int (*state_get)(const struct scmi_handle *handle, u32 domain, - u32 *state); -}; - /** * scmi_sensor_reading - represent a timestamped read * @@ -611,7 +602,6 @@ struct scmi_notify_ops { * * @dev: pointer to the SCMI device * @version: pointer to the structure containing SCMI version information - * @power_ops: pointer to set of power protocol operations * @clk_ops: pointer to set of clock protocol operations * @sensor_ops: pointer to set of sensor protocol operations * @reset_ops: pointer to set of reset protocol operations @@ -638,7 +628,6 @@ struct scmi_handle { struct device *dev; struct scmi_revision_info *version; const struct scmi_clk_ops *clk_ops; - const struct scmi_power_ops *power_ops; const struct scmi_sensor_ops *sensor_ops; const struct scmi_reset_ops *reset_ops; const struct scmi_voltage_ops *voltage_ops; -- 2.17.1