aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/tidspbridge/core/io_sm.c4
-rw-r--r--drivers/staging/tidspbridge/core/msg_sm.c8
-rw-r--r--drivers/staging/tidspbridge/core/tiomap3430.c74
-rw-r--r--drivers/staging/tidspbridge/core/tiomap_io.c6
-rw-r--r--drivers/staging/tidspbridge/core/tiomap_io.h6
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/cmm.h12
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/cod.h2
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/dev.h8
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/dspdefs.h48
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/io_sm.h14
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h12
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/node.h14
-rw-r--r--drivers/staging/tidspbridge/pmgr/cmm.c10
-rw-r--r--drivers/staging/tidspbridge/pmgr/dev.c8
-rw-r--r--drivers/staging/tidspbridge/rmgr/disp.c16
-rw-r--r--drivers/staging/tidspbridge/rmgr/node.c80
16 files changed, 161 insertions, 161 deletions
diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index a8ff5f9b462..0292881ddd3 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -816,7 +816,7 @@ u32 io_buf_size(struct io_mgr *hio_mgr)
816 * ======== io_cancel_chnl ======== 816 * ======== io_cancel_chnl ========
817 * Cancel IO on a given PCPY channel. 817 * Cancel IO on a given PCPY channel.
818 */ 818 */
819void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl) 819void io_cancel_chnl(struct io_mgr *hio_mgr, u32 chnl)
820{ 820{
821 struct io_mgr *pio_mgr = (struct io_mgr *)hio_mgr; 821 struct io_mgr *pio_mgr = (struct io_mgr *)hio_mgr;
822 struct shm *sm; 822 struct shm *sm;
@@ -827,7 +827,7 @@ void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl)
827 827
828 /* Inform DSP that we have no more buffers on this channel */ 828 /* Inform DSP that we have no more buffers on this channel */
829 IO_AND_VALUE(pio_mgr->hbridge_context, struct shm, sm, host_free_mask, 829 IO_AND_VALUE(pio_mgr->hbridge_context, struct shm, sm, host_free_mask,
830 (~(1 << ulChnl))); 830 (~(1 << chnl)));
831 831
832 sm_interrupt_dsp(pio_mgr->hbridge_context, MBX_PCPY_CLASS); 832 sm_interrupt_dsp(pio_mgr->hbridge_context, MBX_PCPY_CLASS);
833func_end: 833func_end:
diff --git a/drivers/staging/tidspbridge/core/msg_sm.c b/drivers/staging/tidspbridge/core/msg_sm.c
index 22e18989511..888d32d3c32 100644
--- a/drivers/staging/tidspbridge/core/msg_sm.c
+++ b/drivers/staging/tidspbridge/core/msg_sm.c
@@ -40,7 +40,7 @@
40/* ----------------------------------- Function Prototypes */ 40/* ----------------------------------- Function Prototypes */
41static int add_new_msg(struct lst_list *msg_list); 41static int add_new_msg(struct lst_list *msg_list);
42static void delete_msg_mgr(struct msg_mgr *hmsg_mgr); 42static void delete_msg_mgr(struct msg_mgr *hmsg_mgr);
43static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP); 43static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 num_to_dsp);
44static void free_msg_list(struct lst_list *msg_list); 44static void free_msg_list(struct lst_list *msg_list);
45 45
46/* 46/*
@@ -602,7 +602,7 @@ func_end:
602/* 602/*
603 * ======== delete_msg_queue ======== 603 * ======== delete_msg_queue ========
604 */ 604 */
605static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP) 605static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 num_to_dsp)
606{ 606{
607 struct msg_mgr *hmsg_mgr; 607 struct msg_mgr *hmsg_mgr;
608 struct msg_frame *pmsg; 608 struct msg_frame *pmsg;
@@ -614,8 +614,8 @@ static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP)
614 614
615 hmsg_mgr = msg_queue_obj->hmsg_mgr; 615 hmsg_mgr = msg_queue_obj->hmsg_mgr;
616 616
617 /* Pull off uNumToDSP message frames from Msg manager and free */ 617 /* Pull off num_to_dsp message frames from Msg manager and free */
618 for (i = 0; i < uNumToDSP; i++) { 618 for (i = 0; i < num_to_dsp; i++) {
619 619
620 if (!LST_IS_EMPTY(hmsg_mgr->msg_free_list)) { 620 if (!LST_IS_EMPTY(hmsg_mgr->msg_free_list)) {
621 pmsg = (struct msg_frame *) 621 pmsg = (struct msg_frame *)
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 0fdec3766d2..8e3d92a38eb 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -78,7 +78,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_context);
78static int bridge_brd_read(struct bridge_dev_context *dev_context, 78static int bridge_brd_read(struct bridge_dev_context *dev_context,
79 OUT u8 *host_buff, 79 OUT u8 *host_buff,
80 u32 dsp_addr, u32 ul_num_bytes, 80 u32 dsp_addr, u32 ul_num_bytes,
81 u32 ulMemType); 81 u32 mem_type);
82static int bridge_brd_start(struct bridge_dev_context *dev_context, 82static int bridge_brd_start(struct bridge_dev_context *dev_context,
83 u32 dsp_addr); 83 u32 dsp_addr);
84static int bridge_brd_status(struct bridge_dev_context *dev_context, 84static 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);
87static int bridge_brd_write(struct bridge_dev_context *dev_context, 87static int bridge_brd_write(struct bridge_dev_context *dev_context,
88 IN u8 *host_buff, 88 IN u8 *host_buff,
89 u32 dsp_addr, u32 ul_num_bytes, 89 u32 dsp_addr, u32 ul_num_bytes,
90 u32 ulMemType); 90 u32 mem_type);
91static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt, 91static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
92 u32 ulBrdState); 92 u32 brd_state);
93static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt, 93static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
94 u32 ulDspDestAddr, u32 ulDspSrcAddr, 94 u32 dsp_dest_addr, u32 dsp_src_addr,
95 u32 ul_num_bytes, u32 ulMemType); 95 u32 ul_num_bytes, u32 mem_type);
96static int bridge_brd_mem_write(struct bridge_dev_context *dev_context, 96static int bridge_brd_mem_write(struct bridge_dev_context *dev_context,
97 IN u8 *host_buff, u32 dsp_addr, 97 IN u8 *host_buff, u32 dsp_addr,
98 u32 ul_num_bytes, u32 ulMemType); 98 u32 ul_num_bytes, u32 mem_type);
99static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt, 99static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
100 u32 ul_mpu_addr, u32 ulVirtAddr, 100 u32 ul_mpu_addr, u32 virt_addr,
101 u32 ul_num_bytes, u32 ul_map_attr, 101 u32 ul_num_bytes, u32 ul_map_attr,
102 struct page **mapped_pages); 102 struct page **mapped_pages);
103static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt, 103static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
104 u32 ulVirtAddr, u32 ul_num_bytes); 104 u32 virt_addr, u32 ul_num_bytes);
105static int bridge_dev_create(OUT struct bridge_dev_context 105static int bridge_dev_create(OUT struct bridge_dev_context
106 **dev_cntxt, 106 **dev_cntxt,
107 struct dev_object *hdev_obj, 107 struct dev_object *hdev_obj,
@@ -116,7 +116,7 @@ static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa,
116static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va, 116static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,
117 u32 size, struct hw_mmu_map_attrs_t *attrs); 117 u32 size, struct hw_mmu_map_attrs_t *attrs);
118static int mem_map_vmalloc(struct bridge_dev_context *dev_ctxt, 118static int mem_map_vmalloc(struct bridge_dev_context *dev_ctxt,
119 u32 ul_mpu_addr, u32 ulVirtAddr, 119 u32 ul_mpu_addr, u32 virt_addr,
120 u32 ul_num_bytes, 120 u32 ul_num_bytes,
121 struct hw_mmu_map_attrs_t *hw_attrs); 121 struct hw_mmu_map_attrs_t *hw_attrs);
122 122
@@ -305,7 +305,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt)
305 */ 305 */
306static int bridge_brd_read(struct bridge_dev_context *dev_ctxt, 306static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
307 OUT u8 *host_buff, u32 dsp_addr, 307 OUT u8 *host_buff, u32 dsp_addr,
308 u32 ul_num_bytes, u32 ulMemType) 308 u32 ul_num_bytes, u32 mem_type)
309{ 309{
310 int status = 0; 310 int status = 0;
311 struct bridge_dev_context *dev_context = dev_ctxt; 311 struct bridge_dev_context *dev_context = dev_ctxt;
@@ -322,7 +322,7 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
322 offset = dsp_addr - dev_context->dw_dsp_start_add; 322 offset = dsp_addr - dev_context->dw_dsp_start_add;
323 } else { 323 } else {
324 status = read_ext_dsp_data(dev_context, host_buff, dsp_addr, 324 status = read_ext_dsp_data(dev_context, host_buff, dsp_addr,
325 ul_num_bytes, ulMemType); 325 ul_num_bytes, mem_type);
326 return status; 326 return status;
327 } 327 }
328 /* copy the data from DSP memory, */ 328 /* copy the data from DSP memory, */
@@ -336,12 +336,12 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
336 * This routine updates the Board status. 336 * This routine updates the Board status.
337 */ 337 */
338static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt, 338static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
339 u32 ulBrdState) 339 u32 brd_state)
340{ 340{
341 int status = 0; 341 int status = 0;
342 struct bridge_dev_context *dev_context = dev_ctxt; 342 struct bridge_dev_context *dev_context = dev_ctxt;
343 343
344 dev_context->dw_brd_state = ulBrdState; 344 dev_context->dw_brd_state = brd_state;
345 return status; 345 return status;
346} 346}
347 347
@@ -766,7 +766,7 @@ static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
766 */ 766 */
767static int bridge_brd_write(struct bridge_dev_context *dev_ctxt, 767static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
768 IN u8 *host_buff, u32 dsp_addr, 768 IN u8 *host_buff, u32 dsp_addr,
769 u32 ul_num_bytes, u32 ulMemType) 769 u32 ul_num_bytes, u32 mem_type)
770{ 770{
771 int status = 0; 771 int status = 0;
772 struct bridge_dev_context *dev_context = dev_ctxt; 772 struct bridge_dev_context *dev_context = dev_ctxt;
@@ -778,10 +778,10 @@ static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
778 if ((dsp_addr - dev_context->dw_dsp_start_add) < 778 if ((dsp_addr - dev_context->dw_dsp_start_add) <
779 dev_context->dw_internal_size) { 779 dev_context->dw_internal_size) {
780 status = write_dsp_data(dev_ctxt, host_buff, dsp_addr, 780 status = write_dsp_data(dev_ctxt, host_buff, dsp_addr,
781 ul_num_bytes, ulMemType); 781 ul_num_bytes, mem_type);
782 } else { 782 } else {
783 status = write_ext_dsp_data(dev_context, host_buff, dsp_addr, 783 status = write_ext_dsp_data(dev_context, host_buff, dsp_addr,
784 ul_num_bytes, ulMemType, false); 784 ul_num_bytes, mem_type, false);
785 } 785 }
786 786
787 return status; 787 return status;
@@ -1107,12 +1107,12 @@ static int bridge_dev_destroy(struct bridge_dev_context *dev_ctxt)
1107} 1107}
1108 1108
1109static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt, 1109static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
1110 u32 ulDspDestAddr, u32 ulDspSrcAddr, 1110 u32 dsp_dest_addr, u32 dsp_src_addr,
1111 u32 ul_num_bytes, u32 ulMemType) 1111 u32 ul_num_bytes, u32 mem_type)
1112{ 1112{
1113 int status = 0; 1113 int status = 0;
1114 u32 src_addr = ulDspSrcAddr; 1114 u32 src_addr = dsp_src_addr;
1115 u32 dest_addr = ulDspDestAddr; 1115 u32 dest_addr = dsp_dest_addr;
1116 u32 copy_bytes = 0; 1116 u32 copy_bytes = 0;
1117 u32 total_bytes = ul_num_bytes; 1117 u32 total_bytes = ul_num_bytes;
1118 u8 host_buf[BUFFERSIZE]; 1118 u8 host_buf[BUFFERSIZE];
@@ -1122,20 +1122,20 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
1122 total_bytes > BUFFERSIZE ? BUFFERSIZE : total_bytes; 1122 total_bytes > BUFFERSIZE ? BUFFERSIZE : total_bytes;
1123 /* Read from External memory */ 1123 /* Read from External memory */
1124 status = read_ext_dsp_data(dev_ctxt, host_buf, src_addr, 1124 status = read_ext_dsp_data(dev_ctxt, host_buf, src_addr,
1125 copy_bytes, ulMemType); 1125 copy_bytes, mem_type);
1126 if (DSP_SUCCEEDED(status)) { 1126 if (DSP_SUCCEEDED(status)) {
1127 if (dest_addr < (dev_context->dw_dsp_start_add + 1127 if (dest_addr < (dev_context->dw_dsp_start_add +
1128 dev_context->dw_internal_size)) { 1128 dev_context->dw_internal_size)) {
1129 /* Write to Internal memory */ 1129 /* Write to Internal memory */
1130 status = write_dsp_data(dev_ctxt, host_buf, 1130 status = write_dsp_data(dev_ctxt, host_buf,
1131 dest_addr, copy_bytes, 1131 dest_addr, copy_bytes,
1132 ulMemType); 1132 mem_type);
1133 } else { 1133 } else {
1134 /* Write to External memory */ 1134 /* Write to External memory */
1135 status = 1135 status =
1136 write_ext_dsp_data(dev_ctxt, host_buf, 1136 write_ext_dsp_data(dev_ctxt, host_buf,
1137 dest_addr, copy_bytes, 1137 dest_addr, copy_bytes,
1138 ulMemType, false); 1138 mem_type, false);
1139 } 1139 }
1140 } 1140 }
1141 total_bytes -= copy_bytes; 1141 total_bytes -= copy_bytes;
@@ -1148,7 +1148,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
1148/* Mem Write does not halt the DSP to write unlike bridge_brd_write */ 1148/* Mem Write does not halt the DSP to write unlike bridge_brd_write */
1149static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt, 1149static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
1150 IN u8 *host_buff, u32 dsp_addr, 1150 IN u8 *host_buff, u32 dsp_addr,
1151 u32 ul_num_bytes, u32 ulMemType) 1151 u32 ul_num_bytes, u32 mem_type)
1152{ 1152{
1153 int status = 0; 1153 int status = 0;
1154 struct bridge_dev_context *dev_context = dev_ctxt; 1154 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 dev_context->dw_internal_size)) { 1162 dev_context->dw_internal_size)) {
1163 status = 1163 status =
1164 write_dsp_data(dev_ctxt, host_buff, dsp_addr, 1164 write_dsp_data(dev_ctxt, host_buff, dsp_addr,
1165 ul_bytes, ulMemType); 1165 ul_bytes, mem_type);
1166 } else { 1166 } else {
1167 status = write_ext_dsp_data(dev_ctxt, host_buff, 1167 status = write_ext_dsp_data(dev_ctxt, host_buff,
1168 dsp_addr, ul_bytes, 1168 dsp_addr, ul_bytes,
1169 ulMemType, true); 1169 mem_type, true);
1170 } 1170 }
1171 ul_remain_bytes -= ul_bytes; 1171 ul_remain_bytes -= ul_bytes;
1172 dsp_addr += ul_bytes; 1172 dsp_addr += ul_bytes;
@@ -1185,7 +1185,7 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
1185 * TODO: Disable MMU while updating the page tables (but that'll stall DSP) 1185 * TODO: Disable MMU while updating the page tables (but that'll stall DSP)
1186 */ 1186 */
1187static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt, 1187static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
1188 u32 ul_mpu_addr, u32 ulVirtAddr, 1188 u32 ul_mpu_addr, u32 virt_addr,
1189 u32 ul_num_bytes, u32 ul_map_attr, 1189 u32 ul_num_bytes, u32 ul_map_attr,
1190 struct page **mapped_pages) 1190 struct page **mapped_pages)
1191{ 1191{
@@ -1199,14 +1199,14 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
1199 u32 num_usr_pgs = 0; 1199 u32 num_usr_pgs = 0;
1200 struct page *mapped_page, *pg; 1200 struct page *mapped_page, *pg;
1201 s32 pg_num; 1201 s32 pg_num;
1202 u32 va = ulVirtAddr; 1202 u32 va = virt_addr;
1203 struct task_struct *curr_task = current; 1203 struct task_struct *curr_task = current;
1204 u32 pg_i = 0; 1204 u32 pg_i = 0;
1205 u32 mpu_addr, pa; 1205 u32 mpu_addr, pa;
1206 1206
1207 dev_dbg(bridge, 1207 dev_dbg(bridge,
1208 "%s hDevCtxt %p, pa %x, va %x, size %x, ul_map_attr %x\n", 1208 "%s hDevCtxt %p, pa %x, va %x, size %x, ul_map_attr %x\n",
1209 __func__, dev_ctxt, ul_mpu_addr, ulVirtAddr, ul_num_bytes, 1209 __func__, dev_ctxt, ul_mpu_addr, virt_addr, ul_num_bytes,
1210 ul_map_attr); 1210 ul_map_attr);
1211 if (ul_num_bytes == 0) 1211 if (ul_num_bytes == 0)
1212 return -EINVAL; 1212 return -EINVAL;
@@ -1253,7 +1253,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
1253 hw_attrs.donotlockmpupage = 0; 1253 hw_attrs.donotlockmpupage = 0;
1254 1254
1255 if (attrs & DSP_MAPVMALLOCADDR) { 1255 if (attrs & DSP_MAPVMALLOCADDR) {
1256 return mem_map_vmalloc(dev_ctxt, ul_mpu_addr, ulVirtAddr, 1256 return mem_map_vmalloc(dev_ctxt, ul_mpu_addr, virt_addr,
1257 ul_num_bytes, &hw_attrs); 1257 ul_num_bytes, &hw_attrs);
1258 } 1258 }
1259 /* 1259 /*
@@ -1262,7 +1262,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
1262 * Pass the translated pa to pte_update. 1262 * Pass the translated pa to pte_update.
1263 */ 1263 */
1264 if ((attrs & DSP_MAPPHYSICALADDR)) { 1264 if ((attrs & DSP_MAPPHYSICALADDR)) {
1265 status = pte_update(dev_context, ul_mpu_addr, ulVirtAddr, 1265 status = pte_update(dev_context, ul_mpu_addr, virt_addr,
1266 ul_num_bytes, &hw_attrs); 1266 ul_num_bytes, &hw_attrs);
1267 goto func_cont; 1267 goto func_cont;
1268 } 1268 }
@@ -1383,7 +1383,7 @@ func_cont:
1383 * mapping 1383 * mapping
1384 */ 1384 */
1385 if (pg_i) { 1385 if (pg_i) {
1386 bridge_brd_mem_un_map(dev_context, ulVirtAddr, 1386 bridge_brd_mem_un_map(dev_context, virt_addr,
1387 (pg_i * PG_SIZE4K)); 1387 (pg_i * PG_SIZE4K));
1388 } 1388 }
1389 status = -EPERM; 1389 status = -EPERM;
@@ -1408,7 +1408,7 @@ func_cont:
1408 * we clear consecutive PTEs until we unmap all the bytes 1408 * we clear consecutive PTEs until we unmap all the bytes
1409 */ 1409 */
1410static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt, 1410static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
1411 u32 ulVirtAddr, u32 ul_num_bytes) 1411 u32 virt_addr, u32 ul_num_bytes)
1412{ 1412{
1413 u32 l1_base_va; 1413 u32 l1_base_va;
1414 u32 l2_base_va; 1414 u32 l2_base_va;
@@ -1430,13 +1430,13 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
1430 u32 paddr; 1430 u32 paddr;
1431 u32 numof4k_pages = 0; 1431 u32 numof4k_pages = 0;
1432 1432
1433 va_curr = ulVirtAddr; 1433 va_curr = virt_addr;
1434 rem_bytes = ul_num_bytes; 1434 rem_bytes = ul_num_bytes;
1435 rem_bytes_l2 = 0; 1435 rem_bytes_l2 = 0;
1436 l1_base_va = pt->l1_base_va; 1436 l1_base_va = pt->l1_base_va;
1437 pte_addr_l1 = hw_mmu_pte_addr_l1(l1_base_va, va_curr); 1437 pte_addr_l1 = hw_mmu_pte_addr_l1(l1_base_va, va_curr);
1438 dev_dbg(bridge, "%s dev_ctxt %p, va %x, NumBytes %x l1_base_va %x, " 1438 dev_dbg(bridge, "%s dev_ctxt %p, va %x, NumBytes %x l1_base_va %x, "
1439 "pte_addr_l1 %x\n", __func__, dev_ctxt, ulVirtAddr, 1439 "pte_addr_l1 %x\n", __func__, dev_ctxt, virt_addr,
1440 ul_num_bytes, l1_base_va, pte_addr_l1); 1440 ul_num_bytes, l1_base_va, pte_addr_l1);
1441 1441
1442 while (rem_bytes && (DSP_SUCCEEDED(status))) { 1442 while (rem_bytes && (DSP_SUCCEEDED(status))) {
@@ -1771,7 +1771,7 @@ static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,
1771 1771
1772/* Memory map kernel VA -- memory allocated with vmalloc */ 1772/* Memory map kernel VA -- memory allocated with vmalloc */
1773static int mem_map_vmalloc(struct bridge_dev_context *dev_context, 1773static int mem_map_vmalloc(struct bridge_dev_context *dev_context,
1774 u32 ul_mpu_addr, u32 ulVirtAddr, 1774 u32 ul_mpu_addr, u32 virt_addr,
1775 u32 ul_num_bytes, 1775 u32 ul_num_bytes,
1776 struct hw_mmu_map_attrs_t *hw_attrs) 1776 struct hw_mmu_map_attrs_t *hw_attrs)
1777{ 1777{
@@ -1830,7 +1830,7 @@ static int mem_map_vmalloc(struct bridge_dev_context *dev_context,
1830 get_page(PHYS_TO_PAGE(pa)); 1830 get_page(PHYS_TO_PAGE(pa));
1831 pa += HW_PAGE_SIZE4KB; 1831 pa += HW_PAGE_SIZE4KB;
1832 } 1832 }
1833 status = pte_update(dev_context, pa_curr, ulVirtAddr + 1833 status = pte_update(dev_context, pa_curr, virt_addr +
1834 (va_curr - ul_mpu_addr), size_curr, 1834 (va_curr - ul_mpu_addr), size_curr,
1835 hw_attrs); 1835 hw_attrs);
1836 va_curr += size_curr; 1836 va_curr += size_curr;
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index 0ac4f8c42ae..a3fcb029b91 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -52,7 +52,7 @@ bool symbols_reloaded = true;
52 */ 52 */
53int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt, 53int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
54 OUT u8 *host_buff, u32 dsp_addr, 54 OUT u8 *host_buff, u32 dsp_addr,
55 u32 ul_num_bytes, u32 ulMemType) 55 u32 ul_num_bytes, u32 mem_type)
56{ 56{
57 int status = 0; 57 int status = 0;
58 struct bridge_dev_context *dev_context = dev_ctxt; 58 struct bridge_dev_context *dev_context = dev_ctxt;
@@ -180,7 +180,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
180 */ 180 */
181int write_dsp_data(struct bridge_dev_context *dev_ctxt, 181int write_dsp_data(struct bridge_dev_context *dev_ctxt,
182 IN u8 *host_buff, u32 dsp_addr, u32 ul_num_bytes, 182 IN u8 *host_buff, u32 dsp_addr, u32 ul_num_bytes,
183 u32 ulMemType) 183 u32 mem_type)
184{ 184{
185 u32 offset; 185 u32 offset;
186 u32 dw_base_addr = dev_ctxt->dw_dsp_base_addr; 186 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 */ 226 */
227int write_ext_dsp_data(struct bridge_dev_context *dev_context, 227int write_ext_dsp_data(struct bridge_dev_context *dev_context,
228 IN u8 *host_buff, u32 dsp_addr, 228 IN u8 *host_buff, u32 dsp_addr,
229 u32 ul_num_bytes, u32 ulMemType, 229 u32 ul_num_bytes, u32 mem_type,
230 bool dynamic_load) 230 bool dynamic_load)
231{ 231{
232 u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr; 232 u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr;
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.h b/drivers/staging/tidspbridge/core/tiomap_io.h
index cff8691b1c3..8f9d0720216 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.h
+++ b/drivers/staging/tidspbridge/core/tiomap_io.h
@@ -49,14 +49,14 @@
49 */ 49 */
50extern int read_ext_dsp_data(struct bridge_dev_context *dev_context, 50extern int read_ext_dsp_data(struct bridge_dev_context *dev_context,
51 OUT u8 *host_buff, u32 dsp_addr, 51 OUT u8 *host_buff, u32 dsp_addr,
52 u32 ul_num_bytes, u32 ulMemType); 52 u32 ul_num_bytes, u32 mem_type);
53 53
54/* 54/*
55 * ======== write_dsp_data ======== 55 * ======== write_dsp_data ========
56 */ 56 */
57extern int write_dsp_data(struct bridge_dev_context *dev_context, 57extern int write_dsp_data(struct bridge_dev_context *dev_context,
58 OUT u8 *host_buff, u32 dsp_addr, 58 OUT u8 *host_buff, u32 dsp_addr,
59 u32 ul_num_bytes, u32 ulMemType); 59 u32 ul_num_bytes, u32 mem_type);
60 60
61/* 61/*
62 * ======== write_ext_dsp_data ======== 62 * ======== write_ext_dsp_data ========
@@ -66,7 +66,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context,
66 */ 66 */
67extern int write_ext_dsp_data(struct bridge_dev_context *dev_context, 67extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
68 IN u8 *host_buff, u32 dsp_addr, 68 IN u8 *host_buff, u32 dsp_addr,
69 u32 ul_num_bytes, u32 ulMemType, 69 u32 ul_num_bytes, u32 mem_type,
70 bool dynamic_load); 70 bool dynamic_load);
71 71
72/* 72/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 78cc12a9afa..3944a1e505c 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -262,17 +262,17 @@ extern int cmm_un_register_gppsm_seg(struct cmm_object *hcmm_mgr,
262 * Parameters: 262 * Parameters:
263 * xlator: Handle to a Xlator object. 263 * xlator: Handle to a Xlator object.
264 * va_buf: Virtual address ptr(client context) 264 * va_buf: Virtual address ptr(client context)
265 * uPaSize: Size of SM memory to allocate. 265 * pa_size: Size of SM memory to allocate.
266 * Returns: 266 * Returns:
267 * Ptr to valid physical address(Pa) of uPaSize bytes, NULL if failed. 267 * Ptr to valid physical address(Pa) of pa_size bytes, NULL if failed.
268 * Requires: 268 * Requires:
269 * va_buf != 0. 269 * va_buf != 0.
270 * uPaSize != 0. 270 * pa_size != 0.
271 * Ensures: 271 * Ensures:
272 * 272 *
273 */ 273 */
274extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, 274extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
275 void *va_buf, u32 uPaSize); 275 void *va_buf, u32 pa_size);
276 276
277/* 277/*
278 * ======== cmm_xlator_create ======== 278 * ======== cmm_xlator_create ========
@@ -346,7 +346,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator,
346 * xlator: handle to translator. 346 * xlator: handle to translator.
347 * paddr: Virtual base address of segment. 347 * paddr: Virtual base address of segment.
348 * ul_size: Size in bytes. 348 * ul_size: Size in bytes.
349 * uSegId: Segment identifier of SM segment(s) 349 * segm_id: Segment identifier of SM segment(s)
350 * set_info Set xlator fields if TRUE, else return base addr 350 * set_info Set xlator fields if TRUE, else return base addr
351 * Returns: 351 * Returns:
352 * 0: Success. 352 * 0: Success.
@@ -360,7 +360,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator,
360 */ 360 */
361extern int cmm_xlator_info(struct cmm_xlatorobject *xlator, 361extern int cmm_xlator_info(struct cmm_xlatorobject *xlator,
362 IN OUT u8 **paddr, 362 IN OUT u8 **paddr,
363 u32 ul_size, u32 uSegId, bool set_info); 363 u32 ul_size, u32 segm_id, bool set_info);
364 364
365/* 365/*
366 * ======== cmm_xlator_translate ======== 366 * ======== cmm_xlator_translate ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index 2d5f41a49e8..382764618c2 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -49,7 +49,7 @@ struct cod_attrs {
49 * Function prototypes for writing memory to a DSP system, allocating 49 * Function prototypes for writing memory to a DSP system, allocating
50 * and freeing DSP memory. 50 * and freeing DSP memory.
51 */ 51 */
52typedef u32(*cod_writefxn) (void *priv_ref, u32 ulDspAddr, 52typedef u32(*cod_writefxn) (void *priv_ref, u32 dsp_add,
53 void *pbuf, u32 ul_num_bytes, u32 mem_space); 53 void *pbuf, u32 ul_num_bytes, u32 mem_space);
54 54
55/* 55/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dev.h b/drivers/staging/tidspbridge/include/dspbridge/dev.h
index 0cdbcb22993..aa894192487 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dev.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dev.h
@@ -45,7 +45,7 @@
45 * dsp_addr: Address on DSP board (Destination). 45 * dsp_addr: Address on DSP board (Destination).
46 * host_buf: Pointer to host buffer (Source). 46 * host_buf: Pointer to host buffer (Source).
47 * ul_num_bytes: Number of bytes to transfer. 47 * ul_num_bytes: Number of bytes to transfer.
48 * ulMemType: Memory space on DSP to which to transfer. 48 * mem_type: Memory space on DSP to which to transfer.
49 * Returns: 49 * Returns:
50 * Number of bytes written. Returns 0 if the DEV_hObject passed in via 50 * Number of bytes written. Returns 0 if the DEV_hObject passed in via
51 * arb is invalid. 51 * arb is invalid.
@@ -55,7 +55,7 @@
55 * Ensures: 55 * Ensures:
56 */ 56 */
57extern u32 dev_brd_write_fxn(void *arb, 57extern u32 dev_brd_write_fxn(void *arb,
58 u32 ulDspAddr, 58 u32 dsp_add,
59 void *host_buf, u32 ul_num_bytes, u32 mem_space); 59 void *host_buf, u32 ul_num_bytes, u32 mem_space);
60 60
61/* 61/*
@@ -622,7 +622,7 @@ extern int dev_remove_proc_object(struct dev_object
622 * set up by a watchdog timer. 622 * set up by a watchdog timer.
623 * Parameters: 623 * Parameters:
624 * hdev_obj: Handle to device object created with dev_create_device(). 624 * hdev_obj: Handle to device object created with dev_create_device().
625 * ulStatus: A status word, most likely a BRD_STATUS. 625 * ret: A status word, most likely a BRD_STATUS.
626 * Returns: 626 * Returns:
627 * 0: All registered clients were asynchronously notified. 627 * 0: All registered clients were asynchronously notified.
628 * -EINVAL: Invalid hdev_obj. 628 * -EINVAL: Invalid hdev_obj.
@@ -633,7 +633,7 @@ extern int dev_remove_proc_object(struct dev_object
633 * delivered to clients. This function does not ensure that 633 * delivered to clients. This function does not ensure that
634 * the notifications will ever be delivered. 634 * the notifications will ever be delivered.
635 */ 635 */
636extern int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus); 636extern int dev_notify_clients(struct dev_object *hdev_obj, u32 ret);
637 637
638/* 638/*
639 * ======== dev_remove_device ======== 639 * ======== dev_remove_device ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index 1e4049be968..f2830fe4f9e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -74,19 +74,19 @@ typedef int(*fxn_brd_monitor) (struct bridge_dev_context *dev_ctxt);
74 * Sets the Bridge driver state 74 * Sets the Bridge driver state
75 * Parameters: 75 * Parameters:
76 * dev_ctxt: Handle to Bridge driver defined device info. 76 * dev_ctxt: Handle to Bridge driver defined device info.
77 * ulBrdState: Board state 77 * brd_state: Board state
78 * Returns: 78 * Returns:
79 * 0: Success. 79 * 0: Success.
80 * -EPERM: Other, unspecified error. 80 * -EPERM: Other, unspecified error.
81 * Requires: 81 * Requires:
82 * dev_ctxt != NULL; 82 * dev_ctxt != NULL;
83 * ulBrdState <= BRD_LASTSTATE. 83 * brd_state <= BRD_LASTSTATE.
84 * Ensures: 84 * Ensures:
85 * ulBrdState <= BRD_LASTSTATE. 85 * brd_state <= BRD_LASTSTATE.
86 * Update the Board state to the specified state. 86 * Update the Board state to the specified state.
87 */ 87 */
88typedef int(*fxn_brd_setstate) (struct bridge_dev_context 88typedef int(*fxn_brd_setstate) (struct bridge_dev_context
89 * dev_ctxt, u32 ulBrdState); 89 * dev_ctxt, u32 brd_state);
90 90
91/* 91/*
92 * ======== bridge_brd_start ======== 92 * ======== bridge_brd_start ========
@@ -116,10 +116,10 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context
116 * Copy memory from one DSP address to another 116 * Copy memory from one DSP address to another
117 * Parameters: 117 * Parameters:
118 * dev_context: Pointer to context handle 118 * dev_context: Pointer to context handle
119 * ulDspDestAddr: DSP address to copy to 119 * dsp_dest_addr: DSP address to copy to
120 * ulDspSrcAddr: DSP address to copy from 120 * dsp_src_addr: DSP address to copy from
121 * ul_num_bytes: Number of bytes to copy 121 * ul_num_bytes: Number of bytes to copy
122 * ulMemType: What section of memory to copy to 122 * mem_type: What section of memory to copy to
123 * Returns: 123 * Returns:
124 * 0: Success. 124 * 0: Success.
125 * -EPERM: Other, unspecified error. 125 * -EPERM: Other, unspecified error.
@@ -132,9 +132,9 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context
132 */ 132 */
133typedef int(*fxn_brd_memcopy) (struct bridge_dev_context 133typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
134 * dev_ctxt, 134 * dev_ctxt,
135 u32 ulDspDestAddr, 135 u32 dsp_dest_addr,
136 u32 ulDspSrcAddr, 136 u32 dsp_src_addr,
137 u32 ul_num_bytes, u32 ulMemType); 137 u32 ul_num_bytes, u32 mem_type);
138/* 138/*
139 * ======== bridge_brd_mem_write ======== 139 * ======== bridge_brd_mem_write ========
140 * Purpose: 140 * Purpose:
@@ -145,7 +145,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
145 * dsp_addr: Address on DSP board (Destination). 145 * dsp_addr: Address on DSP board (Destination).
146 * host_buf: Pointer to host buffer (Source). 146 * host_buf: Pointer to host buffer (Source).
147 * ul_num_bytes: Number of bytes to transfer. 147 * ul_num_bytes: Number of bytes to transfer.
148 * ulMemType: Memory space on DSP to which to transfer. 148 * mem_type: Memory space on DSP to which to transfer.
149 * Returns: 149 * Returns:
150 * 0: Success. 150 * 0: Success.
151 * -ETIMEDOUT: Timeout occured waiting for a response from hardware. 151 * -ETIMEDOUT: Timeout occured waiting for a response from hardware.
@@ -159,7 +159,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
159 * dev_ctxt, 159 * dev_ctxt,
160 IN u8 *host_buf, 160 IN u8 *host_buf,
161 u32 dsp_addr, u32 ul_num_bytes, 161 u32 dsp_addr, u32 ul_num_bytes,
162 u32 ulMemType); 162 u32 mem_type);
163 163
164/* 164/*
165 * ======== bridge_brd_mem_map ======== 165 * ======== bridge_brd_mem_map ========
@@ -168,7 +168,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
168 * Parameters: 168 * Parameters:
169 * dev_ctxt: Handle to Bridge driver defined device info. 169 * dev_ctxt: Handle to Bridge driver defined device info.
170 * ul_mpu_addr: MPU memory region start address. 170 * ul_mpu_addr: MPU memory region start address.
171 * ulVirtAddr: DSP/IVA memory region u8 address. 171 * virt_addr: DSP/IVA memory region u8 address.
172 * ul_num_bytes: Number of bytes to map. 172 * ul_num_bytes: Number of bytes to map.
173 * map_attrs: Mapping attributes (e.g. endianness). 173 * map_attrs: Mapping attributes (e.g. endianness).
174 * Returns: 174 * Returns:
@@ -180,8 +180,8 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
180 */ 180 */
181typedef int(*fxn_brd_memmap) (struct bridge_dev_context 181typedef int(*fxn_brd_memmap) (struct bridge_dev_context
182 * dev_ctxt, u32 ul_mpu_addr, 182 * dev_ctxt, u32 ul_mpu_addr,
183 u32 ulVirtAddr, u32 ul_num_bytes, 183 u32 virt_addr, u32 ul_num_bytes,
184 u32 ulMapAttrs, 184 u32 map_attr,
185 struct page **mapped_pages); 185 struct page **mapped_pages);
186 186
187/* 187/*
@@ -190,7 +190,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context
190 * UnMap an MPU memory region from DSP/IVA memory space 190 * UnMap an MPU memory region from DSP/IVA memory space
191 * Parameters: 191 * Parameters:
192 * dev_ctxt: Handle to Bridge driver defined device info. 192 * dev_ctxt: Handle to Bridge driver defined device info.
193 * ulVirtAddr: DSP/IVA memory region u8 address. 193 * virt_addr: DSP/IVA memory region u8 address.
194 * ul_num_bytes: Number of bytes to unmap. 194 * ul_num_bytes: Number of bytes to unmap.
195 * Returns: 195 * Returns:
196 * 0: Success. 196 * 0: Success.
@@ -201,7 +201,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context
201 */ 201 */
202typedef int(*fxn_brd_memunmap) (struct bridge_dev_context 202typedef int(*fxn_brd_memunmap) (struct bridge_dev_context
203 * dev_ctxt, 203 * dev_ctxt,
204 u32 ulVirtAddr, u32 ul_num_bytes); 204 u32 virt_addr, u32 ul_num_bytes);
205 205
206/* 206/*
207 * ======== bridge_brd_stop ======== 207 * ======== bridge_brd_stop ========
@@ -251,7 +251,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
251 * host_buf: Pointer to host buffer (Destination). 251 * host_buf: Pointer to host buffer (Destination).
252 * dsp_addr: Address on DSP board (Source). 252 * dsp_addr: Address on DSP board (Source).
253 * ul_num_bytes: Number of bytes to transfer. 253 * ul_num_bytes: Number of bytes to transfer.
254 * ulMemType: Memory space on DSP from which to transfer. 254 * mem_type: Memory space on DSP from which to transfer.
255 * Returns: 255 * Returns:
256 * 0: Success. 256 * 0: Success.
257 * -ETIMEDOUT: Timeout occured waiting for a response from hardware. 257 * -ETIMEDOUT: Timeout occured waiting for a response from hardware.
@@ -265,7 +265,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
265typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt, 265typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
266 OUT u8 *host_buf, 266 OUT u8 *host_buf,
267 u32 dsp_addr, 267 u32 dsp_addr,
268 u32 ul_num_bytes, u32 ulMemType); 268 u32 ul_num_bytes, u32 mem_type);
269 269
270/* 270/*
271 * ======== bridge_brd_write ======== 271 * ======== bridge_brd_write ========
@@ -277,7 +277,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
277 * dsp_addr: Address on DSP board (Destination). 277 * dsp_addr: Address on DSP board (Destination).
278 * host_buf: Pointer to host buffer (Source). 278 * host_buf: Pointer to host buffer (Source).
279 * ul_num_bytes: Number of bytes to transfer. 279 * ul_num_bytes: Number of bytes to transfer.
280 * ulMemType: Memory space on DSP to which to transfer. 280 * mem_type: Memory space on DSP to which to transfer.
281 * Returns: 281 * Returns:
282 * 0: Success. 282 * 0: Success.
283 * -ETIMEDOUT: Timeout occured waiting for a response from hardware. 283 * -ETIMEDOUT: Timeout occured waiting for a response from hardware.
@@ -290,7 +290,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
290typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt, 290typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
291 IN u8 *host_buf, 291 IN u8 *host_buf,
292 u32 dsp_addr, 292 u32 dsp_addr,
293 u32 ul_num_bytes, u32 ulMemType); 293 u32 ul_num_bytes, u32 mem_type);
294 294
295/* 295/*
296 * ======== bridge_chnl_create ======== 296 * ======== bridge_chnl_create ========
@@ -351,17 +351,17 @@ typedef int(*fxn_chnl_destroy) (struct chnl_mgr *hchnl_mgr);
351 * When notified of DSP error, take appropriate action. 351 * When notified of DSP error, take appropriate action.
352 * Parameters: 352 * Parameters:
353 * hdeh_mgr: Handle to DEH manager object. 353 * hdeh_mgr: Handle to DEH manager object.
354 * ulEventMask: Indicate the type of exception 354 * evnt_mask: Indicate the type of exception
355 * error_info: Error information 355 * error_info: Error information
356 * Returns: 356 * Returns:
357 * 357 *
358 * Requires: 358 * Requires:
359 * hdeh_mgr != NULL; 359 * hdeh_mgr != NULL;
360 * ulEventMask with a valid exception 360 * evnt_mask with a valid exception
361 * Ensures: 361 * Ensures:
362 */ 362 */
363typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr, 363typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
364 u32 ulEventMask, u32 error_info); 364 u32 evnt_mask, u32 error_info);
365 365
366/* 366/*
367 * ======== bridge_chnl_open ======== 367 * ======== bridge_chnl_open ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index 538fbcd9099..7fff2b3df43 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -54,13 +54,13 @@ extern u32 vdd1_dsp_freq[6][4];
54 * Cancel IO on a given channel. 54 * Cancel IO on a given channel.
55 * Parameters: 55 * Parameters:
56 * hio_mgr: IO Manager. 56 * hio_mgr: IO Manager.
57 * ulChnl: Index of channel to cancel IO on. 57 * chnl: Index of channel to cancel IO on.
58 * Returns: 58 * Returns:
59 * Requires: 59 * Requires:
60 * Valid hio_mgr. 60 * Valid hio_mgr.
61 * Ensures: 61 * Ensures:
62 */ 62 */
63extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl); 63extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 chnl);
64 64
65/* 65/*
66 * ======== io_dpc ======== 66 * ======== io_dpc ========
@@ -142,20 +142,20 @@ extern void iosm_schedule(struct io_mgr *hio_mgr);
142 * Parameters: 142 * Parameters:
143 * hio_mgr: Handle to a I/O manager. 143 * hio_mgr: Handle to a I/O manager.
144 * ddma_chnl_id: DDMA channel identifier. 144 * ddma_chnl_id: DDMA channel identifier.
145 * uNumDesc: Number of buffer descriptors(equals # of IOReqs & 145 * num_desc: Number of buffer descriptors(equals # of IOReqs &
146 * Chirps) 146 * Chirps)
147 * dsp: Dsp address; 147 * dsp: Dsp address;
148 * Returns: 148 * Returns:
149 * Requires: 149 * Requires:
150 * ddma_chnl_id < DDMA_MAXDDMACHNLS 150 * ddma_chnl_id < DDMA_MAXDDMACHNLS
151 * uNumDesc > 0 151 * num_desc > 0
152 * pVa != NULL 152 * pVa != NULL
153 * pDspPa != NULL 153 * pDspPa != NULL
154 * 154 *
155 * Ensures: 155 * Ensures:
156 */ 156 */
157extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id, 157extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id,
158 u32 uNumDesc, void *dsp); 158 u32 num_desc, void *dsp);
159 159
160/* 160/*
161 * ======== io_ddma_clear_chnl_desc ======== 161 * ======== io_ddma_clear_chnl_desc ========
@@ -202,14 +202,14 @@ extern void io_ddma_request_chnl(struct io_mgr *hio_mgr,
202 * Initialize ZCPY channel descriptor. 202 * Initialize ZCPY channel descriptor.
203 * Parameters: 203 * Parameters:
204 * hio_mgr: Handle to a I/O manager. 204 * hio_mgr: Handle to a I/O manager.
205 * uZId: zero-copy channel identifier. 205 * zid: zero-copy channel identifier.
206 * Returns: 206 * Returns:
207 * Requires: 207 * Requires:
208 * ddma_chnl_id < DDMA_MAXZCPYCHNLS 208 * ddma_chnl_id < DDMA_MAXZCPYCHNLS
209 * hio_mgr != Null 209 * hio_mgr != Null
210 * Ensures: 210 * Ensures:
211 */ 211 */
212extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 uZId); 212extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 zid);
213 213
214/* 214/*
215 * ======== io_ddzc_clear_chnl_desc ======== 215 * ======== io_ddzc_clear_chnl_desc ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
index ed20dc0e363..9d351148030 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
@@ -45,8 +45,8 @@ enum nldr_loadtype {
45 * 45 *
46 * Parameters: 46 * Parameters:
47 * priv_ref: Handle to identify the node. 47 * priv_ref: Handle to identify the node.
48 * ulDspRunAddr: Run address of code or data. 48 * dsp_run_addr: Run address of code or data.
49 * ulDspLoadAddr: Load address of code or data. 49 * dsp_load_addr: Load address of code or data.
50 * ul_num_bytes: Number of (GPP) bytes to copy. 50 * ul_num_bytes: Number of (GPP) bytes to copy.
51 * mem_space: RMS_CODE or RMS_DATA. 51 * mem_space: RMS_CODE or RMS_DATA.
52 * Returns: 52 * Returns:
@@ -55,15 +55,15 @@ enum nldr_loadtype {
55 * Requires: 55 * Requires:
56 * Ensures: 56 * Ensures:
57 */ 57 */
58typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr, 58typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 dsp_run_addr,
59 u32 ulDspLoadAddr, u32 ul_num_bytes, u32 mem_space); 59 u32 dsp_load_addr, u32 ul_num_bytes, u32 mem_space);
60 60
61/* 61/*
62 * ======== nldr_writefxn ======== 62 * ======== nldr_writefxn ========
63 * Write memory function. Used for dynamic load writes. 63 * Write memory function. Used for dynamic load writes.
64 * Parameters: 64 * Parameters:
65 * priv_ref: Handle to identify the node. 65 * priv_ref: Handle to identify the node.
66 * ulDspAddr: Address of code or data. 66 * dsp_add: Address of code or data.
67 * pbuf: Code or data to be written 67 * pbuf: Code or data to be written
68 * ul_num_bytes: Number of (GPP) bytes to write. 68 * ul_num_bytes: Number of (GPP) bytes to write.
69 * mem_space: DBLL_DATA or DBLL_CODE. 69 * mem_space: DBLL_DATA or DBLL_CODE.
@@ -74,7 +74,7 @@ typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr,
74 * Ensures: 74 * Ensures:
75 */ 75 */
76typedef u32(*nldr_writefxn) (void *priv_ref, 76typedef u32(*nldr_writefxn) (void *priv_ref,
77 u32 ulDspAddr, void *pbuf, 77 u32 dsp_add, void *pbuf,
78 u32 ul_num_bytes, u32 mem_space); 78 u32 ul_num_bytes, u32 mem_space);
79 79
80/* 80/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/node.h b/drivers/staging/tidspbridge/include/dspbridge/node.h
index e87708d7435..d933b274031 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/node.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/node.h
@@ -147,11 +147,11 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
147 * if this is a connection from DSP node to GPP, or a 147 * if this is a connection from DSP node to GPP, or a
148 * node handle returned from a successful call to 148 * node handle returned from a successful call to
149 * node_allocate(). 149 * node_allocate().
150 * uStream1: Output stream index on first node, to be connected 150 * stream1: Output stream index on first node, to be connected
151 * to second node's input stream. Value must range from 151 * to second node's input stream. Value must range from
152 * 0 <= uStream1 < number of output streams. 152 * 0 <= stream1 < number of output streams.
153 * uStream2: Input stream index on second node. Value must range 153 * stream2: Input stream index on second node. Value must range
154 * from 0 <= uStream2 < number of input streams. 154 * from 0 <= stream2 < number of input streams.
155 * pattrs: Stream attributes (NULL ==> use defaults). 155 * pattrs: Stream attributes (NULL ==> use defaults).
156 * conn_param: A pointer to a dsp_cbdata structure that defines 156 * conn_param: A pointer to a dsp_cbdata structure that defines
157 * connection parameter for device nodes to pass to DSP 157 * connection parameter for device nodes to pass to DSP
@@ -167,7 +167,7 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
167 * -ENOMEM: Insufficient host memory. 167 * -ENOMEM: Insufficient host memory.
168 * -EINVAL: A stream index parameter is invalid. 168 * -EINVAL: A stream index parameter is invalid.
169 * -EISCONN: A connection already exists for one of the 169 * -EISCONN: A connection already exists for one of the
170 * indices uStream1 or uStream2. 170 * indices stream1 or stream2.
171 * -EBADR: Either node1 or node2 is not in the 171 * -EBADR: Either node1 or node2 is not in the
172 * NODE_ALLOCATED state. 172 * NODE_ALLOCATED state.
173 * -ECONNREFUSED: No more connections available. 173 * -ECONNREFUSED: No more connections available.
@@ -179,9 +179,9 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
179 * Ensures: 179 * Ensures:
180 */ 180 */
181extern int node_connect(struct node_object *node1, 181extern int node_connect(struct node_object *node1,
182 u32 uStream1, 182 u32 stream1,
183 struct node_object *node2, 183 struct node_object *node2,
184 u32 uStream2, 184 u32 stream2,
185 OPTIONAL IN struct dsp_strmattr *pattrs, 185 OPTIONAL IN struct dsp_strmattr *pattrs,
186 OPTIONAL IN struct dsp_cbdata 186 OPTIONAL IN struct dsp_cbdata
187 *conn_param); 187 *conn_param);
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index 0a360857e75..2381984e559 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -1008,7 +1008,7 @@ int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool force)
1008 * ======== cmm_xlator_alloc_buf ======== 1008 * ======== cmm_xlator_alloc_buf ========
1009 */ 1009 */
1010void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf, 1010void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
1011 u32 uPaSize) 1011 u32 pa_size)
1012{ 1012{
1013 struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator; 1013 struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
1014 void *pbuf = NULL; 1014 void *pbuf = NULL;
@@ -1018,7 +1018,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
1018 DBC_REQUIRE(xlator != NULL); 1018 DBC_REQUIRE(xlator != NULL);
1019 DBC_REQUIRE(xlator_obj->hcmm_mgr != NULL); 1019 DBC_REQUIRE(xlator_obj->hcmm_mgr != NULL);
1020 DBC_REQUIRE(va_buf != NULL); 1020 DBC_REQUIRE(va_buf != NULL);
1021 DBC_REQUIRE(uPaSize > 0); 1021 DBC_REQUIRE(pa_size > 0);
1022 DBC_REQUIRE(xlator_obj->ul_seg_id > 0); 1022 DBC_REQUIRE(xlator_obj->ul_seg_id > 0);
1023 1023
1024 if (xlator_obj) { 1024 if (xlator_obj) {
@@ -1026,7 +1026,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
1026 *(volatile u32 *)va_buf = 0; 1026 *(volatile u32 *)va_buf = 0;
1027 /* Alloc SM */ 1027 /* Alloc SM */
1028 pbuf = 1028 pbuf =
1029 cmm_calloc_buf(xlator_obj->hcmm_mgr, uPaSize, &attrs, NULL); 1029 cmm_calloc_buf(xlator_obj->hcmm_mgr, pa_size, &attrs, NULL);
1030 if (pbuf) { 1030 if (pbuf) {
1031 /* convert to translator(node/strm) process Virtual 1031 /* convert to translator(node/strm) process Virtual
1032 * address */ 1032 * address */
@@ -1076,14 +1076,14 @@ int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, void *buf_va)
1076 * Set/Get translator info. 1076 * Set/Get translator info.
1077 */ 1077 */
1078int cmm_xlator_info(struct cmm_xlatorobject *xlator, IN OUT u8 ** paddr, 1078int cmm_xlator_info(struct cmm_xlatorobject *xlator, IN OUT u8 ** paddr,
1079 u32 ul_size, u32 uSegId, bool set_info) 1079 u32 ul_size, u32 segm_id, bool set_info)
1080{ 1080{
1081 struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator; 1081 struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
1082 int status = 0; 1082 int status = 0;
1083 1083
1084 DBC_REQUIRE(refs > 0); 1084 DBC_REQUIRE(refs > 0);
1085 DBC_REQUIRE(paddr != NULL); 1085 DBC_REQUIRE(paddr != NULL);
1086 DBC_REQUIRE((uSegId > 0) && (uSegId <= CMM_MAXGPPSEGS)); 1086 DBC_REQUIRE((segm_id > 0) && (segm_id <= CMM_MAXGPPSEGS));
1087 1087
1088 if (xlator_obj) { 1088 if (xlator_obj) {
1089 if (set_info) { 1089 if (set_info) {
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 55e2a5e981c..f1b69e10315 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -100,7 +100,7 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
100 * is passed a handle to a DEV_hObject, then calls the 100 * is passed a handle to a DEV_hObject, then calls the
101 * device's bridge_brd_write() function. 101 * device's bridge_brd_write() function.
102 */ 102 */
103u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *host_buf, 103u32 dev_brd_write_fxn(void *arb, u32 dsp_add, void *host_buf,
104 u32 ul_num_bytes, u32 mem_space) 104 u32 ul_num_bytes, u32 mem_space)
105{ 105{
106 struct dev_object *dev_obj = (struct dev_object *)arb; 106 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 DBC_ASSERT(dev_obj->hbridge_context != NULL); 114 DBC_ASSERT(dev_obj->hbridge_context != NULL);
115 status = (*dev_obj->bridge_interface.pfn_brd_write) ( 115 status = (*dev_obj->bridge_interface.pfn_brd_write) (
116 dev_obj->hbridge_context, host_buf, 116 dev_obj->hbridge_context, host_buf,
117 ulDspAddr, ul_num_bytes, mem_space); 117 dsp_add, ul_num_bytes, mem_space);
118 /* Special case of getting the address only */ 118 /* Special case of getting the address only */
119 if (ul_num_bytes == 0) 119 if (ul_num_bytes == 0)
120 ul_num_bytes = 1; 120 ul_num_bytes = 1;
@@ -798,7 +798,7 @@ bool dev_init(void)
798 * Purpose: 798 * Purpose:
799 * Notify all clients of this device of a change in device status. 799 * Notify all clients of this device of a change in device status.
800 */ 800 */
801int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus) 801int dev_notify_clients(struct dev_object *hdev_obj, u32 ret)
802{ 802{
803 int status = 0; 803 int status = 0;
804 804
@@ -809,7 +809,7 @@ int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus)
809 proc_obj != NULL; 809 proc_obj != NULL;
810 proc_obj = (void *)lst_next(dev_obj->proc_list, 810 proc_obj = (void *)lst_next(dev_obj->proc_list,
811 (struct list_head *)proc_obj)) 811 (struct list_head *)proc_obj))
812 proc_notify_clients(proc_obj, (u32) ulStatus); 812 proc_notify_clients(proc_obj, (u32) ret);
813 813
814 return status; 814 return status;
815} 815}
diff --git a/drivers/staging/tidspbridge/rmgr/disp.c b/drivers/staging/tidspbridge/rmgr/disp.c
index d2cb55858f0..13cfdfb4d9f 100644
--- a/drivers/staging/tidspbridge/rmgr/disp.c
+++ b/drivers/staging/tidspbridge/rmgr/disp.c
@@ -223,7 +223,7 @@ bool disp_init(void)
223 */ 223 */
224int disp_node_change_priority(struct disp_object *disp_obj, 224int disp_node_change_priority(struct disp_object *disp_obj,
225 struct node_object *hnode, 225 struct node_object *hnode,
226 u32 ulRMSFxn, nodeenv node_env, s32 prio) 226 u32 rms_fxn, nodeenv node_env, s32 prio)
227{ 227{
228 u32 dw_arg; 228 u32 dw_arg;
229 struct rms_command *rms_cmd; 229 struct rms_command *rms_cmd;
@@ -235,7 +235,7 @@ int disp_node_change_priority(struct disp_object *disp_obj,
235 235
236 /* Send message to RMS to change priority */ 236 /* Send message to RMS to change priority */
237 rms_cmd = (struct rms_command *)(disp_obj->pbuf); 237 rms_cmd = (struct rms_command *)(disp_obj->pbuf);
238 rms_cmd->fxn = (rms_word) (ulRMSFxn); 238 rms_cmd->fxn = (rms_word) (rms_fxn);
239 rms_cmd->arg1 = (rms_word) node_env; 239 rms_cmd->arg1 = (rms_word) node_env;
240 rms_cmd->arg2 = prio; 240 rms_cmd->arg2 = prio;
241 status = send_message(disp_obj, node_get_timeout(hnode), 241 status = send_message(disp_obj, node_get_timeout(hnode),
@@ -249,7 +249,7 @@ int disp_node_change_priority(struct disp_object *disp_obj,
249 * Create a node on the DSP by remotely calling the node's create function. 249 * Create a node on the DSP by remotely calling the node's create function.
250 */ 250 */
251int disp_node_create(struct disp_object *disp_obj, 251int disp_node_create(struct disp_object *disp_obj,
252 struct node_object *hnode, u32 ulRMSFxn, 252 struct node_object *hnode, u32 rms_fxn,
253 u32 ul_create_fxn, 253 u32 ul_create_fxn,
254 IN CONST struct node_createargs *pargs, 254 IN CONST struct node_createargs *pargs,
255 OUT nodeenv *node_env) 255 OUT nodeenv *node_env)
@@ -351,7 +351,7 @@ int disp_node_create(struct disp_object *disp_obj,
351 total = 0; /* Total number of words in buffer so far */ 351 total = 0; /* Total number of words in buffer so far */
352 pdw_buf = (rms_word *) disp_obj->pbuf; 352 pdw_buf = (rms_word *) disp_obj->pbuf;
353 rms_cmd = (struct rms_command *)pdw_buf; 353 rms_cmd = (struct rms_command *)pdw_buf;
354 rms_cmd->fxn = (rms_word) (ulRMSFxn); 354 rms_cmd->fxn = (rms_word) (rms_fxn);
355 rms_cmd->arg1 = (rms_word) (ul_create_fxn); 355 rms_cmd->arg1 = (rms_word) (ul_create_fxn);
356 if (node_get_load_type(hnode) == NLDR_DYNAMICLOAD) { 356 if (node_get_load_type(hnode) == NLDR_DYNAMICLOAD) {
357 /* Flush ICACHE on Load */ 357 /* Flush ICACHE on Load */
@@ -485,7 +485,7 @@ func_end:
485 * 485 *
486 */ 486 */
487int disp_node_delete(struct disp_object *disp_obj, 487int disp_node_delete(struct disp_object *disp_obj,
488 struct node_object *hnode, u32 ulRMSFxn, 488 struct node_object *hnode, u32 rms_fxn,
489 u32 ul_delete_fxn, nodeenv node_env) 489 u32 ul_delete_fxn, nodeenv node_env)
490{ 490{
491 u32 dw_arg; 491 u32 dw_arg;
@@ -507,7 +507,7 @@ int disp_node_delete(struct disp_object *disp_obj,
507 * Fill in buffer to send to RMS 507 * Fill in buffer to send to RMS
508 */ 508 */
509 rms_cmd = (struct rms_command *)disp_obj->pbuf; 509 rms_cmd = (struct rms_command *)disp_obj->pbuf;
510 rms_cmd->fxn = (rms_word) (ulRMSFxn); 510 rms_cmd->fxn = (rms_word) (rms_fxn);
511 rms_cmd->arg1 = (rms_word) node_env; 511 rms_cmd->arg1 = (rms_word) node_env;
512 rms_cmd->arg2 = (rms_word) (ul_delete_fxn); 512 rms_cmd->arg2 = (rms_word) (ul_delete_fxn);
513 rms_cmd->data = node_get_type(hnode); 513 rms_cmd->data = node_get_type(hnode);
@@ -539,7 +539,7 @@ int disp_node_delete(struct disp_object *disp_obj,
539 * that has been suspended (via DISP_NodePause()) on the DSP. 539 * that has been suspended (via DISP_NodePause()) on the DSP.
540 */ 540 */
541int disp_node_run(struct disp_object *disp_obj, 541int disp_node_run(struct disp_object *disp_obj,
542 struct node_object *hnode, u32 ulRMSFxn, 542 struct node_object *hnode, u32 rms_fxn,
543 u32 ul_execute_fxn, nodeenv node_env) 543 u32 ul_execute_fxn, nodeenv node_env)
544{ 544{
545 u32 dw_arg; 545 u32 dw_arg;
@@ -560,7 +560,7 @@ int disp_node_run(struct disp_object *disp_obj,
560 * Fill in buffer to send to RMS. 560 * Fill in buffer to send to RMS.
561 */ 561 */
562 rms_cmd = (struct rms_command *)disp_obj->pbuf; 562 rms_cmd = (struct rms_command *)disp_obj->pbuf;
563 rms_cmd->fxn = (rms_word) (ulRMSFxn); 563 rms_cmd->fxn = (rms_word) (rms_fxn);
564 rms_cmd->arg1 = (rms_word) node_env; 564 rms_cmd->arg1 = (rms_word) node_env;
565 rms_cmd->arg2 = (rms_word) (ul_execute_fxn); 565 rms_cmd->arg2 = (rms_word) (ul_execute_fxn);
566 rms_cmd->data = node_get_type(hnode); 566 rms_cmd->data = node_get_type(hnode);
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index cdae2c88fbe..e788f3178a5 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -242,14 +242,14 @@ static void delete_node(struct node_object *hnode,
242 struct process_context *pr_ctxt); 242 struct process_context *pr_ctxt);
243static void delete_node_mgr(struct node_mgr *hnode_mgr); 243static void delete_node_mgr(struct node_mgr *hnode_mgr);
244static void fill_stream_connect(struct node_object *node1, 244static void fill_stream_connect(struct node_object *node1,
245 struct node_object *node2, u32 uStream1, 245 struct node_object *node2, u32 stream1,
246 u32 uStream2); 246 u32 stream2);
247static void fill_stream_def(struct node_object *hnode, 247static void fill_stream_def(struct node_object *hnode,
248 struct node_strmdef *pstrm_def, 248 struct node_strmdef *pstrm_def,
249 struct dsp_strmattr *pattrs); 249 struct dsp_strmattr *pattrs);
250static void free_stream(struct node_mgr *hnode_mgr, struct stream_chnl stream); 250static void free_stream(struct node_mgr *hnode_mgr, struct stream_chnl stream);
251static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr, 251static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
252 u32 uPhase); 252 u32 phase);
253static int get_node_props(struct dcd_manager *hdcd_mgr, 253static int get_node_props(struct dcd_manager *hdcd_mgr,
254 struct node_object *hnode, 254 struct node_object *hnode,
255 CONST struct dsp_uuid *node_uuid, 255 CONST struct dsp_uuid *node_uuid,
@@ -257,9 +257,9 @@ static int get_node_props(struct dcd_manager *hdcd_mgr,
257static int get_proc_props(struct node_mgr *hnode_mgr, 257static int get_proc_props(struct node_mgr *hnode_mgr,
258 struct dev_object *hdev_obj); 258 struct dev_object *hdev_obj);
259static int get_rms_fxns(struct node_mgr *hnode_mgr); 259static int get_rms_fxns(struct node_mgr *hnode_mgr);
260static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr, 260static u32 ovly(void *priv_ref, u32 dsp_run_addr, u32 dsp_load_addr,
261 u32 ul_num_bytes, u32 mem_space); 261 u32 ul_num_bytes, u32 mem_space);
262static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf, 262static u32 mem_write(void *priv_ref, u32 dsp_add, void *pbuf,
263 u32 ul_num_bytes, u32 mem_space); 263 u32 ul_num_bytes, u32 mem_space);
264 264
265static u32 refs; /* module reference count */ 265static u32 refs; /* module reference count */
@@ -833,9 +833,9 @@ func_end:
833 * Purpose: 833 * Purpose:
834 * Connect two nodes on the DSP, or a node on the DSP to the GPP. 834 * Connect two nodes on the DSP, or a node on the DSP to the GPP.
835 */ 835 */
836int node_connect(struct node_object *node1, u32 uStream1, 836int node_connect(struct node_object *node1, u32 stream1,
837 struct node_object *node2, 837 struct node_object *node2,
838 u32 uStream2, OPTIONAL IN struct dsp_strmattr *pattrs, 838 u32 stream2, OPTIONAL IN struct dsp_strmattr *pattrs,
839 OPTIONAL IN struct dsp_cbdata *conn_param) 839 OPTIONAL IN struct dsp_cbdata *conn_param)
840{ 840{
841 struct node_mgr *hnode_mgr; 841 struct node_mgr *hnode_mgr;
@@ -877,10 +877,10 @@ int node_connect(struct node_object *node1, u32 uStream1,
877 node2_type = node_get_type(node2); 877 node2_type = node_get_type(node2);
878 /* Check stream indices ranges */ 878 /* Check stream indices ranges */
879 if ((node1_type != NODE_GPP && node1_type != NODE_DEVICE && 879 if ((node1_type != NODE_GPP && node1_type != NODE_DEVICE &&
880 uStream1 >= MAX_OUTPUTS(node1)) || (node2_type != NODE_GPP 880 stream1 >= MAX_OUTPUTS(node1)) || (node2_type != NODE_GPP
881 && node2_type != 881 && node2_type !=
882 NODE_DEVICE 882 NODE_DEVICE
883 && uStream2 >= 883 && stream2 >=
884 MAX_INPUTS(node2))) 884 MAX_INPUTS(node2)))
885 status = -EINVAL; 885 status = -EINVAL;
886 } 886 }
@@ -932,7 +932,7 @@ int node_connect(struct node_object *node1, u32 uStream1,
932 if (node1_type == NODE_TASK || node1_type == NODE_DAISSOCKET) { 932 if (node1_type == NODE_TASK || node1_type == NODE_DAISSOCKET) {
933 output = 933 output =
934 &(node1->create_args.asa. 934 &(node1->create_args.asa.
935 task_arg_obj.strm_out_def[uStream1]); 935 task_arg_obj.strm_out_def[stream1]);
936 if (output->sz_device != NULL) 936 if (output->sz_device != NULL)
937 status = -EISCONN; 937 status = -EISCONN;
938 938
@@ -940,7 +940,7 @@ int node_connect(struct node_object *node1, u32 uStream1,
940 if (node2_type == NODE_TASK || node2_type == NODE_DAISSOCKET) { 940 if (node2_type == NODE_TASK || node2_type == NODE_DAISSOCKET) {
941 input = 941 input =
942 &(node2->create_args.asa. 942 &(node2->create_args.asa.
943 task_arg_obj.strm_in_def[uStream2]); 943 task_arg_obj.strm_in_def[stream2]);
944 if (input->sz_device != NULL) 944 if (input->sz_device != NULL)
945 status = -EISCONN; 945 status = -EISCONN;
946 946
@@ -956,10 +956,10 @@ int node_connect(struct node_object *node1, u32 uStream1,
956 if (pipe_id == GB_NOBITS) { 956 if (pipe_id == GB_NOBITS) {
957 status = -ECONNREFUSED; 957 status = -ECONNREFUSED;
958 } else { 958 } else {
959 node1->outputs[uStream1].type = NODECONNECT; 959 node1->outputs[stream1].type = NODECONNECT;
960 node2->inputs[uStream2].type = NODECONNECT; 960 node2->inputs[stream2].type = NODECONNECT;
961 node1->outputs[uStream1].dev_id = pipe_id; 961 node1->outputs[stream1].dev_id = pipe_id;
962 node2->inputs[uStream2].dev_id = pipe_id; 962 node2->inputs[stream2].dev_id = pipe_id;
963 output->sz_device = kzalloc(PIPENAMELEN + 1, 963 output->sz_device = kzalloc(PIPENAMELEN + 1,
964 GFP_KERNEL); 964 GFP_KERNEL);
965 input->sz_device = kzalloc(PIPENAMELEN + 1, GFP_KERNEL); 965 input->sz_device = kzalloc(PIPENAMELEN + 1, GFP_KERNEL);
@@ -1051,12 +1051,12 @@ int node_connect(struct node_object *node1, u32 uStream1,
1051func_cont2: 1051func_cont2:
1052 if (DSP_SUCCEEDED(status)) { 1052 if (DSP_SUCCEEDED(status)) {
1053 if (node1 == (struct node_object *)DSP_HGPPNODE) { 1053 if (node1 == (struct node_object *)DSP_HGPPNODE) {
1054 node2->inputs[uStream2].type = HOSTCONNECT; 1054 node2->inputs[stream2].type = HOSTCONNECT;
1055 node2->inputs[uStream2].dev_id = chnl_id; 1055 node2->inputs[stream2].dev_id = chnl_id;
1056 input->sz_device = pstr_dev_name; 1056 input->sz_device = pstr_dev_name;
1057 } else { 1057 } else {
1058 node1->outputs[uStream1].type = HOSTCONNECT; 1058 node1->outputs[stream1].type = HOSTCONNECT;
1059 node1->outputs[uStream1].dev_id = chnl_id; 1059 node1->outputs[stream1].dev_id = chnl_id;
1060 output->sz_device = pstr_dev_name; 1060 output->sz_device = pstr_dev_name;
1061 } 1061 }
1062 sprintf(pstr_dev_name, "%s%d", HOSTPREFIX, chnl_id); 1062 sprintf(pstr_dev_name, "%s%d", HOSTPREFIX, chnl_id);
@@ -1069,13 +1069,13 @@ func_cont2:
1069 /* node1 == > device */ 1069 /* node1 == > device */
1070 dev_node_obj = node2; 1070 dev_node_obj = node2;
1071 hnode = node1; 1071 hnode = node1;
1072 pstream = &(node1->outputs[uStream1]); 1072 pstream = &(node1->outputs[stream1]);
1073 pstrm_def = output; 1073 pstrm_def = output;
1074 } else { 1074 } else {
1075 /* device == > node2 */ 1075 /* device == > node2 */
1076 dev_node_obj = node1; 1076 dev_node_obj = node1;
1077 hnode = node2; 1077 hnode = node2;
1078 pstream = &(node2->inputs[uStream2]); 1078 pstream = &(node2->inputs[stream2]);
1079 pstrm_def = input; 1079 pstrm_def = input;
1080 } 1080 }
1081 /* Set up create args */ 1081 /* Set up create args */
@@ -1116,25 +1116,25 @@ func_cont2:
1116 /* Update node1 and node2 stream_connect */ 1116 /* Update node1 and node2 stream_connect */
1117 if (node1_type != NODE_GPP && node1_type != NODE_DEVICE) { 1117 if (node1_type != NODE_GPP && node1_type != NODE_DEVICE) {
1118 node1->num_outputs++; 1118 node1->num_outputs++;
1119 if (uStream1 > node1->max_output_index) 1119 if (stream1 > node1->max_output_index)
1120 node1->max_output_index = uStream1; 1120 node1->max_output_index = stream1;
1121 1121
1122 } 1122 }
1123 if (node2_type != NODE_GPP && node2_type != NODE_DEVICE) { 1123 if (node2_type != NODE_GPP && node2_type != NODE_DEVICE) {
1124 node2->num_inputs++; 1124 node2->num_inputs++;
1125 if (uStream2 > node2->max_input_index) 1125 if (stream2 > node2->max_input_index)
1126 node2->max_input_index = uStream2; 1126 node2->max_input_index = stream2;
1127 1127
1128 } 1128 }
1129 fill_stream_connect(node1, node2, uStream1, uStream2); 1129 fill_stream_connect(node1, node2, stream1, stream2);
1130 } 1130 }
1131 /* end of sync_enter_cs */ 1131 /* end of sync_enter_cs */
1132 /* Exit critical section */ 1132 /* Exit critical section */
1133 mutex_unlock(&hnode_mgr->node_mgr_lock); 1133 mutex_unlock(&hnode_mgr->node_mgr_lock);
1134func_end: 1134func_end:
1135 dev_dbg(bridge, "%s: node1: %p uStream1: %d node2: %p uStream2: %d" 1135 dev_dbg(bridge, "%s: node1: %p stream1: %d node2: %p stream2: %d"
1136 "pattrs: %p status: 0x%x\n", __func__, node1, 1136 "pattrs: %p status: 0x%x\n", __func__, node1,
1137 uStream1, node2, uStream2, pattrs, status); 1137 stream1, node2, stream2, pattrs, status);
1138 return status; 1138 return status;
1139} 1139}
1140 1140
@@ -2701,7 +2701,7 @@ static void delete_node_mgr(struct node_mgr *hnode_mgr)
2701 */ 2701 */
2702static void fill_stream_connect(struct node_object *node1, 2702static void fill_stream_connect(struct node_object *node1,
2703 struct node_object *node2, 2703 struct node_object *node2,
2704 u32 uStream1, u32 uStream2) 2704 u32 stream1, u32 stream2)
2705{ 2705{
2706 u32 strm_index; 2706 u32 strm_index;
2707 struct dsp_streamconnect *strm1 = NULL; 2707 struct dsp_streamconnect *strm1 = NULL;
@@ -2718,7 +2718,7 @@ static void fill_stream_connect(struct node_object *node1,
2718 node1->num_outputs - 1; 2718 node1->num_outputs - 1;
2719 strm1 = &(node1->stream_connect[strm_index]); 2719 strm1 = &(node1->stream_connect[strm_index]);
2720 strm1->cb_struct = sizeof(struct dsp_streamconnect); 2720 strm1->cb_struct = sizeof(struct dsp_streamconnect);
2721 strm1->this_node_stream_index = uStream1; 2721 strm1->this_node_stream_index = stream1;
2722 } 2722 }
2723 2723
2724 if (node2 != (struct node_object *)DSP_HGPPNODE) { 2724 if (node2 != (struct node_object *)DSP_HGPPNODE) {
@@ -2726,7 +2726,7 @@ static void fill_stream_connect(struct node_object *node1,
2726 if (node1_type != NODE_DEVICE) { 2726 if (node1_type != NODE_DEVICE) {
2727 strm1->connected_node = node2; 2727 strm1->connected_node = node2;
2728 strm1->ui_connected_node_id = node2->node_uuid; 2728 strm1->ui_connected_node_id = node2->node_uuid;
2729 strm1->connected_node_stream_index = uStream2; 2729 strm1->connected_node_stream_index = stream2;
2730 strm1->connect_type = CONNECTTYPE_NODEOUTPUT; 2730 strm1->connect_type = CONNECTTYPE_NODEOUTPUT;
2731 } 2731 }
2732 if (node2_type != NODE_DEVICE) { 2732 if (node2_type != NODE_DEVICE) {
@@ -2735,10 +2735,10 @@ static void fill_stream_connect(struct node_object *node1,
2735 strm2 = &(node2->stream_connect[strm_index]); 2735 strm2 = &(node2->stream_connect[strm_index]);
2736 strm2->cb_struct = 2736 strm2->cb_struct =
2737 sizeof(struct dsp_streamconnect); 2737 sizeof(struct dsp_streamconnect);
2738 strm2->this_node_stream_index = uStream2; 2738 strm2->this_node_stream_index = stream2;
2739 strm2->connected_node = node1; 2739 strm2->connected_node = node1;
2740 strm2->ui_connected_node_id = node1->node_uuid; 2740 strm2->ui_connected_node_id = node1->node_uuid;
2741 strm2->connected_node_stream_index = uStream1; 2741 strm2->connected_node_stream_index = stream1;
2742 strm2->connect_type = CONNECTTYPE_NODEINPUT; 2742 strm2->connect_type = CONNECTTYPE_NODEINPUT;
2743 } 2743 }
2744 } else if (node1_type != NODE_DEVICE) 2744 } else if (node1_type != NODE_DEVICE)
@@ -2749,7 +2749,7 @@ static void fill_stream_connect(struct node_object *node1,
2749 strm_index = node2->num_inputs + node2->num_outputs - 1; 2749 strm_index = node2->num_inputs + node2->num_outputs - 1;
2750 strm2 = &(node2->stream_connect[strm_index]); 2750 strm2 = &(node2->stream_connect[strm_index]);
2751 strm2->cb_struct = sizeof(struct dsp_streamconnect); 2751 strm2->cb_struct = sizeof(struct dsp_streamconnect);
2752 strm2->this_node_stream_index = uStream2; 2752 strm2->this_node_stream_index = stream2;
2753 strm2->connect_type = CONNECTTYPE_GPPINPUT; 2753 strm2->connect_type = CONNECTTYPE_GPPINPUT;
2754 } 2754 }
2755} 2755}
@@ -2820,7 +2820,7 @@ static void free_stream(struct node_mgr *hnode_mgr, struct stream_chnl stream)
2820 * Retrieves the address for create, execute or delete phase for a node. 2820 * Retrieves the address for create, execute or delete phase for a node.
2821 */ 2821 */
2822static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr, 2822static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
2823 u32 uPhase) 2823 u32 phase)
2824{ 2824{
2825 char *pstr_fxn_name = NULL; 2825 char *pstr_fxn_name = NULL;
2826 struct node_mgr *hnode_mgr = hnode->hnode_mgr; 2826 struct node_mgr *hnode_mgr = hnode->hnode_mgr;
@@ -2829,7 +2829,7 @@ static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
2829 node_get_type(hnode) == NODE_DAISSOCKET || 2829 node_get_type(hnode) == NODE_DAISSOCKET ||
2830 node_get_type(hnode) == NODE_MESSAGE); 2830 node_get_type(hnode) == NODE_MESSAGE);
2831 2831
2832 switch (uPhase) { 2832 switch (phase) {
2833 case CREATEPHASE: 2833 case CREATEPHASE:
2834 pstr_fxn_name = 2834 pstr_fxn_name =
2835 hnode->dcd_props.obj_data.node_obj.pstr_create_phase_fxn; 2835 hnode->dcd_props.obj_data.node_obj.pstr_create_phase_fxn;
@@ -3127,7 +3127,7 @@ static int get_rms_fxns(struct node_mgr *hnode_mgr)
3127 * Purpose: 3127 * Purpose:
3128 * Called during overlay.Sends command to RMS to copy a block of data. 3128 * Called during overlay.Sends command to RMS to copy a block of data.
3129 */ 3129 */
3130static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr, 3130static u32 ovly(void *priv_ref, u32 dsp_run_addr, u32 dsp_load_addr,
3131 u32 ul_num_bytes, u32 mem_space) 3131 u32 ul_num_bytes, u32 mem_space)
3132{ 3132{
3133 struct node_object *hnode = (struct node_object *)priv_ref; 3133 struct node_object *hnode = (struct node_object *)priv_ref;
@@ -3153,7 +3153,7 @@ static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
3153 if (DSP_SUCCEEDED(status)) { 3153 if (DSP_SUCCEEDED(status)) {
3154 status = 3154 status =
3155 (*intf_fxns->pfn_brd_mem_copy) (hbridge_context, 3155 (*intf_fxns->pfn_brd_mem_copy) (hbridge_context,
3156 ulDspRunAddr, ulDspLoadAddr, 3156 dsp_run_addr, dsp_load_addr,
3157 ul_num_bytes, (u32) mem_space); 3157 ul_num_bytes, (u32) mem_space);
3158 if (DSP_SUCCEEDED(status)) 3158 if (DSP_SUCCEEDED(status))
3159 ul_bytes = ul_num_bytes; 3159 ul_bytes = ul_num_bytes;
@@ -3171,7 +3171,7 @@ static u32 ovly(void *priv_ref, u32 ulDspRunAddr, u32 ulDspLoadAddr,
3171/* 3171/*
3172 * ======== mem_write ======== 3172 * ======== mem_write ========
3173 */ 3173 */
3174static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf, 3174static u32 mem_write(void *priv_ref, u32 dsp_add, void *pbuf,
3175 u32 ul_num_bytes, u32 mem_space) 3175 u32 ul_num_bytes, u32 mem_space)
3176{ 3176{
3177 struct node_object *hnode = (struct node_object *)priv_ref; 3177 struct node_object *hnode = (struct node_object *)priv_ref;
@@ -3195,7 +3195,7 @@ static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf,
3195 intf_fxns = hnode_mgr->intf_fxns; 3195 intf_fxns = hnode_mgr->intf_fxns;
3196 status = dev_get_bridge_context(hnode_mgr->hdev_obj, &hbridge_context); 3196 status = dev_get_bridge_context(hnode_mgr->hdev_obj, &hbridge_context);
3197 status = (*intf_fxns->pfn_brd_mem_write) (hbridge_context, pbuf, 3197 status = (*intf_fxns->pfn_brd_mem_write) (hbridge_context, pbuf,
3198 ulDspAddr, ul_num_bytes, mem_sect_type); 3198 dsp_add, ul_num_bytes, mem_sect_type);
3199 3199
3200 return ul_num_bytes; 3200 return ul_num_bytes;
3201} 3201}