Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1103455pxu; Wed, 6 Jan 2021 12:20:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJynNQIKJQhzEuFWl6WxsL6/DQyeVVtAEooOIC/6p2FxYn5o53sSfx9wKB6Afhl9x7PuExTX X-Received: by 2002:a05:6402:ca2:: with SMTP id cn2mr5104379edb.137.1609964454041; Wed, 06 Jan 2021 12:20:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609964454; cv=none; d=google.com; s=arc-20160816; b=TEu9klwYP93dfm11OUqJqnBtc6smp6h1uG/q59LI7Xa49sMlm14dzlDsz0ujQjEIMA y3CdvBKnNwydPj2z1y1AWz5ay7xutgBOXdii1YFUZcgxOyhFdKiiWCoPXIJH7iWOOR6d RThoZwxkSw61/4z+bJqOYkYWkJhM/5/qhBQ6X9+i6I3CGHLTOEF85jLTUlyRBDfgPgFn /6XZxMssutwKlakisF8uRCrtioV+fNqbZqOdpLF093Sf0oDzgLR9mP0JxFdTb3swqGDw vMoV7OJcr2SaTnOVTJaEKtYNz8AIuw/i+HO1gjcPDvLsa7tAj4yMprzljQTYzily83We AxPA== 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=UbhgVcOjCbyjf7pLPPEh9NSG53CWTlaGvkXZrVLrnk0=; b=fK2R8NRJVIgV/2Z1eSsfCeSYWc2KT0FPKiUom16LrHrWdNHfXrWWCgvzXI0ogMnbsJ f0n8sIJh2HrYHLStb27/FyoteJdqzDt1EG6faOdv+AO3R6v1BwmIiEzbMhoUCU/Null+ nHt8mgFaPva9NiLt1aG4ws+Wff2AVLiU40FXK9yzK7bkienEW+3+PHSA2wuVR8Z8ZV9g Cz0iW28kW9ezjrEgzakHhzcpKYAOoxfLnxVSfHhljFfoEx9bWP7AeS3LLof3b4ou75Do LObYNgmEdOgRRFBLiFGmCjjntvrXWpO8hWKKg6d18dm/i5r68QR0tM78YnDzGpvZZd2D 1xyw== 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 e16si1248227eja.462.2021.01.06.12.20.30; Wed, 06 Jan 2021 12:20:54 -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 S1727705AbhAFUSs (ORCPT + 99 others); Wed, 6 Jan 2021 15:18:48 -0500 Received: from foss.arm.com ([217.140.110.172]:46970 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727649AbhAFUSr (ORCPT ); Wed, 6 Jan 2021 15:18:47 -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 2ED3C1500; Wed, 6 Jan 2021 12:17:51 -0800 (PST) Received: from e120937-lin.home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C3B6A3F719; Wed, 6 Jan 2021 12:17:48 -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 23/37] firmware: arm_scmi: remove legacy scmi_reset_ops protocol interface Date: Wed, 6 Jan 2021 20:15:56 +0000 Message-Id: <20210106201610.26538-24-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/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 58a33d0b6f90..d1a052cc5162 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_get_ops: devres managed method to acquire a protocol and get specific * operations and a dedicated protocol handler @@ -632,7 +622,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; const void __must_check * -- 2.17.1