Commit 5e2eae57 authored by Rene Sapiens's avatar Rene Sapiens Committed by Greg Kroah-Hartman

staging: ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
ulBrdState to brd_state
ulChnl to chnl
ulDspAddr to dsp_add
ulDspDestAddr to dsp_dest_addr
ulDspLoadAddr to dsp_load_addr
ulDspRunAddr to dsp_run_addr
ulDspSrcAddr to dsp_src_addr
ulMapAttrs to map_attr
ulMemType to mem_type
ulRMSFxn to rms_fxn
ulStatus to ret
ulVirtAddr to virt_addr
uNumDesc to num_desc
uNumToDSP to num_to_dsp
uPaSize to pa_size
uPhase to phase
uSegId to segm_id
uStream1 to stream1
uStream2 to stream2
uZId to zid
========================================
Signed-off-by: default avatarRene Sapiens <rene.sapiens@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0cd343a4
...@@ -816,7 +816,7 @@ u32 io_buf_size(struct io_mgr *hio_mgr) ...@@ -816,7 +816,7 @@ u32 io_buf_size(struct io_mgr *hio_mgr)
* ======== io_cancel_chnl ======== * ======== io_cancel_chnl ========
* Cancel IO on a given PCPY channel. * Cancel IO on a given PCPY channel.
*/ */
void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl) void io_cancel_chnl(struct io_mgr *hio_mgr, u32 chnl)
{ {
struct io_mgr *pio_mgr = (struct io_mgr *)hio_mgr; struct io_mgr *pio_mgr = (struct io_mgr *)hio_mgr;
struct shm *sm; struct shm *sm;
...@@ -827,7 +827,7 @@ void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl) ...@@ -827,7 +827,7 @@ void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl)
/* Inform DSP that we have no more buffers on this channel */ /* Inform DSP that we have no more buffers on this channel */
IO_AND_VALUE(pio_mgr->hbridge_context, struct shm, sm, host_free_mask, IO_AND_VALUE(pio_mgr->hbridge_context, struct shm, sm, host_free_mask,
(~(1 << ulChnl))); (~(1 << chnl)));
sm_interrupt_dsp(pio_mgr->hbridge_context, MBX_PCPY_CLASS); sm_interrupt_dsp(pio_mgr->hbridge_context, MBX_PCPY_CLASS);
func_end: func_end:
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
/* ----------------------------------- Function Prototypes */ /* ----------------------------------- Function Prototypes */
static int add_new_msg(struct lst_list *msg_list); static int add_new_msg(struct lst_list *msg_list);
static void delete_msg_mgr(struct msg_mgr *hmsg_mgr); static void delete_msg_mgr(struct msg_mgr *hmsg_mgr);
static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP); static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 num_to_dsp);
static void free_msg_list(struct lst_list *msg_list); static void free_msg_list(struct lst_list *msg_list);
/* /*
...@@ -602,7 +602,7 @@ static void delete_msg_mgr(struct msg_mgr *hmsg_mgr) ...@@ -602,7 +602,7 @@ static void delete_msg_mgr(struct msg_mgr *hmsg_mgr)
/* /*
* ======== delete_msg_queue ======== * ======== delete_msg_queue ========
*/ */
static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP) static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 num_to_dsp)
{ {
struct msg_mgr *hmsg_mgr; struct msg_mgr *hmsg_mgr;
struct msg_frame *pmsg; struct msg_frame *pmsg;
...@@ -614,8 +614,8 @@ static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP) ...@@ -614,8 +614,8 @@ static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP)
hmsg_mgr = msg_queue_obj->hmsg_mgr; hmsg_mgr = msg_queue_obj->hmsg_mgr;
/* Pull off uNumToDSP message frames from Msg manager and free */ /* Pull off num_to_dsp message frames from Msg manager and free */
for (i = 0; i < uNumToDSP; i++) { for (i = 0; i < num_to_dsp; i++) {
if (!LST_IS_EMPTY(hmsg_mgr->msg_free_list)) { if (!LST_IS_EMPTY(hmsg_mgr->msg_free_list)) {
pmsg = (struct msg_frame *) pmsg = (struct msg_frame *)
......
...@@ -78,7 +78,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_context); ...@@ -78,7 +78,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_context);
static int bridge_brd_read(struct bridge_dev_context *dev_context, static int bridge_brd_read(struct bridge_dev_context *dev_context,
OUT u8 *host_buff, OUT u8 *host_buff,
u32 dsp_addr, u32 ul_num_bytes, u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType); u32 mem_type);
static int bridge_brd_start(struct bridge_dev_context *dev_context, static int bridge_brd_start(struct bridge_dev_context *dev_context,
u32 dsp_addr); u32 dsp_addr);
static int bridge_brd_status(struct bridge_dev_context *dev_context, static int bridge_brd_status(struct bridge_dev_context *dev_context,
...@@ -87,21 +87,21 @@ static int bridge_brd_stop(struct bridge_dev_context *dev_context); ...@@ -87,21 +87,21 @@ static int bridge_brd_stop(struct bridge_dev_context *dev_context);
static int bridge_brd_write(struct bridge_dev_context *dev_context, static int bridge_brd_write(struct bridge_dev_context *dev_context,
IN u8 *host_buff, IN u8 *host_buff,
u32 dsp_addr, u32 ul_num_bytes, u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType); u32 mem_type);
static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt, static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
u32 ulBrdState); u32 brd_state);
static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt, static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
u32 ulDspDestAddr, u32 ulDspSrcAddr, u32 dsp_dest_addr, u32 dsp_src_addr,
u32 ul_num_bytes, u32 ulMemType); u32 ul_num_bytes, u32 mem_type);
static int bridge_brd_mem_write(struct bridge_dev_context *dev_context, static int bridge_brd_mem_write(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr, IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType); u32 ul_num_bytes, u32 mem_type);
static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt, static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr, u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes, u32 ul_map_attr, u32 ul_num_bytes, u32 ul_map_attr,
struct page **mapped_pages); struct page **mapped_pages);
static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt, static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes); u32 virt_addr, u32 ul_num_bytes);
static int bridge_dev_create(OUT struct bridge_dev_context static int bridge_dev_create(OUT struct bridge_dev_context
**dev_cntxt, **dev_cntxt,
struct dev_object *hdev_obj, struct dev_object *hdev_obj,
...@@ -116,7 +116,7 @@ static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa, ...@@ -116,7 +116,7 @@ static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa,
static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va, static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,
u32 size, struct hw_mmu_map_attrs_t *attrs); u32 size, struct hw_mmu_map_attrs_t *attrs);
static int mem_map_vmalloc(struct bridge_dev_context *dev_ctxt, static int mem_map_vmalloc(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr, u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes, u32 ul_num_bytes,
struct hw_mmu_map_attrs_t *hw_attrs); struct hw_mmu_map_attrs_t *hw_attrs);
...@@ -305,7 +305,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt) ...@@ -305,7 +305,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt)
*/ */
static int bridge_brd_read(struct bridge_dev_context *dev_ctxt, static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buff, u32 dsp_addr, OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType) u32 ul_num_bytes, u32 mem_type)
{ {
int status = 0; int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt; struct bridge_dev_context *dev_context = dev_ctxt;
...@@ -322,7 +322,7 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt, ...@@ -322,7 +322,7 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
offset = dsp_addr - dev_context->dw_dsp_start_add; offset = dsp_addr - dev_context->dw_dsp_start_add;
} else { } else {
status = read_ext_dsp_data(dev_context, host_buff, dsp_addr, status = read_ext_dsp_data(dev_context, host_buff, dsp_addr,
ul_num_bytes, ulMemType); ul_num_bytes, mem_type);
return status; return status;
} }
/* copy the data from DSP memory, */ /* copy the data from DSP memory, */
...@@ -336,12 +336,12 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt, ...@@ -336,12 +336,12 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
* This routine updates the Board status. * This routine updates the Board status.
*/ */
static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt, static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
u32 ulBrdState) u32 brd_state)
{ {
int status = 0; int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt; struct bridge_dev_context *dev_context = dev_ctxt;
dev_context->dw_brd_state = ulBrdState; dev_context->dw_brd_state = brd_state;
return status; return status;
} }
...@@ -766,7 +766,7 @@ static int bridge_brd_status(struct bridge_dev_context *dev_ctxt, ...@@ -766,7 +766,7 @@ static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
*/ */
static int bridge_brd_write(struct bridge_dev_context *dev_ctxt, static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr, IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType) u32 ul_num_bytes, u32 mem_type)
{ {
int status = 0; int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt; struct bridge_dev_context *dev_context = dev_ctxt;
...@@ -778,10 +778,10 @@ static int bridge_brd_write(struct bridge_dev_context *dev_ctxt, ...@@ -778,10 +778,10 @@ static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
if ((dsp_addr - dev_context->dw_dsp_start_add) < if ((dsp_addr - dev_context->dw_dsp_start_add) <
dev_context->dw_internal_size) { dev_context->dw_internal_size) {
status = write_dsp_data(dev_ctxt, host_buff, dsp_addr, status = write_dsp_data(dev_ctxt, host_buff, dsp_addr,
ul_num_bytes, ulMemType); ul_num_bytes, mem_type);
} else { } else {
status = write_ext_dsp_data(dev_context, host_buff, dsp_addr, status = write_ext_dsp_data(dev_context, host_buff, dsp_addr,
ul_num_bytes, ulMemType, false); ul_num_bytes, mem_type, false);
} }
return status; return status;
...@@ -1107,12 +1107,12 @@ static int bridge_dev_destroy(struct bridge_dev_context *dev_ctxt) ...@@ -1107,12 +1107,12 @@ static int bridge_dev_destroy(struct bridge_dev_context *dev_ctxt)
} }
static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt, static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
u32 ulDspDestAddr, u32 ulDspSrcAddr, u32 dsp_dest_addr, u32 dsp_src_addr,
u32 ul_num_bytes, u32 ulMemType) u32 ul_num_bytes, u32 mem_type)
{ {
int status = 0; int status = 0;
u32 src_addr = ulDspSrcAddr; u32 src_addr = dsp_src_addr;
u32 dest_addr = ulDspDestAddr; u32 dest_addr = dsp_dest_addr;
u32 copy_bytes = 0; u32 copy_bytes = 0;
u32 total_bytes = ul_num_bytes; u32 total_bytes = ul_num_bytes;
u8 host_buf[BUFFERSIZE]; u8 host_buf[BUFFERSIZE];
...@@ -1122,20 +1122,20 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt, ...@@ -1122,20 +1122,20 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
total_bytes > BUFFERSIZE ? BUFFERSIZE : total_bytes; total_bytes > BUFFERSIZE ? BUFFERSIZE : total_bytes;
/* Read from External memory */ /* Read from External memory */
status = read_ext_dsp_data(dev_ctxt, host_buf, src_addr, status = read_ext_dsp_data(dev_ctxt, host_buf, src_addr,
copy_bytes, ulMemType); copy_bytes, mem_type);
if (DSP_SUCCEEDED(status)) { if (DSP_SUCCEEDED(status)) {
if (dest_addr < (dev_context->dw_dsp_start_add + if (dest_addr < (dev_context->dw_dsp_start_add +
dev_context->dw_internal_size)) { dev_context->dw_internal_size)) {
/* Write to Internal memory */ /* Write to Internal memory */
status = write_dsp_data(dev_ctxt, host_buf, status = write_dsp_data(dev_ctxt, host_buf,
dest_addr, copy_bytes, dest_addr, copy_bytes,
ulMemType); mem_type);
} else { } else {
/* Write to External memory */ /* Write to External memory */
status = status =
write_ext_dsp_data(dev_ctxt, host_buf, write_ext_dsp_data(dev_ctxt, host_buf,
dest_addr, copy_bytes, dest_addr, copy_bytes,
ulMemType, false); mem_type, false);
} }
} }
total_bytes -= copy_bytes; total_bytes -= copy_bytes;
...@@ -1148,7 +1148,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt, ...@@ -1148,7 +1148,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
/* Mem Write does not halt the DSP to write unlike bridge_brd_write */ /* Mem Write does not halt the DSP to write unlike bridge_brd_write */
static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt, static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr, IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType) u32 ul_num_bytes, u32 mem_type)
{ {
int status = 0; int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt; struct bridge_dev_context *dev_context = dev_ctxt;
...@@ -1162,11 +1162,11 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt, ...@@ -1162,11 +1162,11 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
dev_context->dw_internal_size)) { dev_context->dw_internal_size)) {
status = status =
write_dsp_data(dev_ctxt, host_buff, dsp_addr, write_dsp_data(dev_ctxt, host_buff, dsp_addr,
ul_bytes, ulMemType); ul_bytes, mem_type);
} else { } else {
status = write_ext_dsp_data(dev_ctxt, host_buff, status = write_ext_dsp_data(dev_ctxt, host_buff,
dsp_addr, ul_bytes, dsp_addr, ul_bytes,
ulMemType, true); mem_type, true);
} }
ul_remain_bytes -= ul_bytes; ul_remain_bytes -= ul_bytes;
dsp_addr += ul_bytes; dsp_addr += ul_bytes;
...@@ -1185,7 +1185,7 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt, ...@@ -1185,7 +1185,7 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
* TODO: Disable MMU while updating the page tables (but that'll stall DSP) * TODO: Disable MMU while updating the page tables (but that'll stall DSP)
*/ */
static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt, static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr, u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes, u32 ul_map_attr, u32 ul_num_bytes, u32 ul_map_attr,
struct page **mapped_pages) struct page **mapped_pages)
{ {
...@@ -1199,14 +1199,14 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt, ...@@ -1199,14 +1199,14 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 num_usr_pgs = 0; u32 num_usr_pgs = 0;
struct page *mapped_page, *pg; struct page *mapped_page, *pg;
s32 pg_num; s32 pg_num;
u32 va = ulVirtAddr; u32 va = virt_addr;
struct task_struct *curr_task = current; struct task_struct *curr_task = current;
u32 pg_i = 0; u32 pg_i = 0;
u32 mpu_addr, pa; u32 mpu_addr, pa;
dev_dbg(bridge, dev_dbg(bridge,
"%s hDevCtxt %p, pa %x, va %x, size %x, ul_map_attr %x\n", "%s hDevCtxt %p, pa %x, va %x, size %x, ul_map_attr %x\n",
__func__, dev_ctxt, ul_mpu_addr, ulVirtAddr, ul_num_bytes, __func__, dev_ctxt, ul_mpu_addr, virt_addr, ul_num_bytes,
ul_map_attr); ul_map_attr);
if (ul_num_bytes == 0) if (ul_num_bytes == 0)
return -EINVAL; return -EINVAL;
...@@ -1253,7 +1253,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt, ...@@ -1253,7 +1253,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
hw_attrs.donotlockmpupage = 0; hw_attrs.donotlockmpupage = 0;
if (attrs & DSP_MAPVMALLOCADDR) { if (attrs & DSP_MAPVMALLOCADDR) {
return mem_map_vmalloc(dev_ctxt, ul_mpu_addr, ulVirtAddr, return mem_map_vmalloc(dev_ctxt, ul_mpu_addr, virt_addr,
ul_num_bytes, &hw_attrs); ul_num_bytes, &hw_attrs);
} }
/* /*
...@@ -1262,7 +1262,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt, ...@@ -1262,7 +1262,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
* Pass the translated pa to pte_update. * Pass the translated pa to pte_update.
*/ */
if ((attrs & DSP_MAPPHYSICALADDR)) { if ((attrs & DSP_MAPPHYSICALADDR)) {
status = pte_update(dev_context, ul_mpu_addr, ulVirtAddr, status = pte_update(dev_context, ul_mpu_addr, virt_addr,
ul_num_bytes, &hw_attrs); ul_num_bytes, &hw_attrs);
goto func_cont; goto func_cont;
} }
...@@ -1383,7 +1383,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt, ...@@ -1383,7 +1383,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
* mapping * mapping
*/ */
if (pg_i) { if (pg_i) {
bridge_brd_mem_un_map(dev_context, ulVirtAddr, bridge_brd_mem_un_map(dev_context, virt_addr,
(pg_i * PG_SIZE4K)); (pg_i * PG_SIZE4K));
} }
status = -EPERM; status = -EPERM;
...@@ -1408,7 +1408,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt, ...@@ -1408,7 +1408,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
* we clear consecutive PTEs until we unmap all the bytes * we clear consecutive PTEs until we unmap all the bytes
*/ */
static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt, static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes) u32 virt_addr, u32 ul_num_bytes)
{ {
u32 l1_base_va; u32 l1_base_va;
u32 l2_base_va; u32 l2_base_va;
...@@ -1430,13 +1430,13 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt, ...@@ -1430,13 +1430,13 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 paddr; u32 paddr;
u32 numof4k_pages = 0; u32 numof4k_pages = 0;
va_curr = ulVirtAddr; va_curr = virt_addr;
rem_bytes = ul_num_bytes; rem_bytes = ul_num_bytes;
rem_bytes_l2 = 0; rem_bytes_l2 = 0;
l1_base_va = pt->l1_base_va; l1_base_va = pt->l1_base_va;
pte_addr_l1 = hw_mmu_pte_addr_l1(l1_base_va, va_curr); pte_addr_l1 = hw_mmu_pte_addr_l1(l1_base_va, va_curr);
dev_dbg(bridge, "%s dev_ctxt %p, va %x, NumBytes %x l1_base_va %x, " dev_dbg(bridge, "%s dev_ctxt %p, va %x, NumBytes %x l1_base_va %x, "
"pte_addr_l1 %x\n", __func__, dev_ctxt, ulVirtAddr, "pte_addr_l1 %x\n", __func__, dev_ctxt, virt_addr,
ul_num_bytes, l1_base_va, pte_addr_l1); ul_num_bytes, l1_base_va, pte_addr_l1);
while (rem_bytes && (DSP_SUCCEEDED(status))) { while (rem_bytes && (DSP_SUCCEEDED(status))) {
...@@ -1771,7 +1771,7 @@ static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va, ...@@ -1771,7 +1771,7 @@ static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,
/* Memory map kernel VA -- memory allocated with vmalloc */ /* Memory map kernel VA -- memory allocated with vmalloc */
static int mem_map_vmalloc(struct bridge_dev_context *dev_context, static int mem_map_vmalloc(struct bridge_dev_context *dev_context,
u32 ul_mpu_addr, u32 ulVirtAddr, u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes, u32 ul_num_bytes,
struct hw_mmu_map_attrs_t *hw_attrs) struct hw_mmu_map_attrs_t *hw_attrs)
{ {
...@@ -1830,7 +1830,7 @@ static int mem_map_vmalloc(struct bridge_dev_context *dev_context, ...@@ -1830,7 +1830,7 @@ static int mem_map_vmalloc(struct bridge_dev_context *dev_context,
get_page(PHYS_TO_PAGE(pa)); get_page(PHYS_TO_PAGE(pa));
pa += HW_PAGE_SIZE4KB; pa += HW_PAGE_SIZE4KB;
} }
status = pte_update(dev_context, pa_curr, ulVirtAddr + status = pte_update(dev_context, pa_curr, virt_addr +
(va_curr - ul_mpu_addr), size_curr, (va_curr - ul_mpu_addr), size_curr,
hw_attrs); hw_attrs);
va_curr += size_curr; va_curr += size_curr;
......
...@@ -52,7 +52,7 @@ bool symbols_reloaded = true; ...@@ -52,7 +52,7 @@ bool symbols_reloaded = true;
*/ */
int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt, int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buff, u32 dsp_addr, OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType) u32 ul_num_bytes, u32 mem_type)
{ {
int status = 0; int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt; struct bridge_dev_context *dev_context = dev_ctxt;
...@@ -180,7 +180,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt, ...@@ -180,7 +180,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
*/ */
int write_dsp_data(struct bridge_dev_context *dev_ctxt, int write_dsp_data(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr, u32 ul_num_bytes, IN u8 *host_buff, u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType) u32 mem_type)
{ {
u32 offset; u32 offset;
u32 dw_base_addr = dev_ctxt->dw_dsp_base_addr; u32 dw_base_addr = dev_ctxt->dw_dsp_base_addr;
...@@ -226,7 +226,7 @@ int write_dsp_data(struct bridge_dev_context *dev_ctxt, ...@@ -226,7 +226,7 @@ int write_dsp_data(struct bridge_dev_context *dev_ctxt,
*/ */
int write_ext_dsp_data(struct bridge_dev_context *dev_context, int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr, IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType, u32 ul_num_bytes, u32 mem_type,
bool dynamic_load) bool dynamic_load)
{ {
u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr; u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr;
......
...@@ -49,14 +49,14 @@ ...@@ -49,14 +49,14 @@
*/ */
extern int read_ext_dsp_data(struct bridge_dev_context *dev_context, extern int read_ext_dsp_data(struct bridge_dev_context *dev_context,
OUT u8 *host_buff, u32 dsp_addr, OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType); u32 ul_num_bytes, u32 mem_type);
/* /*
* ======== write_dsp_data ======== * ======== write_dsp_data ========
*/ */
extern int write_dsp_data(struct bridge_dev_context *dev_context, extern int write_dsp_data(struct bridge_dev_context *dev_context,
OUT u8 *host_buff, u32 dsp_addr, OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType); u32 ul_num_bytes, u32 mem_type);
/* /*
* ======== write_ext_dsp_data ======== * ======== write_ext_dsp_data ========
...@@ -66,7 +66,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context, ...@@ -66,7 +66,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context,
*/ */
extern int write_ext_dsp_data(struct bridge_dev_context *dev_context, extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr, IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType, u32 ul_num_bytes, u32 mem_type,
bool dynamic_load); bool dynamic_load);
/* /*
......
...@@ -262,17 +262,17 @@ extern int cmm_un_register_gppsm_seg(struct cmm_object *hcmm_mgr, ...@@ -262,17 +262,17 @@ extern int cmm_un_register_gppsm_seg(struct cmm_object *hcmm_mgr,
* Parameters: * Parameters:
* xlator: Handle to a Xlator object. * xlator: Handle to a Xlator object.
* va_buf: Virtual address ptr(client context) * va_buf: Virtual address ptr(client context)
* uPaSize: Size of SM memory to allocate. * pa_size: Size of SM memory to allocate.
* Returns: * Returns:
* Ptr to valid physical address(Pa) of uPaSize bytes, NULL if failed. * Ptr to valid physical address(Pa) of pa_size bytes, NULL if failed.
* Requires: * Requires:
* va_buf != 0. * va_buf != 0.
* uPaSize != 0. * pa_size != 0.
* Ensures: * Ensures:
* *
*/ */
extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
void *va_buf, u32 uPaSize); void *va_buf, u32 pa_size);
/* /*
* ======== cmm_xlator_create ======== * ======== cmm_xlator_create ========
...@@ -346,7 +346,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, ...@@ -346,7 +346,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator,
* xlator: handle to translator. * xlator: handle to translator.
* paddr: Virtual base address of segment. * paddr: Virtual base address of segment.
* ul_size: Size in bytes. * ul_size: Size in bytes.
* uSegId: Segment identifier of SM segment(s) * segm_id: Segment identifier of SM segment(s)
* set_info Set xlator fields if TRUE, else return base addr * set_info Set xlator fields if TRUE, else return base addr
* Returns: * Returns:
* 0: Success. * 0: Success.
...@@ -360,7 +360,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, ...@@ -360,7 +360,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator,
*/ */
extern int cmm_xlator_info(struct cmm_xlatorobject *xlator, extern int cmm_xlator_info(struct cmm_xlatorobject *xlator,
IN OUT u8 **paddr, IN OUT u8 **paddr,
u32 ul_size, u32 uSegId, bool set_info); u32 ul_size, u32 segm_id, bool set_info);
/* /*
* ======== cmm_xlator_translate ======== * ======== cmm_xlator_translate ========
......
...@@ -49,7 +49,7 @@ struct cod_attrs { ...@@ -49,7 +49,7 @@ struct cod_attrs {
* Function prototypes for writing memory to a DSP system, allocating * Function prototypes for writing memory to a DSP system, allocating
* and freeing DSP memory. * and freeing DSP memory.
*/ */
typedef u32(*cod_writefxn) (void *priv_ref, u32 ulDspAddr, typedef u32(*cod_writefxn) (void *priv_ref, u32 dsp_add,
void *pbuf, u32 ul_num_bytes, u32 mem_space); void *pbuf, u32 ul_num_bytes, u32 mem_space);
/* /*
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
* dsp_addr: Address on DSP board (Destination). * dsp_addr: Address on DSP board (Destination).
* host_buf: Pointer to host buffer (Source). * host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer. * ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer. * mem_type: Memory space on DSP to which to transfer.
* Returns: * Returns:
* Number of bytes written. Returns 0 if the DEV_hObject passed in via * Number of bytes written. Returns 0 if the DEV_hObject passed in via
* arb is invalid. * arb is invalid.
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
* Ensures: * Ensures:
*/ */
extern u32 dev_brd_write_fxn(void *arb, extern u32 dev_brd_write_fxn(void *arb,
u32 ulDspAddr, u32 dsp_add,
void *host_buf, u32 ul_num_bytes, u32 mem_space); void *host_buf, u32 ul_num_bytes, u32 mem_space);
/* /*
...@@ -622,7 +622,7 @@ extern int dev_remove_proc_object(struct dev_object ...@@ -622,7 +622,7 @@ extern int dev_remove_proc_object(struct dev_object
* set up by a watchdog timer. * set up by a watchdog timer.
* Parameters: * Parameters:
* hdev_obj: Handle to device object created with dev_create_device(). * hdev_obj: Handle to device object created with dev_create_device().
* ulStatus: A status word, most likely a BRD_STATUS. * ret: A status word, most likely a BRD_STATUS.
* Returns: * Returns:
* 0: All registered clients were asynchronously notified. * 0: All registered clients were asynchronously notified.
* -EINVAL: Invalid hdev_obj. * -EINVAL: Invalid hdev_obj.
...@@ -633,7 +633,7 @@ extern int dev_remove_proc_object(struct dev_object ...@@ -633,7 +633,7 @@ extern int dev_remove_proc_object(struct dev_object
* delivered to clients. This function does not ensure that * delivered to clients. This function does not ensure that
* the notifications will ever be delivered. * the notifications will ever be delivered.
*/ */
extern int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus); extern int dev_notify_clients(struct dev_object *hdev_obj, u32 ret);
/* /*
* ======== dev_remove_device ======== * ======== dev_remove_device ========
......
...@@ -74,19 +74,19 @@ typedef int(*fxn_brd_monitor) (struct bridge_dev_context *dev_ctxt); ...@@ -74,19 +74,19 @@ typedef int(*fxn_brd_monitor) (struct bridge_dev_context *dev_ctxt);
* Sets the Bridge driver state * Sets the Bridge driver state
* Parameters: * Parameters:
* dev_ctxt: Handle to Bridge driver defined device info. * dev_ctxt: Handle to Bridge driver defined device info.
* ulBrdState: Board state * brd_state: Board state
* Returns: * Returns:
* 0: Success. * 0: Success.
* -EPERM: Other, unspecified error. * -EPERM: Other, unspecified error.
* Requires: * Requires:
* dev_ctxt != NULL; * dev_ctxt != NULL;
* ulBrdState <= BRD_LASTSTATE. * brd_state <= BRD_LASTSTATE.
* Ensures: * Ensures:
* ulBrdState <= BRD_LASTSTATE. * brd_state <= BRD_LASTSTATE.
* Update the Board state to the specified state. * Update the Board state to the specified state.
*/ */
typedef int(*fxn_brd_setstate) (struct bridge_dev_context typedef int(*fxn_brd_setstate) (struct bridge_dev_context
* dev_ctxt, u32 ulBrdState); * dev_ctxt, u32 brd_state);
/* /*
* ======== bridge_brd_start ======== * ======== bridge_brd_start ========
...@@ -116,10 +116,10 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context ...@@ -116,10 +116,10 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context
* Copy memory from one DSP address to another * Copy memory from one DSP address to another
* Parameters: * Parameters:
* dev_context: Pointer to context handle * dev_context: Pointer to context handle
* ulDspDestAddr: DSP address to copy to * dsp_dest_addr: DSP address to copy to
* ulDspSrcAddr: DSP address to copy from * dsp_src_addr: DSP address to copy from
* ul_num_bytes: Number of bytes to copy * ul_num_bytes: Number of bytes to copy
* ulMemType: What section of memory to copy to * mem_type: What section of memory to copy to
* Returns: * Returns:
* 0: Success. * 0: Success.
* -EPERM: Other, unspecified error. * -EPERM: Other, unspecified error.
...@@ -132,9 +132,9 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context ...@@ -132,9 +132,9 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context
*/ */
typedef int(*fxn_brd_memcopy) (struct bridge_dev_context typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* dev_ctxt, * dev_ctxt,
u32 ulDspDestAddr, u32 dsp_dest_addr,
u32 ulDspSrcAddr, u32 dsp_src_addr,
u32 ul_num_bytes, u32 ulMemType); u32 ul_num_bytes, u32 mem_type);
/* /*
* ======== bridge_brd_mem_write ======== * ======== bridge_brd_mem_write ========
* Purpose: * Purpose:
...@@ -145,7 +145,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context ...@@ -145,7 +145,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* dsp_addr: Address on DSP board (Destination). * dsp_addr: Address on DSP board (Destination).
* host_buf: Pointer to host buffer (Source). * host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer. * ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer. * mem_type: Memory space on DSP to which to transfer.
* Returns: * Returns:
* 0: Success. * 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware. * -ETIMEDOUT: Timeout occured waiting for a response from hardware.
...@@ -159,7 +159,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context ...@@ -159,7 +159,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* dev_ctxt, * dev_ctxt,
IN u8 *host_buf, IN u8 *host_buf,
u32 dsp_addr, u32 ul_num_bytes, u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType); u32 mem_type);
/* /*
* ======== bridge_brd_mem_map ======== * ======== bridge_brd_mem_map ========
...@@ -168,7 +168,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context ...@@ -168,7 +168,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* Parameters: * Parameters:
* dev_ctxt: Handle to Bridge driver defined device info. * dev_ctxt: Handle to Bridge driver defined device info.
* ul_mpu_addr: MPU memory region start address. * ul_mpu_addr: MPU memory region start address.
* ulVirtAddr: DSP/IVA memory region u8 address. * virt_addr: DSP/IVA memory region u8 address.
* ul_num_bytes: Number of bytes to map. * ul_num_bytes: Number of bytes to map.
* map_attrs: Mapping attributes (e.g. endianness). * map_attrs: Mapping attributes (e.g. endianness).
* Returns: * Returns:
...@@ -180,8 +180,8 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context ...@@ -180,8 +180,8 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
*/ */
typedef int(*fxn_brd_memmap) (struct bridge_dev_context typedef int(*fxn_brd_memmap) (struct bridge_dev_context
* dev_ctxt, u32 ul_mpu_addr, * dev_ctxt, u32 ul_mpu_addr,
u32 ulVirtAddr, u32 ul_num_bytes, u32 virt_addr, u32 ul_num_bytes,
u32 ulMapAttrs, u32 map_attr,
struct page **mapped_pages); struct page **mapped_pages);
/* /*
...@@ -190,7 +190,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context ...@@ -190,7 +190,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context
* UnMap an MPU memory region from DSP/IVA memory space * UnMap an MPU memory region from DSP/IVA memory space
* Parameters: * Parameters:
* dev_ctxt: Handle to Bridge driver defined device info. * dev_ctxt: Handle to Bridge driver defined device info.
* ulVirtAddr: DSP/IVA memory region u8 address. * virt_addr: DSP/IVA memory region u8 address.
* ul_num_bytes: Number of bytes to unmap. * ul_num_bytes: Number of bytes to unmap.
* Returns: * Returns:
* 0: Success. * 0: Success.
...@@ -201,7 +201,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context ...@@ -201,7 +201,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context
*/ */
typedef int(*fxn_brd_memunmap) (struct bridge_dev_context typedef int(*fxn_brd_memunmap) (struct bridge_dev_context
* dev_ctxt, * dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes); u32 virt_addr, u32 ul_num_bytes);
/* /*
* ======== bridge_brd_stop ======== * ======== bridge_brd_stop ========
...@@ -251,7 +251,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt, ...@@ -251,7 +251,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
* host_buf: Pointer to host buffer (Destination). * host_buf: Pointer to host buffer (Destination).
* dsp_addr: Address on DSP board (Source). * dsp_addr: Address on DSP board (Source).
* ul_num_bytes: Number of bytes to transfer. * ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP from which to transfer. * mem_type: Memory space on DSP from which to transfer.
* Returns: * Returns:
* 0: Success. * 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware. * -ETIMEDOUT: Timeout occured waiting for a response from hardware.
...@@ -265,7 +265,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt, ...@@ -265,7 +265,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt, typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buf, OUT u8 *host_buf,
u32 dsp_addr, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType); u32 ul_num_bytes, u32 mem_type);
/* /*
* ======== bridge_brd_write ======== * ======== bridge_brd_write ========
...@@ -277,7 +277,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt, ...@@ -277,7 +277,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
* dsp_addr: Address on DSP board (Destination). * dsp_addr: Address on DSP board (Destination).
* host_buf: Pointer to host buffer (Source). * host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer. * ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer. * mem_type: Memory space on DSP to which to transfer.
* Returns: * Returns:
* 0: Success. * 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware. * -ETIMEDOUT: Timeout occured waiting for a response from hardware.
...@@ -290,7 +290,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt, ...@@ -290,7 +290,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt, typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
IN u8 *host_buf, IN u8 *host_buf,
u32 dsp_addr, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType); u32 ul_num_bytes, u32 mem_type);
/* /*
* ======== bridge_chnl_create ======== * ======== bridge_chnl_create ========
...@@ -351,17 +351,17 @@ typedef int(*fxn_chnl_destroy) (struct chnl_mgr *hchnl_mgr); ...@@ -351,17 +351,17 @@ typedef int(*fxn_chnl_destroy) (struct chnl_mgr *hchnl_mgr);
* When notified of DSP error, take appropriate action. * When notified of DSP error, take appropriate action.
* Parameters: * Parameters:
* hdeh_mgr: Handle to DEH manager object. * hdeh_mgr: Handle to DEH manager object.
* ulEventMask: Indicate the type of exception * evnt_mask: Indicate the type of exception
* error_info: Error information * error_info: Error information
* Returns: * Returns:
* *
* Requires: * Requires:
* hdeh_mgr != NULL; * hdeh_mgr != NULL;
* ulEventMask with a valid exception * evnt_mask with a valid exception
* Ensures: * Ensures:
*/ */
typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr, typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
u32 ulEventMask, u32 error_info); u32 evnt_mask, u32 error_info);
/* /*
* ======== bridge_chnl_open ======== * ======== bridge_chnl_open ========
......
...@@ -54,13 +54,13 @@ extern u32 vdd1_dsp_freq[6][4]; ...@@ -54,13 +54,13 @@ extern u32 vdd1_dsp_freq[6][4];
* Cancel IO on a given channel. * Cancel IO on a given channel.
* Parameters: * Parameters:
* hio_mgr: IO Manager. * hio_mgr: IO Manager.
* ulChnl: Index of channel to cancel IO on. * chnl: Index of channel to cancel IO on.
* Returns: * Returns:
* Requires: * Requires:
* Valid hio_mgr. * Valid hio_mgr.
* Ensures: * Ensures:
*/ */
extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl); extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 chnl);
/* /*
* ======== io_dpc ======== * ======== io_dpc ========
...@@ -142,20 +142,20 @@ extern void iosm_schedule(struct io_mgr *hio_mgr); ...@@ -142,20 +142,20 @@ extern void iosm_schedule(struct io_mgr *hio_mgr);
* Parameters: * Parameters:
* hio_mgr: Handle to a I/O manager. * hio_mgr: Handle to a I/O manager.
* ddma_chnl_id: DDMA channel identifier. * ddma_chnl_id: DDMA channel identifier.
* uNumDesc: Number of buffer descriptors(equals # of IOReqs & * num_desc: Number of buffer descriptors(equals # of IOReqs &
* Chirps) * Chirps)
* dsp: Dsp address; * dsp: Dsp address;
* Returns: * Returns:
* Requires: * Requires:
* ddma_chnl_id < DDMA_MAXDDMACHNLS * ddma_chnl_id < DDMA_MAXDDMACHNLS
* uNumDesc > 0 * num_desc > 0
* pVa != NULL * pVa != NULL
* pDspPa != NULL * pDspPa != NULL
* *
* Ensures: * Ensures:
*/ */
extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id, extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id,
u32 uNumDesc, void *dsp); u32 num_desc, void *dsp);
/* /*
* ======== io_ddma_clear_chnl_desc ======== * ======== io_ddma_clear_chnl_desc ========
...@@ -202,14 +202,14 @@ extern void io_ddma_request_chnl(struct io_mgr *hio_mgr, ...@@ -202,14 +202,14 @@ extern void io_ddma_request_chnl(struct io_mgr *hio_mgr,
* Initialize ZCPY channel descriptor. * Initialize ZCPY channel descriptor.
* Parameters: * Parameters:
* hio_mgr: Handle to a I/O manager. * hio_mgr: Handle to a I/O manager.
* uZId: zero-copy channel identifier. * zid: zero-copy channel identifier.
* Returns: * Returns:
* Requires: * Requires:
* ddma_chnl_id < DDMA_MAXZCPYCHNLS * ddma_chnl_id < DDMA_MAXZCPYCHNLS
* hio_mgr != Null * hio_mgr != Null
* Ensures: * Ensures:
*/ */
extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 uZId); extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 zid);
/* /*
* ======== io_ddzc_clear_chnl_desc ======== * ======== io_ddzc_clear_chnl_desc ========
......
...@@ -45,8 +45,8 @@ enum nldr_loadtype { ...@@ -45,8 +45,8 @@ enum nldr_loadtype {
* *
* Parameters: * Parameters:
* priv_ref: Handle to identify the node. * priv_ref: Handle to identify the node.
* ulDspRunAddr: Run address of code or data. * dsp_run_addr: Run address of code or data.
* ulDspLoadAddr: Load address of code or data. * dsp_load_addr: Load address of code or data.
* ul_num_bytes: Number of (GPP) bytes to copy. * ul_num_bytes: Number of (GPP) bytes to copy.
* mem_space: RMS_CODE or RMS_DATA. * mem_space: RMS_CODE or RMS_DATA.
* Returns: * Returns:
...@@ -55,15 +55,15 @@ enum nldr_loadtype { ...@@ -55,15 +55,15 @@ enum nldr_loadtype {
* Requires: * Requires:
* Ensures: * Ensures:
*/ */
typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr, typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 dsp_run_addr,
u32 ulDspLoadAddr, u32 ul_num_bytes, u32 mem_space); u32 dsp_load_addr, u32 ul_num_bytes, u32 mem_space);
/* /*
* ======== nldr_writefxn ======== * ======== nldr_writefxn ========
* Write memory function. Used for dynamic load writes. * Write memory function. Used for dynamic load writes.
* Parameters: * Parameters:
* priv_ref: Handle to identify the node. * priv_ref: Handle to identify the node.
* ulDspAddr: Address of code or data. * dsp_add: Address of code or data.
* pbuf: Code or data to be written * pbuf: Code or data to be written
* ul_num_bytes: Number of (GPP) bytes to write. * ul_num_bytes: Number of (GPP) bytes to write.
* mem_space: DBLL_DATA or DBLL_CODE. * mem_space: DBLL_DATA or DBLL_CODE.
...@@ -74,7 +74,7 @@ typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr, ...@@ -74,7 +74,7 @@ typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr,
* Ensures: * Ensures:
*/ */
typedef u32(*nldr_writefxn) (void *priv_ref, typedef u32(*nldr_writefxn) (void *priv_ref,
u32 ulDspAddr, void *pbuf, u32 dsp_add, void *pbuf,
u32 ul_num_bytes, u32 mem_space); u32 ul_num_bytes, u32 mem_space);
/* /*
......
...@@ -147,11 +147,11 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr, ...@@ -147,11 +147,11 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* if this is a connection from DSP node to GPP, or a * if this is a connection from DSP node to GPP, or a
* node handle returned from a successful call to * node handle returned from a successful call to
* node_allocate(). * node_allocate().
* uStream1: Output stream index on first node, to be connected * stream1: Output stream index on first node, to be connected
* to second node's input stream. Value must range from * to second node's input stream. Value must range from
* 0 <= uStream1 < number of output streams. * 0 <= stream1 < number of output streams.
* uStream2: Input stream index on second node. Value must range * stream2: Input stream index on second node. Value must range
* from 0 <= uStream2 < number of input streams. * from 0 <= stream2 < number of input streams.
* pattrs: Stream attributes (NULL ==> use defaults). * pattrs: Stream attributes (NULL ==> use defaults).
* conn_param: A pointer to a dsp_cbdata structure that defines * conn_param: A pointer to a dsp_cbdata structure that defines
* connection parameter for device nodes to pass to DSP * connection parameter for device nodes to pass to DSP
...@@ -167,7 +167,7 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr, ...@@ -167,7 +167,7 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* -ENOMEM: Insufficient host memory. * -ENOMEM: Insufficient host memory.
* -EINVAL: A stream index parameter is invalid. * -EINVAL: A stream index parameter is invalid.
* -EISCONN: A connection already exists for one of the * -EISCONN: A connection already exists for one of the
* indices uStream1 or uStream2. * indices stream1 or stream2.
* -EBADR: Either node1 or node2 is not in the * -EBADR: Either node1 or node2 is not in the
* NODE_ALLOCATED state. * NODE_ALLOCATED state.
* -ECONNREFUSED: No more connections available. * -ECONNREFUSED: No more connections available.
...@@ -179,9 +179,9 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr, ...@@ -179,9 +179,9 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* Ensures: * Ensures:
*/ */
extern int node_connect(struct node_object *node1, extern int node_connect(struct node_object *node1,
u32 uStream1, u32 stream1,
struct node_object *node2, struct node_object *node2,
u32 uStream2, u32 stream2,
OPTIONAL IN struct dsp_strmattr *pattrs, OPTIONAL IN struct dsp_strmattr *pattrs,
OPTIONAL IN struct dsp_cbdata OPTIONAL IN struct dsp_cbdata
*conn_param); *conn_param);
......
...@@ -1008,7 +1008,7 @@ int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool force) ...@@ -1008,7 +1008,7 @@ int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool force)
* ======== cmm_xlator_alloc_buf ======== * ======== cmm_xlator_alloc_buf ========
*/ */
void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf, void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
u32 uPaSize) u32 pa_size)
{ {
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator; struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
void *pbuf = NULL; void *pbuf = NULL;
...@@ -1018,7 +1018,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf, ...@@ -1018,7 +1018,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
DBC_REQUIRE(xlator != NULL); DBC_REQUIRE(xlator != NULL);
DBC_REQUIRE(xlator_obj->hcmm_mgr != NULL); DBC_REQUIRE(xlator_obj->hcmm_mgr != NULL);
DBC_REQUIRE(va_buf != NULL); DBC_REQUIRE(va_buf != NULL);
DBC_REQUIRE(uPaSize > 0); DBC_REQUIRE(pa_size > 0);
DBC_REQUIRE(xlator_obj->ul_seg_id > 0); DBC_REQUIRE(xlator_obj->ul_seg_id > 0);
if (xlator_obj) { if (xlator_obj) {
...@@ -1026,7 +1026,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf, ...@@ -1026,7 +1026,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
*(volatile u32 *)va_buf = 0; *(volatile u32 *)va_buf = 0;
/* Alloc SM */ /* Alloc SM */
pbuf = pbuf =
cmm_calloc_buf(xlator_obj->hcmm_mgr, uPaSize, &attrs, NULL); cmm_calloc_buf(xlator_obj->hcmm_mgr, pa_size, &attrs, NULL);
if (pbuf) { if (pbuf) {
/* convert to translator(node/strm) process Virtual /* convert to translator(node/strm) process Virtual
* address */ * address */
...@@ -1076,14 +1076,14 @@ int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, void *buf_va) ...@@ -1076,14 +1076,14 @@ int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, void *buf_va)
* Set/Get translator info. * Set/Get translator info.
*/ */
int cmm_xlator_info(struct cmm_xlatorobject *xlator, IN OUT u8 ** paddr, int cmm_xlator_info(struct cmm_xlatorobject *xlator, IN OUT u8 ** paddr,
u32 ul_size, u32 uSegId, bool set_info) u32 ul_size, u32 segm_id, bool set_info)
{ {
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator; struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
int status = 0; int status = 0;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(paddr != NULL); DBC_REQUIRE(paddr != NULL);
DBC_REQUIRE((uSegId > 0) && (uSegId <= CMM_MAXGPPSEGS)); DBC_REQUIRE((segm_id > 0) && (segm_id <= CMM_MAXGPPSEGS));
if (xlator_obj) { if (xlator_obj) {
if (set_info) { if (set_info) {
......
...@@ -100,7 +100,7 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns, ...@@ -100,7 +100,7 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
* is passed a handle to a DEV_hObject, then calls the * is passed a handle to a DEV_hObject, then calls the
* device's bridge_brd_write() function. * device's bridge_brd_write() function.
*/ */
u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *host_buf, u32 dev_brd_write_fxn(void *arb, u32 dsp_add, void *host_buf,
u32 ul_num_bytes, u32 mem_space) u32 ul_num_bytes, u32 mem_space)
{ {
struct dev_object *dev_obj = (struct dev_object *)arb; struct dev_object *dev_obj = (struct dev_object *)arb;
...@@ -114,7 +114,7 @@ u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *host_buf, ...@@ -114,7 +114,7 @@ u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *host_buf,
DBC_ASSERT(dev_obj->hbridge_context != NULL); DBC_ASSERT(dev_obj->hbridge_context != NULL);
status = (*dev_obj->bridge_interface.pfn_brd_write) ( status = (*dev_obj->bridge_interface.pfn_brd_write) (
dev_obj->hbridge_context, host_buf, dev_obj->hbridge_context, host_buf,
ulDspAddr, ul_num_bytes, mem_space); dsp_add, ul_num_bytes, mem_space);
/* Special case of getting the address only */ /* Special case of getting the address only */
if (ul_num_bytes == 0) if (ul_num_bytes == 0)
ul_num_bytes = 1; ul_num_bytes = 1;
...@@ -798,7 +798,7 @@ bool dev_init(void) ...@@ -798,7 +798,7 @@ bool dev_init(void)
* Purpose: * Purpose:
* Notify all clients of this device of a change in device status. * Notify all clients of this device of a change in device status.
*/ */
int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus) int dev_notify_clients(struct dev_object *hdev_obj, u32 ret)
{ {
int status = 0; int status = 0;
...@@ -809,7 +809,7 @@ int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus) ...@@ -809,7 +809,7 @@ int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus)
proc_obj != NULL; proc_obj != NULL;
proc_obj = (void *)lst_next(dev_obj->proc_list, proc_obj = (void *)lst_next(dev_obj->proc_list,
(struct list_head *)proc_obj)) (struct list_head *)proc_obj))
proc_notify_clients(proc_obj, (u32) ulStatus); proc_notify_clients(proc_obj, (u32) ret);
return status; return status;
} }
......
...@@ -223,7 +223,7 @@ bool disp_init(void) ...@@ -223,7 +223,7 @@ bool disp_init(void)
*/ */
int disp_node_change_priority(struct disp_object *disp_obj, int disp_node_change_priority(struct disp_object *disp_obj,
struct node_object *hnode, struct node_object *hnode,
u32 ulRMSFxn, nodeenv node_env, s32 prio) u32 rms_fxn, nodeenv node_env, s32 prio)
{ {
u32 dw_arg; u32 dw_arg;
struct rms_command *rms_cmd; struct rms_command *rms_cmd;
...@@ -235,7 +235,7 @@ int disp_node_change_priority(struct disp_object *disp_obj, ...@@ -235,7 +235,7 @@ int disp_node_change_priority(struct disp_object *disp_obj,
/* Send message to RMS to change priority */ /* Send message to RMS to change priority */
rms_cmd = (struct rms_command *)(disp_obj->pbuf); rms_cmd = (struct rms_command *)(disp_obj->pbuf);
rms_cmd->fxn = (rms_word) (ulRMSFxn); rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env; rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = prio; rms_cmd->arg2 = prio;
status = send_message(disp_obj, node_get_timeout(hnode), status = send_message(disp_obj, node_get_timeout(hnode),
...@@ -249,7 +249,7 @@ int disp_node_change_priority(struct disp_object *disp_obj, ...@@ -249,7 +249,7 @@ int disp_node_change_priority(struct disp_object *disp_obj,
* Create a node on the DSP by remotely calling the node's create function. * Create a node on the DSP by remotely calling the node's create function.
*/ */
int disp_node_create(struct disp_object *disp_obj, int disp_node_create(struct disp_object *disp_obj,
struct node_object *hnode, u32 ulRMSFxn, struct node_object *hnode, u32 rms_fxn,
u32 ul_create_fxn, u32 ul_create_fxn,
IN CONST struct node_createargs *pargs, IN CONST struct node_createargs *pargs,
OUT nodeenv *node_env) OUT nodeenv *node_env)
...@@ -351,7 +351,7 @@ int disp_node_create(struct disp_object *disp_obj, ...@@ -351,7 +351,7 @@ int disp_node_create(struct disp_object *disp_obj,
total = 0; /* Total number of words in buffer so far */ total = 0; /* Total number of words in buffer so far */
pdw_buf = (rms_word *) disp_obj->pbuf; pdw_buf = (rms_word *) disp_obj->pbuf;
rms_cmd = (struct rms_command *)pdw_buf; rms_cmd = (struct rms_command *)pdw_buf;
rms_cmd->fxn = (rms_word) (ulRMSFxn); rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) (ul_create_fxn); rms_cmd->arg1 = (rms_word) (ul_create_fxn);
if (node_get_load_type(hnode) == NLDR_DYNAMICLOAD) { if (node_get_load_type(hnode) == NLDR_DYNAMICLOAD) {
/* Flush ICACHE on Load */ /* Flush ICACHE on Load */
...@@ -485,7 +485,7 @@ int disp_node_create(struct disp_object *disp_obj, ...@@ -485,7 +485,7 @@ int disp_node_create(struct disp_object *disp_obj,
* *
*/ */
int disp_node_delete(struct disp_object *disp_obj, int disp_node_delete(struct disp_object *disp_obj,
struct node_object *hnode, u32 ulRMSFxn, struct node_object *hnode, u32 rms_fxn,
u32 ul_delete_fxn, nodeenv node_env) u32 ul_delete_fxn, nodeenv node_env)
{ {
u32 dw_arg; u32 dw_arg;
...@@ -507,7 +507,7 @@ int disp_node_delete(struct disp_object *disp_obj, ...@@ -507,7 +507,7 @@ int disp_node_delete(struct disp_object *disp_obj,
* Fill in buffer to send to RMS * Fill in buffer to send to RMS
*/ */
rms_cmd = (struct rms_command *)disp_obj->pbuf; rms_cmd = (struct rms_command *)disp_obj->pbuf;
rms_cmd->fxn = (rms_word) (ulRMSFxn); rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env; rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = (rms_word) (ul_delete_fxn); rms_cmd->arg2 = (rms_word) (ul_delete_fxn);
rms_cmd->data = node_get_type(hnode); rms_cmd->data = node_get_type(hnode);
...@@ -539,7 +539,7 @@ int disp_node_delete(struct disp_object *disp_obj, ...@@ -539,7 +539,7 @@ int disp_node_delete(struct disp_object *disp_obj,
* that has been suspended (via DISP_NodePause()) on the DSP. * that has been suspended (via DISP_NodePause()) on the DSP.
*/ */
int disp_node_run(struct disp_object *disp_obj, int disp_node_run(struct disp_object *disp_obj,
struct node_object *hnode, u32 ulRMSFxn, struct node_object *hnode, u32 rms_fxn,
u32 ul_execute_fxn, nodeenv node_env) u32 ul_execute_fxn, nodeenv node_env)
{ {
u32 dw_arg; u32 dw_arg;
...@@ -560,7 +560,7 @@ int disp_node_run(struct disp_object *disp_obj, ...@@ -560,7 +560,7 @@ int disp_node_run(struct disp_object *disp_obj,
* Fill in buffer to send to RMS. * Fill in buffer to send to RMS.
*/ */
rms_cmd = (struct rms_command *)disp_obj->pbuf; rms_cmd = (struct rms_command *)disp_obj->pbuf;
rms_cmd->fxn = (rms_word) (ulRMSFxn); rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env; rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = (rms_word) (ul_execute_fxn); rms_cmd->arg2 = (rms_word) (ul_execute_fxn);
rms_cmd->data = node_get_type(hnode); rms_cmd->data = node_get_type(hnode);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment