|
@@ -263,112 +263,6 @@ u16 hpi_adapter_get_module_by_index(u16 adapter_index, u16 module_index,
|
|
|
return hr.error;
|
|
|
}
|
|
|
|
|
|
-u16 hpi_adapter_get_assert2(u16 adapter_index, u16 *p_assert_count,
|
|
|
- char *psz_assert, u32 *p_param1, u32 *p_param2,
|
|
|
- u32 *p_dsp_string_addr, u16 *p_processor_id)
|
|
|
-{
|
|
|
- struct hpi_message hm;
|
|
|
- struct hpi_response hr;
|
|
|
- hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
|
|
|
- HPI_ADAPTER_GET_ASSERT);
|
|
|
- hm.adapter_index = adapter_index;
|
|
|
-
|
|
|
- hpi_send_recv(&hm, &hr);
|
|
|
-
|
|
|
- *p_assert_count = 0;
|
|
|
-
|
|
|
- if (!hr.error) {
|
|
|
- *p_assert_count = hr.u.ax.assert.count;
|
|
|
-
|
|
|
- if (*p_assert_count) {
|
|
|
- *p_param1 = hr.u.ax.assert.p1;
|
|
|
- *p_param2 = hr.u.ax.assert.p2;
|
|
|
- *p_processor_id = hr.u.ax.assert.dsp_index;
|
|
|
- *p_dsp_string_addr = hr.u.ax.assert.dsp_msg_addr;
|
|
|
- memcpy(psz_assert, hr.u.ax.assert.sz_message,
|
|
|
- HPI_STRING_LEN);
|
|
|
- } else {
|
|
|
- *psz_assert = 0;
|
|
|
- }
|
|
|
- }
|
|
|
- return hr.error;
|
|
|
-}
|
|
|
-
|
|
|
-u16 hpi_adapter_test_assert(u16 adapter_index, u16 assert_id)
|
|
|
-{
|
|
|
- struct hpi_message hm;
|
|
|
- struct hpi_response hr;
|
|
|
- hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
|
|
|
- HPI_ADAPTER_TEST_ASSERT);
|
|
|
- hm.adapter_index = adapter_index;
|
|
|
- hm.u.ax.test_assert.value = assert_id;
|
|
|
-
|
|
|
- hpi_send_recv(&hm, &hr);
|
|
|
-
|
|
|
- return hr.error;
|
|
|
-}
|
|
|
-
|
|
|
-u16 hpi_adapter_enable_capability(u16 adapter_index, u16 capability, u32 key)
|
|
|
-{
|
|
|
-#if 1
|
|
|
- return HPI_ERROR_UNIMPLEMENTED;
|
|
|
-#else
|
|
|
- struct hpi_message hm;
|
|
|
- struct hpi_response hr;
|
|
|
- hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
|
|
|
- HPI_ADAPTER_ENABLE_CAPABILITY);
|
|
|
- hm.adapter_index = adapter_index;
|
|
|
- hm.u.ax.enable_cap.cap = capability;
|
|
|
- hm.u.ax.enable_cap.key = key;
|
|
|
-
|
|
|
- hpi_send_recv(&hm, &hr);
|
|
|
-
|
|
|
- return hr.error;
|
|
|
-#endif
|
|
|
-}
|
|
|
-
|
|
|
-u16 hpi_adapter_self_test(u16 adapter_index)
|
|
|
-{
|
|
|
- struct hpi_message hm;
|
|
|
- struct hpi_response hr;
|
|
|
- hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER,
|
|
|
- HPI_ADAPTER_SELFTEST);
|
|
|
- hm.adapter_index = adapter_index;
|
|
|
- hpi_send_recv(&hm, &hr);
|
|
|
- return hr.error;
|
|
|
-}
|
|
|
-
|
|
|
-u16 hpi_adapter_debug_read(u16 adapter_index, u32 dsp_address, char *p_buffer,
|
|
|
- int *count_bytes)
|
|
|
-{
|
|
|
- struct hpi_msg_adapter_debug_read hm;
|
|
|
- struct hpi_res_adapter_debug_read hr;
|
|
|
-
|
|
|
- hpi_init_message_responseV1(&hm.h, sizeof(hm), &hr.h, sizeof(hr),
|
|
|
- HPI_OBJ_ADAPTER, HPI_ADAPTER_DEBUG_READ);
|
|
|
-
|
|
|
- hm.h.adapter_index = adapter_index;
|
|
|
- hm.dsp_address = dsp_address;
|
|
|
-
|
|
|
- if (*count_bytes > (int)sizeof(hr.bytes))
|
|
|
- *count_bytes = (int)sizeof(hr.bytes);
|
|
|
-
|
|
|
- hm.count_bytes = *count_bytes;
|
|
|
-
|
|
|
- hpi_send_recvV1(&hm.h, &hr.h);
|
|
|
-
|
|
|
- if (!hr.h.error) {
|
|
|
- int res_bytes = hr.h.size - sizeof(hr.h);
|
|
|
- if (res_bytes > *count_bytes)
|
|
|
- res_bytes = *count_bytes;
|
|
|
- *count_bytes = res_bytes;
|
|
|
- memcpy(p_buffer, &hr.bytes, res_bytes);
|
|
|
- } else
|
|
|
- *count_bytes = 0;
|
|
|
-
|
|
|
- return hr.h.error;
|
|
|
-}
|
|
|
-
|
|
|
u16 hpi_adapter_set_property(u16 adapter_index, u16 property, u16 parameter1,
|
|
|
u16 parameter2)
|
|
|
{
|