Lines Matching refs:ret

20 	int ret, empty;  in cdns_mhdp_secure_mailbox_read()  local
24 ret = readx_poll_timeout(readl, mhdp->sapb_regs + CDNS_MAILBOX_EMPTY, in cdns_mhdp_secure_mailbox_read()
27 if (ret < 0) in cdns_mhdp_secure_mailbox_read()
28 return ret; in cdns_mhdp_secure_mailbox_read()
36 int ret, full; in cdns_mhdp_secure_mailbox_write() local
40 ret = readx_poll_timeout(readl, mhdp->sapb_regs + CDNS_MAILBOX_FULL, in cdns_mhdp_secure_mailbox_write()
43 if (ret < 0) in cdns_mhdp_secure_mailbox_write()
44 return ret; in cdns_mhdp_secure_mailbox_write()
58 int ret; in cdns_mhdp_secure_mailbox_recv_header() local
62 ret = cdns_mhdp_secure_mailbox_read(mhdp); in cdns_mhdp_secure_mailbox_recv_header()
63 if (ret < 0) in cdns_mhdp_secure_mailbox_recv_header()
64 return ret; in cdns_mhdp_secure_mailbox_recv_header()
66 header[i] = ret; in cdns_mhdp_secure_mailbox_recv_header()
85 int ret; in cdns_mhdp_secure_mailbox_recv_data() local
89 ret = cdns_mhdp_secure_mailbox_read(mhdp); in cdns_mhdp_secure_mailbox_recv_data()
90 if (ret < 0) in cdns_mhdp_secure_mailbox_recv_data()
91 return ret; in cdns_mhdp_secure_mailbox_recv_data()
93 buff[i] = ret; in cdns_mhdp_secure_mailbox_recv_data()
106 int ret; in cdns_mhdp_secure_mailbox_send() local
114 ret = cdns_mhdp_secure_mailbox_write(mhdp, header[i]); in cdns_mhdp_secure_mailbox_send()
115 if (ret) in cdns_mhdp_secure_mailbox_send()
116 return ret; in cdns_mhdp_secure_mailbox_send()
120 ret = cdns_mhdp_secure_mailbox_write(mhdp, message[i]); in cdns_mhdp_secure_mailbox_send()
121 if (ret) in cdns_mhdp_secure_mailbox_send()
122 return ret; in cdns_mhdp_secure_mailbox_send()
132 int ret; in cdns_mhdp_hdcp_get_status() local
135 ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_get_status()
137 if (ret) in cdns_mhdp_hdcp_get_status()
140 ret = cdns_mhdp_secure_mailbox_recv_header(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_get_status()
143 if (ret) in cdns_mhdp_hdcp_get_status()
146 ret = cdns_mhdp_secure_mailbox_recv_data(mhdp, hdcp_status, in cdns_mhdp_hdcp_get_status()
148 if (ret) in cdns_mhdp_hdcp_get_status()
156 return ret; in cdns_mhdp_hdcp_get_status()
173 int ret; in cdns_mhdp_hdcp_rx_id_valid_response() local
176 ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_rx_id_valid_response()
181 return ret; in cdns_mhdp_hdcp_rx_id_valid_response()
189 int ret; in cdns_mhdp_hdcp_rx_id_valid() local
192 ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_rx_id_valid()
194 if (ret) in cdns_mhdp_hdcp_rx_id_valid()
197 ret = cdns_mhdp_secure_mailbox_recv_header(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_rx_id_valid()
200 if (ret) in cdns_mhdp_hdcp_rx_id_valid()
203 ret = cdns_mhdp_secure_mailbox_recv_data(mhdp, rec_id_hdr, 2); in cdns_mhdp_hdcp_rx_id_valid()
204 if (ret) in cdns_mhdp_hdcp_rx_id_valid()
209 ret = cdns_mhdp_secure_mailbox_recv_data(mhdp, hdcp_rx_id, 5 * *recv_num); in cdns_mhdp_hdcp_rx_id_valid()
214 return ret; in cdns_mhdp_hdcp_rx_id_valid()
220 int ret; in cdns_mhdp_hdcp_km_stored_resp() local
223 ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_km_stored_resp()
227 return ret; in cdns_mhdp_hdcp_km_stored_resp()
233 int ret; in cdns_mhdp_hdcp_tx_is_km_stored() local
236 ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_tx_is_km_stored()
238 if (ret) in cdns_mhdp_hdcp_tx_is_km_stored()
241 ret = cdns_mhdp_secure_mailbox_recv_header(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_tx_is_km_stored()
244 if (ret) in cdns_mhdp_hdcp_tx_is_km_stored()
247 ret = cdns_mhdp_secure_mailbox_recv_data(mhdp, resp, size); in cdns_mhdp_hdcp_tx_is_km_stored()
251 return ret; in cdns_mhdp_hdcp_tx_is_km_stored()
257 int ret; in cdns_mhdp_hdcp_tx_config() local
260 ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_tx_config()
264 return ret; in cdns_mhdp_hdcp_tx_config()
273 int ret; in cdns_mhdp_hdcp_set_config() local
282 ret = cdns_mhdp_hdcp_get_status(mhdp, &hdcp_port_status); in cdns_mhdp_hdcp_set_config()
283 if (ret || cdns_mhdp_hdcp_handle_status(mhdp, hdcp_port_status)) in cdns_mhdp_hdcp_set_config()
293 int ret; in cdns_mhdp_hdcp_auth_check() local
299 ret = cdns_mhdp_hdcp_get_status(mhdp, &hdcp_port_status); in cdns_mhdp_hdcp_auth_check()
300 if (ret || cdns_mhdp_hdcp_handle_status(mhdp, hdcp_port_status)) in cdns_mhdp_hdcp_auth_check()
337 int ret; in cdns_mhdp_hdcp_auth_22() local
347 ret = cdns_mhdp_hdcp_get_status(mhdp, &hdcp_port_status); in cdns_mhdp_hdcp_auth_22()
348 if (ret || cdns_mhdp_hdcp_handle_status(mhdp, hdcp_port_status)) in cdns_mhdp_hdcp_auth_22()
370 int ret; in cdns_mhdp_hdcp_auth() local
372 ret = cdns_mhdp_hdcp_set_config(mhdp, hdcp_config, true); in cdns_mhdp_hdcp_auth()
373 if (ret) in cdns_mhdp_hdcp_auth()
377 ret = cdns_mhdp_hdcp_auth_14(mhdp); in cdns_mhdp_hdcp_auth()
379 ret = cdns_mhdp_hdcp_auth_22(mhdp); in cdns_mhdp_hdcp_auth()
381 if (ret) in cdns_mhdp_hdcp_auth()
384 ret = cdns_mhdp_hdcp_auth_check(mhdp); in cdns_mhdp_hdcp_auth()
385 if (ret) in cdns_mhdp_hdcp_auth()
386 ret = cdns_mhdp_hdcp_auth_check(mhdp); in cdns_mhdp_hdcp_auth()
389 return ret; in cdns_mhdp_hdcp_auth()
394 int ret; in _cdns_mhdp_hdcp_disable() local
399 ret = cdns_mhdp_hdcp_set_config(mhdp, 0, false); in _cdns_mhdp_hdcp_disable()
401 return ret; in _cdns_mhdp_hdcp_disable()
406 int ret = -EINVAL; in _cdns_mhdp_hdcp_enable() local
413 ret = cdns_mhdp_hdcp_auth(mhdp, HDCP_TX_2); in _cdns_mhdp_hdcp_enable()
414 if (!ret) in _cdns_mhdp_hdcp_enable()
420 ret = cdns_mhdp_hdcp_auth(mhdp, HDCP_TX_1); in _cdns_mhdp_hdcp_enable()
421 if (!ret) in _cdns_mhdp_hdcp_enable()
428 tries, ret); in _cdns_mhdp_hdcp_enable()
430 return ret; in _cdns_mhdp_hdcp_enable()
436 int ret = 0; in cdns_mhdp_hdcp_check_link() local
442 ret = cdns_mhdp_hdcp_get_status(mhdp, &hdcp_port_status); in cdns_mhdp_hdcp_check_link()
443 if (!ret && hdcp_port_status & HDCP_PORT_STS_AUTH) in cdns_mhdp_hdcp_check_link()
450 ret = _cdns_mhdp_hdcp_disable(mhdp); in cdns_mhdp_hdcp_check_link()
451 if (ret) { in cdns_mhdp_hdcp_check_link()
457 ret = _cdns_mhdp_hdcp_enable(mhdp, mhdp->hdcp.hdcp_content_type); in cdns_mhdp_hdcp_check_link()
458 if (ret) { in cdns_mhdp_hdcp_check_link()
464 return ret; in cdns_mhdp_hdcp_check_link()
505 int ret; in cdns_mhdp_hdcp_set_lc() local
508 ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_GENERAL, in cdns_mhdp_hdcp_set_lc()
513 return ret; in cdns_mhdp_hdcp_set_lc()
520 int ret; in cdns_mhdp_hdcp_set_public_key_param() local
523 ret = cdns_mhdp_secure_mailbox_send(mhdp, MB_MODULE_ID_HDCP_TX, in cdns_mhdp_hdcp_set_public_key_param()
528 return ret; in cdns_mhdp_hdcp_set_public_key_param()
533 int ret; in cdns_mhdp_hdcp_enable() local
536 ret = _cdns_mhdp_hdcp_enable(mhdp, content_type); in cdns_mhdp_hdcp_enable()
537 if (ret) in cdns_mhdp_hdcp_enable()
547 return ret; in cdns_mhdp_hdcp_enable()
552 int ret = 0; in cdns_mhdp_hdcp_disable() local
558 ret = _cdns_mhdp_hdcp_disable(mhdp); in cdns_mhdp_hdcp_disable()
563 return ret; in cdns_mhdp_hdcp_disable()