/** * Submit a command to the ZIP block * * @param command Zip command to submit * @param queue Zip instruction queue of the command * * @return Zero on success, negative on failure */ int cvmx_zip_queue_submit(cvmx_zip_command_t *command, int queue) { cvmx_cmd_queue_result_t result = cvmx_cmd_queue_write(CVMX_CMD_QUEUE_ZIP_QUE(queue), 1, 8, command->u64); if (result == CVMX_CMD_QUEUE_SUCCESS) cvmx_write_csr((CVMX_ADDR_DID(CVMX_FULL_DID(7, 0)) | queue << 3), 8); return result; }
/** * Submit a command to the DFA block * * @param command DFA command to submit * * @return Zero on success, negative on failure */ int cvmx_hfa_submit(cvmx_dfa_command_t *command) { cvmx_cmd_queue_result_t result = cvmx_cmd_queue_write(CVMX_CMD_QUEUE_DFA, 1, 4, command->u64); if (result == CVMX_CMD_QUEUE_SUCCESS) cvmx_write_csr(CVMX_DFA_DBELL, 1); return result; }
/** * Submit a command to the RAID block * * @param num_words Number of command words to submit * @param words Command words * * @return Zero on success, negative on failure */ int cvmx_raid_submit(int num_words, cvmx_raid_word_t words[]) { cvmx_cmd_queue_result_t result = cvmx_cmd_queue_write(CVMX_CMD_QUEUE_RAID, 1, num_words, (uint64_t *) words); if (result == CVMX_CMD_QUEUE_SUCCESS) cvmx_write_csr(CVMX_ADDR_DID(CVMX_FULL_DID(14, 0)), num_words); return result; }