@@ -149,12 +149,6 @@ struct scmi_debug_info {
149149 * base protocol
150150 * @active_protocols: IDR storing device_nodes for protocols actually defined
151151 * in the DT and confirmed as implemented by fw.
152- * @atomic_threshold: Optional system wide DT-configured threshold, expressed
153- * in microseconds, for atomic operations.
154- * Only SCMI synchronous commands reported by the platform
155- * to have an execution latency lesser-equal to the threshold
156- * should be considered for atomic mode operation: such
157- * decision is finally left up to the SCMI drivers.
158152 * @notify_priv: Pointer to private data structure specific to notifications.
159153 * @node: List head
160154 * @users: Number of users of this instance
@@ -180,7 +174,6 @@ struct scmi_info {
180174 struct mutex protocols_mtx ;
181175 u8 * protocols_imp ;
182176 struct idr active_protocols ;
183- unsigned int atomic_threshold ;
184177 void * notify_priv ;
185178 struct list_head node ;
186179 int users ;
@@ -2445,7 +2438,7 @@ static bool scmi_is_transport_atomic(const struct scmi_handle *handle,
24452438 ret = info -> desc -> atomic_enabled &&
24462439 is_transport_polling_capable (info -> desc );
24472440 if (ret && atomic_threshold )
2448- * atomic_threshold = info -> atomic_threshold ;
2441+ * atomic_threshold = info -> desc -> atomic_threshold ;
24492442
24502443 return ret ;
24512444}
@@ -2959,7 +2952,7 @@ static struct scmi_debug_info *scmi_debugfs_common_setup(struct scmi_info *info)
29592952 (char * * )& dbg -> name );
29602953
29612954 debugfs_create_u32 ("atomic_threshold_us" , 0400 , top_dentry ,
2962- & info -> atomic_threshold );
2955+ ( u32 * ) & info -> desc -> atomic_threshold );
29632956
29642957 debugfs_create_str ("type" , 0400 , trans , (char * * )& dbg -> type );
29652958
@@ -3069,6 +3062,13 @@ static const struct scmi_desc *scmi_transport_setup(struct device *dev)
30693062 trans -> desc -> max_rx_timeout_ms , trans -> desc -> max_msg_size ,
30703063 trans -> desc -> max_msg );
30713064
3065+ /* System wide atomic threshold for atomic ops .. if any */
3066+ if (!of_property_read_u32 (dev -> of_node , "atomic-threshold-us" ,
3067+ & trans -> desc -> atomic_threshold ))
3068+ dev_info (dev ,
3069+ "SCMI System wide atomic threshold set to %u us\n" ,
3070+ trans -> desc -> atomic_threshold );
3071+
30723072 return trans -> desc ;
30733073}
30743074
@@ -3118,13 +3118,6 @@ static int scmi_probe(struct platform_device *pdev)
31183118 handle -> devm_protocol_acquire = scmi_devm_protocol_acquire ;
31193119 handle -> devm_protocol_get = scmi_devm_protocol_get ;
31203120 handle -> devm_protocol_put = scmi_devm_protocol_put ;
3121-
3122- /* System wide atomic threshold for atomic ops .. if any */
3123- if (!of_property_read_u32 (np , "atomic-threshold-us" ,
3124- & info -> atomic_threshold ))
3125- dev_info (dev ,
3126- "SCMI System wide atomic threshold set to %d us\n" ,
3127- info -> atomic_threshold );
31283121 handle -> is_transport_atomic = scmi_is_transport_atomic ;
31293122
31303123 /* Setup all channels described in the DT at first */
0 commit comments