@@ -149,12 +149,6 @@ struct scmi_debug_info {
149
149
* base protocol
150
150
* @active_protocols: IDR storing device_nodes for protocols actually defined
151
151
* 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.
158
152
* @notify_priv: Pointer to private data structure specific to notifications.
159
153
* @node: List head
160
154
* @users: Number of users of this instance
@@ -180,7 +174,6 @@ struct scmi_info {
180
174
struct mutex protocols_mtx ;
181
175
u8 * protocols_imp ;
182
176
struct idr active_protocols ;
183
- unsigned int atomic_threshold ;
184
177
void * notify_priv ;
185
178
struct list_head node ;
186
179
int users ;
@@ -2445,7 +2438,7 @@ static bool scmi_is_transport_atomic(const struct scmi_handle *handle,
2445
2438
ret = info -> desc -> atomic_enabled &&
2446
2439
is_transport_polling_capable (info -> desc );
2447
2440
if (ret && atomic_threshold )
2448
- * atomic_threshold = info -> atomic_threshold ;
2441
+ * atomic_threshold = info -> desc -> atomic_threshold ;
2449
2442
2450
2443
return ret ;
2451
2444
}
@@ -2959,7 +2952,7 @@ static struct scmi_debug_info *scmi_debugfs_common_setup(struct scmi_info *info)
2959
2952
(char * * )& dbg -> name );
2960
2953
2961
2954
debugfs_create_u32 ("atomic_threshold_us" , 0400 , top_dentry ,
2962
- & info -> atomic_threshold );
2955
+ ( u32 * ) & info -> desc -> atomic_threshold );
2963
2956
2964
2957
debugfs_create_str ("type" , 0400 , trans , (char * * )& dbg -> type );
2965
2958
@@ -3069,6 +3062,13 @@ static const struct scmi_desc *scmi_transport_setup(struct device *dev)
3069
3062
trans -> desc -> max_rx_timeout_ms , trans -> desc -> max_msg_size ,
3070
3063
trans -> desc -> max_msg );
3071
3064
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
+
3072
3072
return trans -> desc ;
3073
3073
}
3074
3074
@@ -3118,13 +3118,6 @@ static int scmi_probe(struct platform_device *pdev)
3118
3118
handle -> devm_protocol_acquire = scmi_devm_protocol_acquire ;
3119
3119
handle -> devm_protocol_get = scmi_devm_protocol_get ;
3120
3120
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 );
3128
3121
handle -> is_transport_atomic = scmi_is_transport_atomic ;
3129
3122
3130
3123
/* Setup all channels described in the DT at first */
0 commit comments