提交 497ef0cb 编写于 作者: C Cristian Marussi 提交者: Sudeep Holla

firmware: arm_scmi: Remove legacy scmi_reset_ops protocol interface

Now that all the SCMI driver users have been migrated to the new interface
remove the legacy interface and all the transient code.

Link: https://lore.kernel.org/r/20210316124903.35011-23-cristian.marussi@arm.comTested-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NCristian Marussi <cristian.marussi@arm.com>
Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
上级 35cc2630
...@@ -125,14 +125,6 @@ static int scmi_reset_num_domains_get(const struct scmi_protocol_handle *ph) ...@@ -125,14 +125,6 @@ static int scmi_reset_num_domains_get(const struct scmi_protocol_handle *ph)
return pi->num_domains; 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, static char *scmi_reset_name_get(const struct scmi_protocol_handle *ph,
u32 domain) u32 domain)
{ {
...@@ -143,15 +135,6 @@ static char *scmi_reset_name_get(const struct scmi_protocol_handle *ph, ...@@ -143,15 +135,6 @@ static char *scmi_reset_name_get(const struct scmi_protocol_handle *ph,
return dom->name; 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, static int scmi_reset_latency_get(const struct scmi_protocol_handle *ph,
u32 domain) u32 domain)
{ {
...@@ -161,15 +144,6 @@ static int scmi_reset_latency_get(const struct scmi_protocol_handle *ph, ...@@ -161,15 +144,6 @@ static int scmi_reset_latency_get(const struct scmi_protocol_handle *ph,
return dom->latency_us; 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, static int scmi_domain_reset(const struct scmi_protocol_handle *ph, u32 domain,
u32 flags, u32 state) u32 flags, u32 state)
{ {
...@@ -207,15 +181,6 @@ static int scmi_reset_domain_reset(const struct scmi_protocol_handle *ph, ...@@ -207,15 +181,6 @@ static int scmi_reset_domain_reset(const struct scmi_protocol_handle *ph,
ARCH_COLD_RESET); 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 static int
scmi_reset_domain_assert(const struct scmi_protocol_handle *ph, u32 domain) 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) ...@@ -223,39 +188,12 @@ scmi_reset_domain_assert(const struct scmi_protocol_handle *ph, u32 domain)
ARCH_COLD_RESET); 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 static int
scmi_reset_domain_deassert(const struct scmi_protocol_handle *ph, u32 domain) scmi_reset_domain_deassert(const struct scmi_protocol_handle *ph, u32 domain)
{ {
return scmi_domain_reset(ph, domain, 0, ARCH_COLD_RESET); 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 = { static const struct scmi_reset_proto_ops reset_proto_ops = {
.num_domains_get = scmi_reset_num_domains_get, .num_domains_get = scmi_reset_num_domains_get,
.name_get = scmi_reset_name_get, .name_get = scmi_reset_name_get,
...@@ -357,7 +295,6 @@ static int scmi_reset_protocol_init(const struct scmi_protocol_handle *ph) ...@@ -357,7 +295,6 @@ static int scmi_reset_protocol_init(const struct scmi_protocol_handle *ph)
int domain; int domain;
u32 version; u32 version;
struct scmi_reset_info *pinfo; struct scmi_reset_info *pinfo;
struct scmi_handle *handle;
ph->xops->version_get(ph, &version); ph->xops->version_get(ph, &version);
...@@ -382,11 +319,6 @@ static int scmi_reset_protocol_init(const struct scmi_protocol_handle *ph) ...@@ -382,11 +319,6 @@ static int scmi_reset_protocol_init(const struct scmi_protocol_handle *ph)
} }
pinfo->version = version; 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); return ph->set_priv(ph, pinfo);
} }
......
...@@ -483,15 +483,6 @@ struct scmi_reset_proto_ops { ...@@ -483,15 +483,6 @@ struct scmi_reset_proto_ops {
int (*deassert)(const struct scmi_protocol_handle *ph, u32 domain); 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 * struct scmi_voltage_info - describe one available SCMI Voltage Domain
* *
...@@ -615,7 +606,6 @@ struct scmi_notify_ops { ...@@ -615,7 +606,6 @@ struct scmi_notify_ops {
* @dev: pointer to the SCMI device * @dev: pointer to the SCMI device
* @version: pointer to the structure containing SCMI version information * @version: pointer to the structure containing SCMI version information
* @sensor_ops: pointer to set of sensor protocol operations * @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 * @voltage_ops: pointer to set of voltage protocol operations
* @devm_protocol_get: devres managed method to acquire a protocol and get specific * @devm_protocol_get: devres managed method to acquire a protocol and get specific
* operations and a dedicated protocol handler * operations and a dedicated protocol handler
...@@ -632,7 +622,6 @@ struct scmi_handle { ...@@ -632,7 +622,6 @@ struct scmi_handle {
struct device *dev; struct device *dev;
struct scmi_revision_info *version; struct scmi_revision_info *version;
const struct scmi_sensor_ops *sensor_ops; const struct scmi_sensor_ops *sensor_ops;
const struct scmi_reset_ops *reset_ops;
const struct scmi_voltage_ops *voltage_ops; const struct scmi_voltage_ops *voltage_ops;
const void __must_check * const void __must_check *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册