History

firmware: fpga: replace the error codes with the standard ones

The Intel service layer driver has defined error codes for the specific services, which started from FPGA configuration then RSU (Remote Status Update). Intel service layer driver should define the standard error codes rather than keep adding more error codes for the new services. The standard error codes will be used by all the clients of Intel service layer driver. Replace FPGA and RSU specific error codes with Intel service layer’s Common error codes.

Richard Gong committed 6 years ago

Commit 7536ad81 parent 2a4542e5 files · +84 −133Browse files

Unified · Split

5 files
  1. drivers/firmware/stratix10-rsu.c +5 −5
  2. drivers/firmware/stratix10-svc.c +18 −44
  3. drivers/fpga/stratix10-soc.c +10 −15
  4. include/linux/firmware/intel/stratix10-smc.h +21 −28
  5. include/linux/firmware/intel/stratix10-svc-client.h +30 −41
drivers/firmware/stratix10-rsu.c+5−5
@@ -72,7 +72,7 @@ static void rsu_status_callback(struct stratix10_svc_client *client, · 71 unmodified lines
7272 struct stratix10_rsu_priv *priv = client->priv;
7373 struct arm_smccc_res *res = (struct arm_smccc_res *)data->kaddr1;
7474
75− if (data->status == BIT(SVC_STATUS_RSU_OK)) {
75+ if (data->status == BIT(SVC_STATUS_OK)) {
7676 priv->status.version = FIELD_GET(RSU_VERSION_MASK,
7777 res->a2);
7878 priv->status.state = FIELD_GET(RSU_STATE_MASK, res->a2);
@@ -108,9 +108,9 @@ static void rsu_command_callback(struct stratix10_svc_client *client, · 29 unmodified lines
108108 {
109109 struct stratix10_rsu_priv *priv = client->priv;
110110
111− if (data->status == BIT(SVC_STATUS_RSU_NO_SUPPORT))
111+ if (data->status == BIT(SVC_STATUS_NO_SUPPORT))
112112 dev_warn(client->dev, "Secure FW doesn't support notify\n");
113− else if (data->status == BIT(SVC_STATUS_RSU_ERROR))
113+ else if (data->status == BIT(SVC_STATUS_ERROR))
114114 dev_err(client->dev, "Failure, returned status is %lu\n",
115115 BIT(data->status));
116116
@@ -133,9 +133,9 @@ static void rsu_retry_callback(struct stratix10_svc_client *client, · 16 unmodified lines
133133 struct stratix10_rsu_priv *priv = client->priv;
134134 unsigned int *counter = (unsigned int *)data->kaddr1;
135135
136− if (data->status == BIT(SVC_STATUS_RSU_OK))
136+ if (data->status == BIT(SVC_STATUS_OK))
137137 priv->retry_counter = *counter;
138− else if (data->status == BIT(SVC_STATUS_RSU_NO_SUPPORT))
138+ else if (data->status == BIT(SVC_STATUS_NO_SUPPORT))
139139 dev_warn(client->dev, "Secure FW doesn't support retry\n");
140140 else
141141 dev_err(client->dev, "Failed to get retry counter %lu\n",
drivers/firmware/stratix10-svc.c+18−44
@@ -214,7 +214,7 @@ static void svc_thread_cmd_data_claim(struct stratix10_svc_controller *ctrl, · 213 unmodified lines
214214 complete(&ctrl->complete_status);
215215 break;
216216 }
217− cb_data->status = BIT(SVC_STATUS_RECONFIG_BUFFER_DONE);
217+ cb_data->status = BIT(SVC_STATUS_BUFFER_DONE);
218218 cb_data->kaddr1 = svc_pa_to_va(res.a1);
219219 cb_data->kaddr2 = (res.a2) ?
220220 svc_pa_to_va(res.a2) : NULL;
@@ -227,7 +227,7 @@ static void svc_thread_cmd_data_claim(struct stratix10_svc_controller *ctrl, · 6 unmodified lines
227227 __func__);
228228 }
229229 } while (res.a0 == INTEL_SIP_SMC_STATUS_OK ||
230− res.a0 == INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY ||
230+ res.a0 == INTEL_SIP_SMC_STATUS_BUSY ||
231231 wait_for_completion_timeout(&ctrl->complete_status, timeout));
232232 }
233233
@@ -250,7 +250,7 @@ static void svc_thread_cmd_config_status(struct stratix10_svc_controller *ctrl, · 16 unmodified lines
250250 cb_data->kaddr1 = NULL;
251251 cb_data->kaddr2 = NULL;
252252 cb_data->kaddr3 = NULL;
253− cb_data->status = BIT(SVC_STATUS_RECONFIG_ERROR);
253+ cb_data->status = BIT(SVC_STATUS_ERROR);
254254
255255 pr_debug("%s: polling config status\n", __func__);
256256
@@ -259,7 +259,7 @@ static void svc_thread_cmd_config_status(struct stratix10_svc_controller *ctrl, · 2 unmodified lines
259259 ctrl->invoke_fn(INTEL_SIP_SMC_FPGA_CONFIG_ISDONE,
260260 0, 0, 0, 0, 0, 0, 0, &res);
261261 if ((res.a0 == INTEL_SIP_SMC_STATUS_OK) ||
262− (res.a0 == INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR))
262+ (res.a0 == INTEL_SIP_SMC_STATUS_ERROR))
263263 break;
264264
265265 /*
@@ -271,7 +271,7 @@ static void svc_thread_cmd_config_status(struct stratix10_svc_controller *ctrl, · 5 unmodified lines
271271 }
272272
273273 if (res.a0 == INTEL_SIP_SMC_STATUS_OK && count_in_sec)
274− cb_data->status = BIT(SVC_STATUS_RECONFIG_COMPLETED);
274+ cb_data->status = BIT(SVC_STATUS_COMPLETED);
275275
276276 p_data->chan->scl->receive_cb(p_data->chan->scl, cb_data);
277277 }
@@ -294,24 +294,18 @@ static void svc_thread_recv_status_ok(struct stratix10_svc_data *p_data, · 16 unmodified lines
294294
295295 switch (p_data->command) {
296296 case COMMAND_RECONFIG:
297− cb_data->status = BIT(SVC_STATUS_RECONFIG_REQUEST_OK);
297+ case COMMAND_RSU_UPDATE:
298+ case COMMAND_RSU_NOTIFY:
299+ cb_data->status = BIT(SVC_STATUS_OK);
298300 break;
299301 case COMMAND_RECONFIG_DATA_SUBMIT:
300− cb_data->status = BIT(SVC_STATUS_RECONFIG_BUFFER_SUBMITTED);
301− break;
302− case COMMAND_NOOP:
303− cb_data->status = BIT(SVC_STATUS_RECONFIG_BUFFER_SUBMITTED);
304− cb_data->kaddr1 = svc_pa_to_va(res.a1);
302+ cb_data->status = BIT(SVC_STATUS_BUFFER_SUBMITTED);
305303 break;
306304 case COMMAND_RECONFIG_STATUS:
307− cb_data->status = BIT(SVC_STATUS_RECONFIG_COMPLETED);
308− break;
309− case COMMAND_RSU_UPDATE:
310− case COMMAND_RSU_NOTIFY:
311− cb_data->status = BIT(SVC_STATUS_RSU_OK);
305+ cb_data->status = BIT(SVC_STATUS_COMPLETED);
312306 break;
313307 case COMMAND_RSU_RETRY:
314− cb_data->status = BIT(SVC_STATUS_RSU_OK);
308+ cb_data->status = BIT(SVC_STATUS_OK);
315309 cb_data->kaddr1 = &res.a1;
316310 break;
317311 default:
@@ -430,9 +424,9 @@ static int svc_normal_to_secure_thread(void *data) · 112 unmodified lines
430424
431425 if (pdata->command == COMMAND_RSU_STATUS) {
432426 if (res.a0 == INTEL_SIP_SMC_RSU_ERROR)
433− cbdata->status = BIT(SVC_STATUS_RSU_ERROR);
427+ cbdata->status = BIT(SVC_STATUS_ERROR);
434428 else
435− cbdata->status = BIT(SVC_STATUS_RSU_OK);
429+ cbdata->status = BIT(SVC_STATUS_OK);
436430
437431 cbdata->kaddr1 = &res;
438432 cbdata->kaddr2 = NULL;
@@ -445,7 +439,7 @@ static int svc_normal_to_secure_thread(void *data) · 6 unmodified lines
445439 case INTEL_SIP_SMC_STATUS_OK:
446440 svc_thread_recv_status_ok(pdata, cbdata, res);
447441 break;
448− case INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY:
442+ case INTEL_SIP_SMC_STATUS_BUSY:
449443 switch (pdata->command) {
450444 case COMMAND_RECONFIG_DATA_SUBMIT:
451445 svc_thread_cmd_data_claim(ctrl,
@@ -460,33 +454,13 @@ static int svc_normal_to_secure_thread(void *data) · 8 unmodified lines
460454 break;
461455 }
462456 break;
463− case INTEL_SIP_SMC_FPGA_CONFIG_STATUS_REJECTED:
457+ case INTEL_SIP_SMC_STATUS_REJECTED:
464458 pr_debug("%s: STATUS_REJECTED\n", __func__);
465459 break;
466− case INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR:
460+ case INTEL_SIP_SMC_STATUS_ERROR:
467461 case INTEL_SIP_SMC_RSU_ERROR:
468462 pr_err("%s: STATUS_ERROR\n", __func__);
469− switch (pdata->command) {
470− /* for FPGA mgr */
471− case COMMAND_RECONFIG_DATA_CLAIM:
472− case COMMAND_RECONFIG:
473− case COMMAND_RECONFIG_DATA_SUBMIT:
474− case COMMAND_RECONFIG_STATUS:
475− cbdata->status =
476− BIT(SVC_STATUS_RECONFIG_ERROR);
477− break;
478−
479− /* for RSU */
480− case COMMAND_RSU_STATUS:
481− case COMMAND_RSU_UPDATE:
482− case COMMAND_RSU_NOTIFY:
483− case COMMAND_RSU_RETRY:
484− cbdata->status =
485− BIT(SVC_STATUS_RSU_ERROR);
486− break;
487− }
488−
489− cbdata->status = BIT(SVC_STATUS_RECONFIG_ERROR);
463+ cbdata->status = BIT(SVC_STATUS_ERROR);
490464 cbdata->kaddr1 = NULL;
491465 cbdata->kaddr2 = NULL;
492466 cbdata->kaddr3 = NULL;
@@ -502,7 +476,7 @@ static int svc_normal_to_secure_thread(void *data) · 9 unmodified lines
502476 if ((pdata->command == COMMAND_RSU_RETRY) ||
503477 (pdata->command == COMMAND_RSU_NOTIFY)) {
504478 cbdata->status =
505− BIT(SVC_STATUS_RSU_NO_SUPPORT);
479+ BIT(SVC_STATUS_NO_SUPPORT);
506480 cbdata->kaddr1 = NULL;
507481 cbdata->kaddr2 = NULL;
508482 cbdata->kaddr3 = NULL;
drivers/fpga/stratix10-soc.c+10−15
@@ -154,11 +154,11 @@ static void s10_receive_callback(struct stratix10_svc_client *client, · 153 unmodified lines
154154 * Here we set status bits as we receive them. Elsewhere, we always use
155155 * test_and_clear_bit() to check status in priv->status
156156 */
157− for (i = 0; i <= SVC_STATUS_RECONFIG_ERROR; i++)
157+ for (i = 0; i <= SVC_STATUS_ERROR; i++)
158158 if (status & (1 << i))
159159 set_bit(i, &priv->status);
160160
161− if (status & BIT(SVC_STATUS_RECONFIG_BUFFER_DONE)) {
161+ if (status & BIT(SVC_STATUS_BUFFER_DONE)) {
162162 s10_unlock_bufs(priv, data->kaddr1);
163163 s10_unlock_bufs(priv, data->kaddr2);
164164 s10_unlock_bufs(priv, data->kaddr3);
@@ -209,8 +209,7 @@ static int s10_ops_write_init(struct fpga_manager *mgr, · 44 unmodified lines
209209 }
210210
211211 ret = 0;
212− if (!test_and_clear_bit(SVC_STATUS_RECONFIG_REQUEST_OK,
213− &priv->status)) {
212+ if (!test_and_clear_bit(SVC_STATUS_OK, &priv->status)) {
214213 ret = -ETIMEDOUT;
215214 goto init_done;
216215 }
@@ -323,17 +322,15 @@ static int s10_ops_write(struct fpga_manager *mgr, const char *buf, · 106 unmodified lines
323322 &priv->status_return_completion,
324323 S10_BUFFER_TIMEOUT);
325324
326− if (test_and_clear_bit(SVC_STATUS_RECONFIG_BUFFER_DONE,
327− &priv->status) ||
328− test_and_clear_bit(SVC_STATUS_RECONFIG_BUFFER_SUBMITTED,
325+ if (test_and_clear_bit(SVC_STATUS_BUFFER_DONE, &priv->status) ||
326+ test_and_clear_bit(SVC_STATUS_BUFFER_SUBMITTED,
329327 &priv->status)) {
330328 ret = 0;
331329 continue;
332330 }
333331
334− if (test_and_clear_bit(SVC_STATUS_RECONFIG_ERROR,
335− &priv->status)) {
336− dev_err(dev, "ERROR - giving up - SVC_STATUS_RECONFIG_ERROR\n");
332+ if (test_and_clear_bit(SVC_STATUS_ERROR, &priv->status)) {
333+ dev_err(dev, "ERROR - giving up - SVC_STATUS_ERROR\n");
337334 ret = -EFAULT;
338335 break;
339336 }
@@ -393,13 +390,11 @@ static int s10_ops_write_complete(struct fpga_manager *mgr, · 53 unmodified lines
393390 timeout = ret;
394391 ret = 0;
395392
396− if (test_and_clear_bit(SVC_STATUS_RECONFIG_COMPLETED,
397− &priv->status))
393+ if (test_and_clear_bit(SVC_STATUS_COMPLETED, &priv->status))
398394 break;
399395
400− if (test_and_clear_bit(SVC_STATUS_RECONFIG_ERROR,
401− &priv->status)) {
402− dev_err(dev, "ERROR - giving up - SVC_STATUS_RECONFIG_ERROR\n");
396+ if (test_and_clear_bit(SVC_STATUS_ERROR, &priv->status)) {
397+ dev_err(dev, "ERROR - giving up - SVC_STATUS_ERROR\n");
403398 ret = -EFAULT;
404399 break;
405400 }
include/linux/firmware/intel/stratix10-smc.h+21−28
@@ -54,32 +54,25 @@ · 53 unmodified lines
5454 * Secure monitor software doesn't recognize the request.
5555 *
5656 * INTEL_SIP_SMC_STATUS_OK:
57− * FPGA configuration completed successfully,
58− * In case of FPGA configuration write operation, it means secure monitor
59− * software can accept the next chunk of FPGA configuration data.
57+ * Secure monitor software accepts the service client's request.
6058 *
61− * INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY:
62− * In case of FPGA configuration write operation, it means secure monitor
63− * software is still processing previous data & can't accept the next chunk
64− * of data. Service driver needs to issue
65− * INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE call to query the
66− * completed block(s).
59+ * INTEL_SIP_SMC_STATUS_BUSY:
60+ * Secure monitor software is still processing service client's request.
6761 *
68− * INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR:
69− * There is error during the FPGA configuration process.
62+ * INTEL_SIP_SMC_STATUS_REJECTED:
63+ * Secure monitor software reject the service client's request.
7064 *
71− * INTEL_SIP_SMC_REG_ERROR:
72− * There is error during a read or write operation of the protected registers.
65+ * INTEL_SIP_SMC_STATUS_ERROR:
66+ * There is error during the process of service request.
7367 *
7468 * INTEL_SIP_SMC_RSU_ERROR:
75− * There is error during a remote status update.
69+ * There is error during the process of remote status update request.
7670 */
7771 #define INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION 0xFFFFFFFF
7872 #define INTEL_SIP_SMC_STATUS_OK 0x0
79−#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY 0x1
80−#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_REJECTED 0x2
81−#define INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR 0x4
82−#define INTEL_SIP_SMC_REG_ERROR 0x5
73+#define INTEL_SIP_SMC_STATUS_BUSY 0x1
74+#define INTEL_SIP_SMC_STATUS_REJECTED 0x2
75+#define INTEL_SIP_SMC_STATUS_ERROR 0x4
8376 #define INTEL_SIP_SMC_RSU_ERROR 0x7
8477
8578 /**
@@ -95,7 +88,7 @@ · 9 unmodified lines
9588 * a2-7: not used.
9689 *
9790 * Return status:
98− * a0: INTEL_SIP_SMC_STATUS_OK, or INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR.
91+ * a0: INTEL_SIP_SMC_STATUS_OK, or INTEL_SIP_SMC_STATUS_ERROR.
9992 * a1-3: not used.
10093 */
10194 #define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_START 1
@@ -115,8 +108,8 @@ · 13 unmodified lines
115108 * a3-7: not used.
116109 *
117110 * Return status:
118− * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY or
119− * INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR.
111+ * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_BUSY or
112+ * INTEL_SIP_SMC_STATUS_ERROR.
120113 * a1: 64bit physical address of 1st completed memory block if any completed
121114 * block, otherwise zero value.
122115 * a2: 64bit physical address of 2nd completed memory block if any completed
@@ -133,15 +126,15 @@ · 10 unmodified lines
133126 *
134127 * Sync call used by service driver at EL1 to track the completed write
135128 * transactions. This request is called after INTEL_SIP_SMC_FPGA_CONFIG_WRITE
136− * call returns INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY.
129+ * call returns INTEL_SIP_SMC_STATUS_BUSY.
137130 *
138131 * Call register usage:
139132 * a0: INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE.
140133 * a1-7: not used.
141134 *
142135 * Return status:
143− * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY or
144− * INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR.
136+ * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FPGA_BUSY or
137+ * INTEL_SIP_SMC_STATUS_ERROR.
145138 * a1: 64bit physical address of 1st completed memory block.
146139 * a2: 64bit physical address of 2nd completed memory block if
147140 * any completed block, otherwise zero value.
@@ -164,8 +157,8 @@ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE) · 16 unmodified lines
164157 * a1-7: not used.
165158 *
166159 * Return status:
167− * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_FPGA_CONFIG_STATUS_BUSY or
168− * INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR.
160+ * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_STATUS_BUSY or
161+ * INTEL_SIP_SMC_STATUS_ERROR.
169162 * a1-3: not used.
170163 */
171164 #define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_ISDONE 4
@@ -183,7 +176,7 @@ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE) · 11 unmodified lines
183176 * a1-7: not used.
184177 *
185178 * Return status:
186− * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR.
179+ * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_STATUS_ERROR.
187180 * a1: start of physical address of reserved memory block.
188181 * a2: size of reserved memory block.
189182 * a3: not used.
@@ -203,7 +196,7 @@ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE) · 13 unmodified lines
203196 * a1-7: not used.
204197 *
205198 * Return status:
206− * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_FPGA_CONFIG_STATUS_ERROR.
199+ * a0: INTEL_SIP_SMC_STATUS_OK or INTEL_SIP_SMC_STATUS_ERROR.
207200 * a1-3: not used.
208201 */
209202 #define INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_LOOPBACK 6
include/linux/firmware/intel/stratix10-svc-client.h+30−41
@@ -18,45 +18,37 @@ · 17 unmodified lines
1818 /**
1919 * Status of the sent command, in bit number
2020 *
21− * SVC_COMMAND_STATUS_RECONFIG_REQUEST_OK:
22− * Secure firmware accepts the request of FPGA reconfiguration.
21+ * SVC_STATUS_OK:
22+ * Secure firmware accepts the request issued by one of service clients.
2323 *
24− * SVC_STATUS_RECONFIG_BUFFER_SUBMITTED:
25− * Service client successfully submits FPGA configuration
26− * data buffer to secure firmware.
24+ * SVC_STATUS_BUFFER_SUBMITTED:
25+ * Service client successfully submits data buffer to secure firmware.
2726 *
28− * SVC_COMMAND_STATUS_RECONFIG_BUFFER_DONE:
27+ * SVC_STATUS_BUFFER_DONE:
2928 * Secure firmware completes data process, ready to accept the
3029 * next WRITE transaction.
3130 *
32− * SVC_COMMAND_STATUS_RECONFIG_COMPLETED:
33− * Secure firmware completes FPGA configuration successfully, FPGA should
34− * be in user mode.
31+ * SVC_STATUS_COMPLETED:
32+ * Secure firmware completes service request successfully. In case of
33+ * FPGA configuration, FPGA should be in user mode.
3534 *
36− * SVC_COMMAND_STATUS_RECONFIG_BUSY:
37− * FPGA configuration is still in process.
35+ * SVC_COMMAND_STATUS_BUSY:
36+ * Service request is still in process.
3837 *
39− * SVC_COMMAND_STATUS_RECONFIG_ERROR:
40− * Error encountered during FPGA configuration.
38+ * SVC_COMMAND_STATUS_ERROR:
39+ * Error encountered during the process of the service request.
4140 *
42− * SVC_STATUS_RSU_OK:
43− * Secure firmware accepts the request of remote status update (RSU).
44− *
45− * SVC_STATUS_RSU_ERROR:
46− * Error encountered during remote system update.
47− *
48− * SVC_STATUS_RSU_NO_SUPPORT:
49− * Secure firmware doesn't support RSU retry or notify feature.
41+ * SVC_STATUS_NO_SUPPORT:
42+ * Secure firmware doesn't support requested features such as RSU retry
43+ * or RSU notify.
5044 */
51−#define SVC_STATUS_RECONFIG_REQUEST_OK 0
52−#define SVC_STATUS_RECONFIG_BUFFER_SUBMITTED 1
53−#define SVC_STATUS_RECONFIG_BUFFER_DONE 2
54−#define SVC_STATUS_RECONFIG_COMPLETED 3
55−#define SVC_STATUS_RECONFIG_BUSY 4
56−#define SVC_STATUS_RECONFIG_ERROR 5
57−#define SVC_STATUS_RSU_OK 6
58−#define SVC_STATUS_RSU_ERROR 7
59−#define SVC_STATUS_RSU_NO_SUPPORT 8
45+#define SVC_STATUS_OK 0
46+#define SVC_STATUS_BUFFER_SUBMITTED 1
47+#define SVC_STATUS_BUFFER_DONE 2
48+#define SVC_STATUS_COMPLETED 3
49+#define SVC_STATUS_BUSY 4
50+#define SVC_STATUS_ERROR 5
51+#define SVC_STATUS_NO_SUPPORT 6
6052
6153 /**
6254 * Flag bit for COMMAND_RECONFIG
@@ -84,32 +76,29 @@ struct stratix10_svc_chan; · 21 unmodified lines
8476 * @COMMAND_NOOP: do 'dummy' request for integration/debug/trouble-shooting
8577 *
8678 * @COMMAND_RECONFIG: ask for FPGA configuration preparation, return status
87− * is SVC_STATUS_RECONFIG_REQUEST_OK
79+ * is SVC_STATUS_OK
8880 *
8981 * @COMMAND_RECONFIG_DATA_SUBMIT: submit buffer(s) of bit-stream data for the
90− * FPGA configuration, return status is SVC_STATUS_RECONFIG_BUFFER_SUBMITTED,
91− * or SVC_STATUS_RECONFIG_ERROR
82+ * FPGA configuration, return status is SVC_STATUS_SUBMITTED or SVC_STATUS_ERROR
9283 *
9384 * @COMMAND_RECONFIG_DATA_CLAIM: check the status of the configuration, return
94− * status is SVC_STATUS_RECONFIG_COMPLETED, or SVC_STATUS_RECONFIG_BUSY, or
95− * SVC_STATUS_RECONFIG_ERROR
85+ * status is SVC_STATUS_COMPLETED, or SVC_STATUS_BUSY, or SVC_STATUS_ERROR
9686 *
9787 * @COMMAND_RECONFIG_STATUS: check the status of the configuration, return
98− * status is SVC_STATUS_RECONFIG_COMPLETED, or SVC_STATUS_RECONFIG_BUSY, or
99− * SVC_STATUS_RECONFIG_ERROR
88+ * status is SVC_STATUS_COMPLETED, or SVC_STATUS_BUSY, or SVC_STATUS_ERROR
10089 *
10190 * @COMMAND_RSU_STATUS: request remote system update boot log, return status
10291 * is log data or SVC_STATUS_RSU_ERROR
10392 *
10493 * @COMMAND_RSU_UPDATE: set the offset of the bitstream to boot after reboot,
105− * return status is SVC_STATUS_RSU_OK or SVC_STATUS_RSU_ERROR
94+ * return status is SVC_STATUS_OK or SVC_STATUS_ERROR
10695 *
10796 * @COMMAND_RSU_NOTIFY: report the status of hard processor system
108− * software to firmware, return status is SVC_STATUS_RSU_OK or
109− * SVC_STATUS_RSU_ERROR
97+ * software to firmware, return status is SVC_STATUS_OK or
98+ * SVC_STATUS_ERROR
11099 *
111100 * @COMMAND_RSU_RETRY: query firmware for the current image's retry counter,
112− * return status is SVC_STATUS_RSU_OK or SVC_STATUS_RSU_ERROR
101+ * return status is SVC_STATUS_OK or SVC_STATUS_ERROR
113102 */
114103 enum stratix10_svc_command_code {
115104 COMMAND_NOOP = 0,