aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorRene Sapiens <rene.sapiens@ti.com>2010-07-09 22:24:09 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-22 13:45:37 -0400
commitc8c1ad8ce317c1e213db47f094d6eee8dec7d280 (patch)
tree823b8d5384e1d5297af53f568f6a588cecd040a6 /drivers/staging
parent5a09ddeae940ceea68a8b2dada71bc0cc609c894 (diff)
staging: ti dspbridge: make variables in prototypes match within functions definitions
This patch renames the variables in the parameter lists and in the function definitions to make them match. Signed-off-by: Rene Sapiens <rene.sapiens@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/tidspbridge/core/chnl_sm.c2
-rw-r--r--drivers/staging/tidspbridge/core/io_sm.c20
-rw-r--r--drivers/staging/tidspbridge/core/tiomap3430.c18
-rw-r--r--drivers/staging/tidspbridge/core/tiomap_io.c8
-rw-r--r--drivers/staging/tidspbridge/core/tiomap_io.h2
-rw-r--r--drivers/staging/tidspbridge/dynload/reloc.c4
-rw-r--r--drivers/staging/tidspbridge/hw/hw_mmu.h2
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/cmm.h2
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/cod.h2
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/dbll.h10
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/disp.h8
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/drv.h12
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/dspmsg.h2
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/io_sm.h4
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/mgr.h2
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/proc.h4
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h29
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/rmm.h4
-rw-r--r--drivers/staging/tidspbridge/pmgr/cmm.c12
-rw-r--r--drivers/staging/tidspbridge/pmgr/cod.c63
-rw-r--r--drivers/staging/tidspbridge/pmgr/dbll.c33
-rw-r--r--drivers/staging/tidspbridge/pmgr/dmm.c4
-rw-r--r--drivers/staging/tidspbridge/rmgr/drv.c20
-rw-r--r--drivers/staging/tidspbridge/rmgr/drv_interface.h7
-rw-r--r--drivers/staging/tidspbridge/rmgr/dspdrv.c6
-rw-r--r--drivers/staging/tidspbridge/rmgr/nldr.c44
-rw-r--r--drivers/staging/tidspbridge/rmgr/node.c18
-rw-r--r--drivers/staging/tidspbridge/rmgr/proc.c20
-rw-r--r--drivers/staging/tidspbridge/rmgr/rmm.c11
-rw-r--r--drivers/staging/tidspbridge/services/cfg.c6
30 files changed, 195 insertions, 184 deletions
diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index ac393b894cf..813ea35eddc 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -75,7 +75,7 @@
75/* ----------------------------------- Function Prototypes */ 75/* ----------------------------------- Function Prototypes */
76static struct lst_list *create_chirp_list(u32 chirps); 76static struct lst_list *create_chirp_list(u32 chirps);
77 77
78static void free_chirp_list(struct lst_list *lst); 78static void free_chirp_list(struct lst_list *chirp_list);
79 79
80static struct chnl_irp *make_new_chirp(void); 80static struct chnl_irp *make_new_chirp(void);
81 81
diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 0292881ddd3..74835c5cb3a 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -1013,7 +1013,7 @@ void io_mbox_msg(u32 msg)
1013 * Request chanenel I/O from the DSP. Sets flags in shared memory, then 1013 * Request chanenel I/O from the DSP. Sets flags in shared memory, then
1014 * interrupts the DSP. 1014 * interrupts the DSP.
1015 */ 1015 */
1016void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl, 1016void io_request_chnl(struct io_mgr *io_manager, struct chnl_object *pchnl,
1017 u8 io_mode, OUT u16 *mbx_val) 1017 u8 io_mode, OUT u16 *mbx_val)
1018{ 1018{
1019 struct chnl_mgr *chnl_mgr_obj; 1019 struct chnl_mgr *chnl_mgr_obj;
@@ -1021,8 +1021,8 @@ void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
1021 1021
1022 if (!pchnl || !mbx_val) 1022 if (!pchnl || !mbx_val)
1023 goto func_end; 1023 goto func_end;
1024 chnl_mgr_obj = pio_mgr->hchnl_mgr; 1024 chnl_mgr_obj = io_manager->hchnl_mgr;
1025 sm = pio_mgr->shared_mem; 1025 sm = io_manager->shared_mem;
1026 if (io_mode == IO_INPUT) { 1026 if (io_mode == IO_INPUT) {
1027 /* 1027 /*
1028 * Assertion fires if CHNL_AddIOReq() called on a stream 1028 * Assertion fires if CHNL_AddIOReq() called on a stream
@@ -1031,7 +1031,7 @@ void io_request_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,
1031 DBC_ASSERT((pchnl->dw_state == CHNL_STATEREADY) || 1031 DBC_ASSERT((pchnl->dw_state == CHNL_STATEREADY) ||
1032 (pchnl->dw_state == CHNL_STATEEOS)); 1032 (pchnl->dw_state == CHNL_STATEEOS));
1033 /* Indicate to the DSP we have a buffer available for input */ 1033 /* Indicate to the DSP we have a buffer available for input */
1034 IO_OR_VALUE(pio_mgr->hbridge_context, struct shm, sm, 1034 IO_OR_VALUE(io_manager->hbridge_context, struct shm, sm,
1035 host_free_mask, (1 << pchnl->chnl_id)); 1035 host_free_mask, (1 << pchnl->chnl_id));
1036 *mbx_val = MBX_PCPY_CLASS; 1036 *mbx_val = MBX_PCPY_CLASS;
1037 } else if (io_mode == IO_OUTPUT) { 1037 } else if (io_mode == IO_OUTPUT) {
@@ -1057,20 +1057,20 @@ func_end:
1057 * ======== iosm_schedule ======== 1057 * ======== iosm_schedule ========
1058 * Schedule DPC for IO. 1058 * Schedule DPC for IO.
1059 */ 1059 */
1060void iosm_schedule(struct io_mgr *pio_mgr) 1060void iosm_schedule(struct io_mgr *io_manager)
1061{ 1061{
1062 unsigned long flags; 1062 unsigned long flags;
1063 1063
1064 if (!pio_mgr) 1064 if (!io_manager)
1065 return; 1065 return;
1066 1066
1067 /* Increment count of DPC's pending. */ 1067 /* Increment count of DPC's pending. */
1068 spin_lock_irqsave(&pio_mgr->dpc_lock, flags); 1068 spin_lock_irqsave(&io_manager->dpc_lock, flags);
1069 pio_mgr->dpc_req++; 1069 io_manager->dpc_req++;
1070 spin_unlock_irqrestore(&pio_mgr->dpc_lock, flags); 1070 spin_unlock_irqrestore(&io_manager->dpc_lock, flags);
1071 1071
1072 /* Schedule DPC */ 1072 /* Schedule DPC */
1073 tasklet_schedule(&pio_mgr->dpc_tasklet); 1073 tasklet_schedule(&io_manager->dpc_tasklet);
1074} 1074}
1075 1075
1076/* 1076/*
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 8e3d92a38eb..cf65af4099e 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -74,17 +74,17 @@
74#define PHYS_TO_PAGE(phys) pfn_to_page((phys) >> PAGE_SHIFT) 74#define PHYS_TO_PAGE(phys) pfn_to_page((phys) >> PAGE_SHIFT)
75 75
76/* Forward Declarations: */ 76/* Forward Declarations: */
77static int bridge_brd_monitor(struct bridge_dev_context *dev_context); 77static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt);
78static int bridge_brd_read(struct bridge_dev_context *dev_context, 78static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
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 mem_type); 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_ctxt,
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_ctxt,
85 int *board_state); 85 int *board_state);
86static int bridge_brd_stop(struct bridge_dev_context *dev_context); 86static int bridge_brd_stop(struct bridge_dev_context *dev_ctxt);
87static int bridge_brd_write(struct bridge_dev_context *dev_context, 87static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
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 mem_type); 90 u32 mem_type);
@@ -93,7 +93,7 @@ static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
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 dsp_dest_addr, u32 dsp_src_addr, 94 u32 dsp_dest_addr, u32 dsp_src_addr,
95 u32 ul_num_bytes, u32 mem_type); 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_ctxt,
97 IN u8 *host_buff, u32 dsp_addr, 97 IN u8 *host_buff, u32 dsp_addr,
98 u32 ul_num_bytes, u32 mem_type); 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,
@@ -108,14 +108,14 @@ static int bridge_dev_create(OUT struct bridge_dev_context
108 IN struct cfg_hostres *config_param); 108 IN struct cfg_hostres *config_param);
109static int bridge_dev_ctrl(struct bridge_dev_context *dev_context, 109static int bridge_dev_ctrl(struct bridge_dev_context *dev_context,
110 u32 dw_cmd, IN OUT void *pargs); 110 u32 dw_cmd, IN OUT void *pargs);
111static int bridge_dev_destroy(struct bridge_dev_context *dev_context); 111static int bridge_dev_destroy(struct bridge_dev_context *dev_ctxt);
112static u32 user_va2_pa(struct mm_struct *mm, u32 address); 112static u32 user_va2_pa(struct mm_struct *mm, u32 address);
113static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa, 113static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa,
114 u32 va, u32 size, 114 u32 va, u32 size,
115 struct hw_mmu_map_attrs_t *map_attrs); 115 struct hw_mmu_map_attrs_t *map_attrs);
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_context,
119 u32 ul_mpu_addr, u32 virt_addr, 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);
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index a3fcb029b91..3f6d084ca50 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -178,13 +178,13 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
178 * purpose: 178 * purpose:
179 * Copies buffers to the DSP internal/external memory. 179 * Copies buffers to the DSP internal/external memory.
180 */ 180 */
181int write_dsp_data(struct bridge_dev_context *dev_ctxt, 181int write_dsp_data(struct bridge_dev_context *dev_context,
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 mem_type) 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_context->dw_dsp_base_addr;
187 struct cfg_hostres *resources = dev_ctxt->resources; 187 struct cfg_hostres *resources = dev_context->resources;
188 int status = 0; 188 int status = 0;
189 u32 base1, base2, base3; 189 u32 base1, base2, base3;
190 base1 = OMAP_DSP_MEM1_SIZE; 190 base1 = OMAP_DSP_MEM1_SIZE;
@@ -194,7 +194,7 @@ int write_dsp_data(struct bridge_dev_context *dev_ctxt,
194 if (!resources) 194 if (!resources)
195 return -EPERM; 195 return -EPERM;
196 196
197 offset = dsp_addr - dev_ctxt->dw_dsp_start_add; 197 offset = dsp_addr - dev_context->dw_dsp_start_add;
198 if (offset < base1) { 198 if (offset < base1) {
199 dw_base_addr = MEM_LINEAR_ADDRESS(resources->dw_mem_base[2], 199 dw_base_addr = MEM_LINEAR_ADDRESS(resources->dw_mem_base[2],
200 resources->dw_mem_length[2]); 200 resources->dw_mem_length[2]);
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.h b/drivers/staging/tidspbridge/core/tiomap_io.h
index 8f9d0720216..5a26ea04e8c 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.h
+++ b/drivers/staging/tidspbridge/core/tiomap_io.h
@@ -47,7 +47,7 @@
47 * Reads it from DSP External memory. The external memory for the DSP 47 * Reads it from DSP External memory. The external memory for the DSP
48 * is configured by the combination of DSP MMU and shm Memory manager in the CDB 48 * is configured by the combination of DSP MMU and shm Memory manager in the CDB
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_ctxt,
51 OUT u8 *host_buff, u32 dsp_addr, 51 OUT u8 *host_buff, u32 dsp_addr,
52 u32 ul_num_bytes, u32 mem_type); 52 u32 ul_num_bytes, u32 mem_type);
53 53
diff --git a/drivers/staging/tidspbridge/dynload/reloc.c b/drivers/staging/tidspbridge/dynload/reloc.c
index 316a38c2a1f..ec59777dc06 100644
--- a/drivers/staging/tidspbridge/dynload/reloc.c
+++ b/drivers/staging/tidspbridge/dynload/reloc.c
@@ -162,7 +162,7 @@ static const u8 c60_scale[SCALE_MASK + 1] = {
162 * Performs the specified relocation operation 162 * Performs the specified relocation operation
163 ************************************************************************* */ 163 ************************************************************************* */
164void dload_relocate(struct dload_state *dlthis, tgt_au_t * data, 164void dload_relocate(struct dload_state *dlthis, tgt_au_t * data,
165 struct reloc_record_t *rp, bool * tramps_genereted, 165 struct reloc_record_t *rp, bool *tramps_generated,
166 bool second_pass) 166 bool second_pass)
167{ 167{
168 rvalue val, reloc_amt, orig_val = 0; 168 rvalue val, reloc_amt, orig_val = 0;
@@ -470,7 +470,7 @@ void dload_relocate(struct dload_state *dlthis, tgt_au_t * data,
470 dlthis->image_offset + 470 dlthis->image_offset +
471 rp->vaddr); 471 rp->vaddr);
472 } else 472 } else
473 *tramps_genereted = true; 473 *tramps_generated = true;
474 } else { 474 } else {
475 dload_error(dlthis, "Relocation value " 475 dload_error(dlthis, "Relocation value "
476 FMT_UI32 " overflows %d bits in %s" 476 FMT_UI32 " overflows %d bits in %s"
diff --git a/drivers/staging/tidspbridge/hw/hw_mmu.h b/drivers/staging/tidspbridge/hw/hw_mmu.h
index 6ba133e6a21..1458a2c6027 100644
--- a/drivers/staging/tidspbridge/hw/hw_mmu.h
+++ b/drivers/staging/tidspbridge/hw/hw_mmu.h
@@ -95,7 +95,7 @@ extern hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
95 struct hw_mmu_map_attrs_t *map_attrs); 95 struct hw_mmu_map_attrs_t *map_attrs);
96 96
97extern hw_status hw_mmu_pte_clear(const u32 pg_tbl_va, 97extern hw_status hw_mmu_pte_clear(const u32 pg_tbl_va,
98 u32 page_size, u32 virtual_addr); 98 u32 virtual_addr, u32 page_size);
99 99
100void hw_mmu_tlb_flush_all(const void __iomem *base); 100void hw_mmu_tlb_flush_all(const void __iomem *base);
101 101
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index 086ca2568ed..24423cd62c0 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -232,7 +232,7 @@ extern int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
232 s8 c_factor, 232 s8 c_factor,
233 unsigned int dw_dsp_base, 233 unsigned int dw_dsp_base,
234 u32 ul_dsp_size, 234 u32 ul_dsp_size,
235 u32 *sgmt_id, u32 gpp_base_ba); 235 u32 *sgmt_id, u32 gpp_base_va);
236 236
237/* 237/*
238 * ======== cmm_un_register_gppsm_seg ======== 238 * ======== cmm_un_register_gppsm_seg ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cod.h b/drivers/staging/tidspbridge/include/dspbridge/cod.h
index 382764618c2..abf3b38dd39 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cod.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cod.h
@@ -91,7 +91,7 @@ extern void cod_close(struct cod_libraryobj *lib);
91 * str_zl_file != NULL 91 * str_zl_file != NULL
92 * Ensures: 92 * Ensures:
93 */ 93 */
94extern int cod_create(OUT struct cod_manager **manager, 94extern int cod_create(OUT struct cod_manager **mgr,
95 char *str_zl_file, 95 char *str_zl_file,
96 IN OPTIONAL CONST struct cod_attrs *attrs); 96 IN OPTIONAL CONST struct cod_attrs *attrs);
97 97
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbll.h b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
index a19711585c6..b0186761466 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbll.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
@@ -25,16 +25,16 @@
25 25
26extern bool symbols_reloaded; 26extern bool symbols_reloaded;
27 27
28extern void dbll_close(struct dbll_library_obj *lib); 28extern void dbll_close(struct dbll_library_obj *zl_lib);
29extern int dbll_create(struct dbll_tar_obj **target_obj, 29extern int dbll_create(struct dbll_tar_obj **target_obj,
30 struct dbll_attrs *pattrs); 30 struct dbll_attrs *pattrs);
31extern void dbll_delete(struct dbll_tar_obj *target); 31extern void dbll_delete(struct dbll_tar_obj *target);
32extern void dbll_exit(void); 32extern void dbll_exit(void);
33extern bool dbll_get_addr(struct dbll_library_obj *lib, char *name, 33extern bool dbll_get_addr(struct dbll_library_obj *zl_lib, char *name,
34 struct dbll_sym_val **sym_val); 34 struct dbll_sym_val **sym_val);
35extern void dbll_get_attrs(struct dbll_tar_obj *target, 35extern void dbll_get_attrs(struct dbll_tar_obj *target,
36 struct dbll_attrs *pattrs); 36 struct dbll_attrs *pattrs);
37extern bool dbll_get_c_addr(struct dbll_library_obj *lib, char *name, 37extern bool dbll_get_c_addr(struct dbll_library_obj *zl_lib, char *name,
38 struct dbll_sym_val **sym_val); 38 struct dbll_sym_val **sym_val);
39extern int dbll_get_sect(struct dbll_library_obj *lib, char *name, 39extern int dbll_get_sect(struct dbll_library_obj *lib, char *name,
40 u32 *paddr, u32 *psize); 40 u32 *paddr, u32 *psize);
@@ -42,13 +42,13 @@ extern bool dbll_init(void);
42extern int dbll_load(struct dbll_library_obj *lib, 42extern int dbll_load(struct dbll_library_obj *lib,
43 dbll_flags flags, 43 dbll_flags flags,
44 struct dbll_attrs *attrs, u32 * entry); 44 struct dbll_attrs *attrs, u32 * entry);
45extern int dbll_load_sect(struct dbll_library_obj *lib, 45extern int dbll_load_sect(struct dbll_library_obj *zl_lib,
46 char *sec_name, struct dbll_attrs *attrs); 46 char *sec_name, struct dbll_attrs *attrs);
47extern int dbll_open(struct dbll_tar_obj *target, char *file, 47extern int dbll_open(struct dbll_tar_obj *target, char *file,
48 dbll_flags flags, 48 dbll_flags flags,
49 struct dbll_library_obj **lib_obj); 49 struct dbll_library_obj **lib_obj);
50extern int dbll_read_sect(struct dbll_library_obj *lib, 50extern int dbll_read_sect(struct dbll_library_obj *lib,
51 char *name, char *pbuf, u32 size); 51 char *name, char *buf, u32 size);
52extern void dbll_set_attrs(struct dbll_tar_obj *target, 52extern void dbll_set_attrs(struct dbll_tar_obj *target,
53 struct dbll_attrs *pattrs); 53 struct dbll_attrs *pattrs);
54extern void dbll_unload(struct dbll_library_obj *lib, struct dbll_attrs *attrs); 54extern void dbll_unload(struct dbll_library_obj *lib, struct dbll_attrs *attrs);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/disp.h b/drivers/staging/tidspbridge/include/dspbridge/disp.h
index 9f694a4b7c9..77fc92e8323 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/disp.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/disp.h
@@ -115,7 +115,7 @@ extern bool disp_init(void);
115extern int disp_node_change_priority(struct disp_object 115extern int disp_node_change_priority(struct disp_object
116 *disp_obj, 116 *disp_obj,
117 struct node_object *hnode, 117 struct node_object *hnode,
118 u32 ul_fxn_addr, 118 u32 rms_fxn,
119 nodeenv node_env, s32 prio); 119 nodeenv node_env, s32 prio);
120 120
121/* 121/*
@@ -145,7 +145,7 @@ extern int disp_node_change_priority(struct disp_object
145 */ 145 */
146extern int disp_node_create(struct disp_object *disp_obj, 146extern int disp_node_create(struct disp_object *disp_obj,
147 struct node_object *hnode, 147 struct node_object *hnode,
148 u32 ul_fxn_addr, 148 u32 rms_fxn,
149 u32 ul_create_fxn, 149 u32 ul_create_fxn,
150 IN CONST struct node_createargs 150 IN CONST struct node_createargs
151 *pargs, OUT nodeenv *node_env); 151 *pargs, OUT nodeenv *node_env);
@@ -172,7 +172,7 @@ extern int disp_node_create(struct disp_object *disp_obj,
172 */ 172 */
173extern int disp_node_delete(struct disp_object *disp_obj, 173extern int disp_node_delete(struct disp_object *disp_obj,
174 struct node_object *hnode, 174 struct node_object *hnode,
175 u32 ul_fxn_addr, 175 u32 rms_fxn,
176 u32 ul_delete_fxn, nodeenv node_env); 176 u32 ul_delete_fxn, nodeenv node_env);
177 177
178/* 178/*
@@ -198,7 +198,7 @@ extern int disp_node_delete(struct disp_object *disp_obj,
198 */ 198 */
199extern int disp_node_run(struct disp_object *disp_obj, 199extern int disp_node_run(struct disp_object *disp_obj,
200 struct node_object *hnode, 200 struct node_object *hnode,
201 u32 ul_fxn_addr, 201 u32 rms_fxn,
202 u32 ul_execute_fxn, nodeenv node_env); 202 u32 ul_execute_fxn, nodeenv node_env);
203 203
204#endif /* DISP_ */ 204#endif /* DISP_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index c180a7ceacf..5827ea17e78 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -213,7 +213,7 @@ extern int drv_create(struct drv_object **drv_obj);
213 * and destroy the DRV object 213 * and destroy the DRV object
214 * Called upon driver unLoading.or unsuccesful loading of the driver. 214 * Called upon driver unLoading.or unsuccesful loading of the driver.
215 * Parameters: 215 * Parameters:
216 * hdrv_obj: Handle to Driver object . 216 * driver_obj: Handle to Driver object .
217 * Returns: 217 * Returns:
218 * 0: Success. 218 * 0: Success.
219 * -EPERM: Failed to destroy DRV Object 219 * -EPERM: Failed to destroy DRV Object
@@ -227,7 +227,7 @@ extern int drv_create(struct drv_object **drv_obj);
227 * DRV handle. 227 * DRV handle.
228 * - Registry is updated with "0" as the DRV Object. 228 * - Registry is updated with "0" as the DRV Object.
229 */ 229 */
230extern int drv_destroy(struct drv_object *hdrv_obj); 230extern int drv_destroy(struct drv_object *driver_obj);
231 231
232/* 232/*
233 * ======== drv_exit ======== 233 * ======== drv_exit ========
@@ -341,7 +341,7 @@ extern int drv_init(void);
341 * Purpose: 341 * Purpose:
342 * Insert a DeviceObject into the list of Driver object. 342 * Insert a DeviceObject into the list of Driver object.
343 * Parameters: 343 * Parameters:
344 * hdrv_obj: Handle to DrvObject 344 * driver_obj: Handle to DrvObject
345 * hdev_obj: Handle to DeviceObject to insert. 345 * hdev_obj: Handle to DeviceObject to insert.
346 * Returns: 346 * Returns:
347 * 0: If successful. 347 * 0: If successful.
@@ -352,7 +352,7 @@ extern int drv_init(void);
352 * Ensures: 352 * Ensures:
353 * 0: Device Object is inserted and the List is not empty. 353 * 0: Device Object is inserted and the List is not empty.
354 */ 354 */
355extern int drv_insert_dev_object(struct drv_object *hdrv_obj, 355extern int drv_insert_dev_object(struct drv_object *driver_obj,
356 struct dev_object *hdev_obj); 356 struct dev_object *hdev_obj);
357 357
358/* 358/*
@@ -361,7 +361,7 @@ extern int drv_insert_dev_object(struct drv_object *hdrv_obj,
361 * Search for and remove a Device object from the given list of Device Obj 361 * Search for and remove a Device object from the given list of Device Obj
362 * objects. 362 * objects.
363 * Parameters: 363 * Parameters:
364 * hdrv_obj: Handle to DrvObject 364 * driver_obj: Handle to DrvObject
365 * hdev_obj: Handle to DevObject to Remove 365 * hdev_obj: Handle to DevObject to Remove
366 * Returns: 366 * Returns:
367 * 0: Success. 367 * 0: Success.
@@ -373,7 +373,7 @@ extern int drv_insert_dev_object(struct drv_object *hdrv_obj,
373 * Ensures: 373 * Ensures:
374 * List either does not exist (NULL), or is not empty if it does exist. 374 * List either does not exist (NULL), or is not empty if it does exist.
375 */ 375 */
376extern int drv_remove_dev_object(struct drv_object *hdrv_obj, 376extern int drv_remove_dev_object(struct drv_object *driver_obj,
377 struct dev_object *hdev_obj); 377 struct dev_object *hdev_obj);
378 378
379/* 379/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h b/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
index a40b0ff7c5c..6a6c4bf1684 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspmsg.h
@@ -32,7 +32,7 @@ extern int bridge_msg_create(OUT struct msg_mgr **msg_man,
32 32
33extern int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr, 33extern int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
34 OUT struct msg_queue **msgq, 34 OUT struct msg_queue **msgq,
35 u32 msgq_id, u32 max_msgs, void *h); 35 u32 msgq_id, u32 max_msgs, void *arg);
36 36
37extern void bridge_msg_delete(struct msg_mgr *hmsg_mgr); 37extern void bridge_msg_delete(struct msg_mgr *hmsg_mgr);
38 38
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index 7fff2b3df43..a79fc6e243e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -114,7 +114,7 @@ void io_mbox_msg(u32 msg);
114 * pchnl != NULL 114 * pchnl != NULL
115 * Ensures: 115 * Ensures:
116 */ 116 */
117extern void io_request_chnl(struct io_mgr *hio_mgr, 117extern void io_request_chnl(struct io_mgr *io_manager,
118 struct chnl_object *pchnl, 118 struct chnl_object *pchnl,
119 u8 io_mode, OUT u16 *mbx_val); 119 u8 io_mode, OUT u16 *mbx_val);
120 120
@@ -129,7 +129,7 @@ extern void io_request_chnl(struct io_mgr *hio_mgr,
129 * pchnl != NULL 129 * pchnl != NULL
130 * Ensures: 130 * Ensures:
131 */ 131 */
132extern void iosm_schedule(struct io_mgr *hio_mgr); 132extern void iosm_schedule(struct io_mgr *io_manager);
133 133
134/* 134/*
135 * DSP-DMA IO functions 135 * DSP-DMA IO functions
diff --git a/drivers/staging/tidspbridge/include/dspbridge/mgr.h b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
index b90457b9b47..11913306483 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/mgr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/mgr.h
@@ -66,7 +66,7 @@ int mgr_wait_for_bridge_events(struct dsp_notification
66 * Details: 66 * Details:
67 * DCD Dll is loaded and MGR Object stores the handle of the DLL. 67 * DCD Dll is loaded and MGR Object stores the handle of the DLL.
68 */ 68 */
69extern int mgr_create(OUT struct mgr_object **hmgr_obj, 69extern int mgr_create(OUT struct mgr_object **mgr_obj,
70 struct cfg_devnode *dev_node_obj); 70 struct cfg_devnode *dev_node_obj);
71 71
72/* 72/*
diff --git a/drivers/staging/tidspbridge/include/dspbridge/proc.h b/drivers/staging/tidspbridge/include/dspbridge/proc.h
index e7a95103785..f91f11fe7c8 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/proc.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/proc.h
@@ -99,7 +99,7 @@ extern int proc_auto_start(struct cfg_devnode *dev_node_obj,
99 * This function Calls bridge_dev_ctrl. 99 * This function Calls bridge_dev_ctrl.
100 */ 100 */
101extern int proc_ctrl(void *hprocessor, 101extern int proc_ctrl(void *hprocessor,
102 u32 dw_cmd, IN struct dsp_cbdata *pargs); 102 u32 dw_cmd, IN struct dsp_cbdata *arg);
103 103
104/* 104/*
105 * ======== proc_detach ======== 105 * ======== proc_detach ========
@@ -278,7 +278,7 @@ extern int proc_get_state(void *hprocessor, OUT struct dsp_processorstate
278 * Ensures: 278 * Ensures:
279 * Details: 279 * Details:
280 */ 280 */
281extern int proc_get_processor_id(void *hprocessor, u32 * proc_id); 281extern int proc_get_processor_id(void *proc, u32 * proc_id);
282 282
283/* 283/*
284 * ======== proc_get_trace ======== 284 * ======== proc_get_trace ========
diff --git a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
index 48aebfff5d1..4e1b8a29825 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
@@ -23,41 +23,42 @@ extern int drv_get_proc_ctxt_list(struct process_context **pctxt,
23extern int drv_insert_proc_context(struct drv_object *driver_obj, 23extern int drv_insert_proc_context(struct drv_object *driver_obj,
24 void *process_ctxt); 24 void *process_ctxt);
25 25
26extern int drv_remove_all_dmm_res_elements(void *ctxt); 26extern int drv_remove_all_dmm_res_elements(void *process_ctxt);
27 27
28extern int drv_remove_all_node_res_elements(void *ctxt); 28extern int drv_remove_all_node_res_elements(void *process_ctxt);
29 29
30extern int drv_proc_set_pid(void *ctxt, s32 process); 30extern int drv_proc_set_pid(void *ctxt, s32 process);
31 31
32extern int drv_remove_all_resources(void *pctxt); 32extern int drv_remove_all_resources(void *process_ctxt);
33 33
34extern int drv_remove_proc_context(struct drv_object *driver_obj, 34extern int drv_remove_proc_context(struct drv_object *driver_obj,
35 void *pr_ctxt); 35 void *pr_ctxt);
36 36
37extern int drv_get_node_res_element(void *hnode, void *node_res, 37extern int drv_get_node_res_element(void *hnode, void *node_resource,
38 void *ctxt); 38 void *process_ctx);
39 39
40extern int drv_insert_node_res_element(void *hnode, void *node_res, 40extern int drv_insert_node_res_element(void *hnode, void *node_resource,
41 void *ctxt); 41 void *process_ctxt);
42 42
43extern void drv_proc_node_update_heap_status(void *node_resource, s32 status); 43extern void drv_proc_node_update_heap_status(void *node_resource, s32 status);
44 44
45extern int drv_remove_node_res_element(void *node_res, void *status); 45extern int drv_remove_node_res_element(void *node_resource,
46 void *process_ctxt);
46 47
47extern void drv_proc_node_update_status(void *node_resource, s32 status); 48extern void drv_proc_node_update_status(void *node_resource, s32 status);
48 49
49extern int drv_proc_update_strm_res(u32 num_bufs, void *strm_res); 50extern int drv_proc_update_strm_res(u32 num_bufs, void *strm_resources);
50 51
51extern int drv_proc_insert_strm_res_element(void *stream_obj, 52extern int drv_proc_insert_strm_res_element(void *stream_obj,
52 void *strm_res, 53 void *strm_res,
53 void *pctxt); 54 void *process_ctxt);
54 55
55extern int drv_get_strm_res_element(void *stream_obj, void *strm_res, 56extern int drv_get_strm_res_element(void *stream_obj, void *strm_resources,
56 void *ctxt); 57 void *process_ctxt);
57 58
58extern int drv_proc_remove_strm_res_element(void *strm_res, 59extern int drv_proc_remove_strm_res_element(void *strm_res,
59 void *ctxt); 60 void *process_ctxt);
60 61
61extern int drv_remove_all_strm_res_elements(void *ctxt); 62extern int drv_remove_all_strm_res_elements(void *process_ctxt);
62 63
63extern enum node_state node_get_state(void *hnode); 64extern enum node_state node_get_state(void *hnode);
diff --git a/drivers/staging/tidspbridge/include/dspbridge/rmm.h b/drivers/staging/tidspbridge/include/dspbridge/rmm.h
index f6b78d7f7ee..baea536681e 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/rmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/rmm.h
@@ -74,7 +74,7 @@ struct rmm_target_obj;
74 * Ensures: 74 * Ensures:
75 */ 75 */
76extern int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size, 76extern int rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size,
77 u32 align, u32 *dsp_adr, bool reserve); 77 u32 align, u32 *dsp_address, bool reserve);
78 78
79/* 79/*
80 * ======== rmm_create ======== 80 * ======== rmm_create ========
@@ -144,7 +144,7 @@ extern void rmm_exit(void);
144 * reserve || [dsp_address, dsp_address + size] is a valid memory range. 144 * reserve || [dsp_address, dsp_address + size] is a valid memory range.
145 * Ensures: 145 * Ensures:
146 */ 146 */
147extern bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_address, 147extern bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr,
148 u32 size, bool reserved); 148 u32 size, bool reserved);
149 149
150/* 150/*
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index d054e5389eb..4861c51e16b 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -149,7 +149,7 @@ static struct cmm_mnode *get_free_block(struct cmm_allocator *allocator,
149static struct cmm_mnode *get_node(struct cmm_object *cmm_mgr_obj, u32 dw_pa, 149static struct cmm_mnode *get_node(struct cmm_object *cmm_mgr_obj, u32 dw_pa,
150 u32 dw_va, u32 ul_size); 150 u32 dw_va, u32 ul_size);
151/* get available slot for new allocator */ 151/* get available slot for new allocator */
152static s32 get_slot(struct cmm_object *hcmm_mgr); 152static s32 get_slot(struct cmm_object *cmm_mgr_obj);
153static void un_register_gppsm_seg(struct cmm_allocator *psma); 153static void un_register_gppsm_seg(struct cmm_allocator *psma);
154 154
155/* 155/*
@@ -540,7 +540,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
540 u32 dw_gpp_base_pa, u32 ul_size, 540 u32 dw_gpp_base_pa, u32 ul_size,
541 u32 dsp_addr_offset, s8 c_factor, 541 u32 dsp_addr_offset, s8 c_factor,
542 u32 dw_dsp_base, u32 ul_dsp_size, 542 u32 dw_dsp_base, u32 ul_dsp_size,
543 u32 *sgmt_id, u32 dw_gpp_base_va) 543 u32 *sgmt_id, u32 gpp_base_va)
544{ 544{
545 struct cmm_object *cmm_mgr_obj = (struct cmm_object *)hcmm_mgr; 545 struct cmm_object *cmm_mgr_obj = (struct cmm_object *)hcmm_mgr;
546 struct cmm_allocator *psma = NULL; 546 struct cmm_allocator *psma = NULL;
@@ -551,13 +551,13 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
551 DBC_REQUIRE(ul_size > 0); 551 DBC_REQUIRE(ul_size > 0);
552 DBC_REQUIRE(sgmt_id != NULL); 552 DBC_REQUIRE(sgmt_id != NULL);
553 DBC_REQUIRE(dw_gpp_base_pa != 0); 553 DBC_REQUIRE(dw_gpp_base_pa != 0);
554 DBC_REQUIRE(dw_gpp_base_va != 0); 554 DBC_REQUIRE(gpp_base_va != 0);
555 DBC_REQUIRE((c_factor <= CMM_ADDTODSPPA) && 555 DBC_REQUIRE((c_factor <= CMM_ADDTODSPPA) &&
556 (c_factor >= CMM_SUBFROMDSPPA)); 556 (c_factor >= CMM_SUBFROMDSPPA));
557 dev_dbg(bridge, "%s: dw_gpp_base_pa %x ul_size %x dsp_addr_offset %x " 557 dev_dbg(bridge, "%s: dw_gpp_base_pa %x ul_size %x dsp_addr_offset %x "
558 "dw_dsp_base %x ul_dsp_size %x dw_gpp_base_va %x\n", __func__, 558 "dw_dsp_base %x ul_dsp_size %x gpp_base_va %x\n", __func__,
559 dw_gpp_base_pa, ul_size, dsp_addr_offset, dw_dsp_base, 559 dw_gpp_base_pa, ul_size, dsp_addr_offset, dw_dsp_base,
560 ul_dsp_size, dw_gpp_base_va); 560 ul_dsp_size, gpp_base_va);
561 if (!hcmm_mgr) { 561 if (!hcmm_mgr) {
562 status = -EFAULT; 562 status = -EFAULT;
563 return status; 563 return status;
@@ -585,7 +585,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr,
585 psma->hcmm_mgr = hcmm_mgr; /* ref to parent */ 585 psma->hcmm_mgr = hcmm_mgr; /* ref to parent */
586 psma->shm_base = dw_gpp_base_pa; /* SM Base phys */ 586 psma->shm_base = dw_gpp_base_pa; /* SM Base phys */
587 psma->ul_sm_size = ul_size; /* SM segment size in bytes */ 587 psma->ul_sm_size = ul_size; /* SM segment size in bytes */
588 psma->dw_vm_base = dw_gpp_base_va; 588 psma->dw_vm_base = gpp_base_va;
589 psma->dw_dsp_phys_addr_offset = dsp_addr_offset; 589 psma->dw_dsp_phys_addr_offset = dsp_addr_offset;
590 psma->c_factor = c_factor; 590 psma->c_factor = c_factor;
591 psma->dw_dsp_base = dw_dsp_base; 591 psma->dw_dsp_base = dw_dsp_base;
diff --git a/drivers/staging/tidspbridge/pmgr/cod.c b/drivers/staging/tidspbridge/pmgr/cod.c
index d9501eb675d..21aad312b54 100644
--- a/drivers/staging/tidspbridge/pmgr/cod.c
+++ b/drivers/staging/tidspbridge/pmgr/cod.c
@@ -215,7 +215,7 @@ void cod_close(struct cod_libraryobj *lib)
215 * dynamically loaded object files. 215 * dynamically loaded object files.
216 * 216 *
217 */ 217 */
218int cod_create(OUT struct cod_manager **mgr, char *str_dummy_file, 218int cod_create(OUT struct cod_manager **mgr, char *str_zl_file,
219 IN OPTIONAL CONST struct cod_attrs *attrs) 219 IN OPTIONAL CONST struct cod_attrs *attrs)
220{ 220{
221 struct cod_manager *mgr_new; 221 struct cod_manager *mgr_new;
@@ -281,23 +281,24 @@ int cod_create(OUT struct cod_manager **mgr, char *str_dummy_file,
281 * Purpose: 281 * Purpose:
282 * Delete a code manager object. 282 * Delete a code manager object.
283 */ 283 */
284void cod_delete(struct cod_manager *hmgr) 284void cod_delete(struct cod_manager *cod_mgr_obj)
285{ 285{
286 DBC_REQUIRE(refs > 0); 286 DBC_REQUIRE(refs > 0);
287 DBC_REQUIRE(IS_VALID(hmgr)); 287 DBC_REQUIRE(IS_VALID(cod_mgr_obj));
288 288
289 if (hmgr->base_lib) { 289 if (cod_mgr_obj->base_lib) {
290 if (hmgr->loaded) 290 if (cod_mgr_obj->loaded)
291 hmgr->fxns.unload_fxn(hmgr->base_lib, &hmgr->attrs); 291 cod_mgr_obj->fxns.unload_fxn(cod_mgr_obj->base_lib,
292 &cod_mgr_obj->attrs);
292 293
293 hmgr->fxns.close_fxn(hmgr->base_lib); 294 cod_mgr_obj->fxns.close_fxn(cod_mgr_obj->base_lib);
294 } 295 }
295 if (hmgr->target) { 296 if (cod_mgr_obj->target) {
296 hmgr->fxns.delete_fxn(hmgr->target); 297 cod_mgr_obj->fxns.delete_fxn(cod_mgr_obj->target);
297 hmgr->fxns.exit_fxn(); 298 cod_mgr_obj->fxns.exit_fxn();
298 } 299 }
299 hmgr->ul_magic = ~MAGIC; 300 cod_mgr_obj->ul_magic = ~MAGIC;
300 kfree(hmgr); 301 kfree(cod_mgr_obj);
301} 302}
302 303
303/* 304/*
@@ -432,23 +433,24 @@ int cod_get_section(struct cod_libraryobj *lib, IN char *str_sect,
432 * C symbol. 433 * C symbol.
433 * 434 *
434 */ 435 */
435int cod_get_sym_value(struct cod_manager *hmgr, char *str_sym, 436int cod_get_sym_value(struct cod_manager *cod_mgr_obj, char *str_sym,
436 u32 *pul_value) 437 u32 *pul_value)
437{ 438{
438 struct dbll_sym_val *dbll_sym; 439 struct dbll_sym_val *dbll_sym;
439 440
440 DBC_REQUIRE(refs > 0); 441 DBC_REQUIRE(refs > 0);
441 DBC_REQUIRE(IS_VALID(hmgr)); 442 DBC_REQUIRE(IS_VALID(cod_mgr_obj));
442 DBC_REQUIRE(str_sym != NULL); 443 DBC_REQUIRE(str_sym != NULL);
443 DBC_REQUIRE(pul_value != NULL); 444 DBC_REQUIRE(pul_value != NULL);
444 445
445 dev_dbg(bridge, "%s: hmgr: %p str_sym: %s pul_value: %p\n", 446 dev_dbg(bridge, "%s: cod_mgr_obj: %p str_sym: %s pul_value: %p\n",
446 __func__, hmgr, str_sym, pul_value); 447 __func__, cod_mgr_obj, str_sym, pul_value);
447 if (hmgr->base_lib) { 448 if (cod_mgr_obj->base_lib) {
448 if (!hmgr->fxns. 449 if (!cod_mgr_obj->fxns.
449 get_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym)) { 450 get_addr_fxn(cod_mgr_obj->base_lib, str_sym, &dbll_sym)) {
450 if (!hmgr->fxns. 451 if (!cod_mgr_obj->fxns.
451 get_c_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym)) 452 get_c_addr_fxn(cod_mgr_obj->base_lib, str_sym,
453 &dbll_sym))
452 return -ESPIPE; 454 return -ESPIPE;
453 } 455 }
454 } else { 456 } else {
@@ -492,7 +494,7 @@ bool cod_init(void)
492 * recalculated to reflect this. In this way, we can support NULL 494 * recalculated to reflect this. In this way, we can support NULL
493 * terminating args arrays, if num_argc is very large. 495 * terminating args arrays, if num_argc is very large.
494 */ 496 */
495int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[], 497int cod_load_base(struct cod_manager *cod_mgr_obj, u32 num_argc, char *args[],
496 cod_writefxn pfn_write, void *arb, char *envp[]) 498 cod_writefxn pfn_write, void *arb, char *envp[])
497{ 499{
498 dbll_flags flags; 500 dbll_flags flags;
@@ -502,12 +504,12 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
502 u32 i; 504 u32 i;
503 505
504 DBC_REQUIRE(refs > 0); 506 DBC_REQUIRE(refs > 0);
505 DBC_REQUIRE(IS_VALID(hmgr)); 507 DBC_REQUIRE(IS_VALID(cod_mgr_obj));
506 DBC_REQUIRE(num_argc > 0); 508 DBC_REQUIRE(num_argc > 0);
507 DBC_REQUIRE(args != NULL); 509 DBC_REQUIRE(args != NULL);
508 DBC_REQUIRE(args[0] != NULL); 510 DBC_REQUIRE(args[0] != NULL);
509 DBC_REQUIRE(pfn_write != NULL); 511 DBC_REQUIRE(pfn_write != NULL);
510 DBC_REQUIRE(hmgr->base_lib != NULL); 512 DBC_REQUIRE(cod_mgr_obj->base_lib != NULL);
511 513
512 /* 514 /*
513 * Make sure every argv[] stated in argc has a value, or change argc to 515 * Make sure every argv[] stated in argc has a value, or change argc to
@@ -521,7 +523,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
521 } 523 }
522 524
523 /* set the write function for this operation */ 525 /* set the write function for this operation */
524 hmgr->fxns.get_attrs_fxn(hmgr->target, &save_attrs); 526 cod_mgr_obj->fxns.get_attrs_fxn(cod_mgr_obj->target, &save_attrs);
525 527
526 new_attrs = save_attrs; 528 new_attrs = save_attrs;
527 new_attrs.write = (dbll_write_fxn) pfn_write; 529 new_attrs.write = (dbll_write_fxn) pfn_write;
@@ -533,15 +535,16 @@ int cod_load_base(struct cod_manager *hmgr, u32 num_argc, char *args[],
533 535
534 /* Load the image */ 536 /* Load the image */
535 flags = DBLL_CODE | DBLL_DATA | DBLL_SYMB; 537 flags = DBLL_CODE | DBLL_DATA | DBLL_SYMB;
536 status = hmgr->fxns.load_fxn(hmgr->base_lib, flags, &new_attrs, 538 status = cod_mgr_obj->fxns.load_fxn(cod_mgr_obj->base_lib, flags,
537 &hmgr->ul_entry); 539 &new_attrs,
540 &cod_mgr_obj->ul_entry);
538 if (DSP_FAILED(status)) 541 if (DSP_FAILED(status))
539 hmgr->fxns.close_fxn(hmgr->base_lib); 542 cod_mgr_obj->fxns.close_fxn(cod_mgr_obj->base_lib);
540 543
541 if (DSP_SUCCEEDED(status)) 544 if (DSP_SUCCEEDED(status))
542 hmgr->loaded = true; 545 cod_mgr_obj->loaded = true;
543 else 546 else
544 hmgr->base_lib = NULL; 547 cod_mgr_obj->base_lib = NULL;
545 548
546 return status; 549 return status;
547} 550}
diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index cb4d2a7ceef..16dbde8cf88 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -140,7 +140,8 @@ struct dbll_symbol {
140static void dof_close(struct dbll_library_obj *zl_lib); 140static void dof_close(struct dbll_library_obj *zl_lib);
141static int dof_open(struct dbll_library_obj *zl_lib); 141static int dof_open(struct dbll_library_obj *zl_lib);
142static s32 no_op(struct dynamic_loader_initialize *thisptr, void *bufr, 142static s32 no_op(struct dynamic_loader_initialize *thisptr, void *bufr,
143 ldr_addr locn, struct ldr_section_info *info, unsigned bytsiz); 143 ldr_addr locn, struct ldr_section_info *info,
144 unsigned bytsize);
144 145
145/* 146/*
146 * Functions called by dynamic loader 147 * Functions called by dynamic loader
@@ -176,20 +177,20 @@ static void rmm_dealloc(struct dynamic_loader_allocate *this,
176static int connect(struct dynamic_loader_initialize *this); 177static int connect(struct dynamic_loader_initialize *this);
177static int read_mem(struct dynamic_loader_initialize *this, void *buf, 178static int read_mem(struct dynamic_loader_initialize *this, void *buf,
178 ldr_addr addr, struct ldr_section_info *info, 179 ldr_addr addr, struct ldr_section_info *info,
179 unsigned nbytes); 180 unsigned bytes);
180static int write_mem(struct dynamic_loader_initialize *this, void *buf, 181static int write_mem(struct dynamic_loader_initialize *this, void *buf,
181 ldr_addr addr, struct ldr_section_info *info, 182 ldr_addr addr, struct ldr_section_info *info,
182 unsigned nbytes); 183 unsigned nbytes);
183static int fill_mem(struct dynamic_loader_initialize *this, ldr_addr addr, 184static int fill_mem(struct dynamic_loader_initialize *this, ldr_addr addr,
184 struct ldr_section_info *info, unsigned nbytes, 185 struct ldr_section_info *info, unsigned bytes,
185 unsigned val); 186 unsigned val);
186static int execute(struct dynamic_loader_initialize *this, ldr_addr start); 187static int execute(struct dynamic_loader_initialize *this, ldr_addr start);
187static void release(struct dynamic_loader_initialize *this); 188static void release(struct dynamic_loader_initialize *this);
188 189
189/* symbol table hash functions */ 190/* symbol table hash functions */
190static u16 name_hash(void *name, u16 max_bucket); 191static u16 name_hash(void *key, u16 max_bucket);
191static bool name_match(void *name, void *sp); 192static bool name_match(void *key, void *sp);
192static void sym_delete(void *sp); 193static void sym_delete(void *value);
193 194
194static u32 refs; /* module reference count */ 195static u32 refs; /* module reference count */
195 196
@@ -728,7 +729,7 @@ func_cont:
728 * Get the content of a COFF section. 729 * Get the content of a COFF section.
729 */ 730 */
730int dbll_read_sect(struct dbll_library_obj *lib, char *name, 731int dbll_read_sect(struct dbll_library_obj *lib, char *name,
731 char *content, u32 size) 732 char *buf, u32 size)
732{ 733{
733 struct dbll_library_obj *zl_lib = (struct dbll_library_obj *)lib; 734 struct dbll_library_obj *zl_lib = (struct dbll_library_obj *)lib;
734 bool opened_doff = false; 735 bool opened_doff = false;
@@ -740,7 +741,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name,
740 DBC_REQUIRE(refs > 0); 741 DBC_REQUIRE(refs > 0);
741 DBC_REQUIRE(zl_lib); 742 DBC_REQUIRE(zl_lib);
742 DBC_REQUIRE(name != NULL); 743 DBC_REQUIRE(name != NULL);
743 DBC_REQUIRE(content != NULL); 744 DBC_REQUIRE(buf != NULL);
744 DBC_REQUIRE(size != 0); 745 DBC_REQUIRE(size != 0);
745 746
746 /* If DOFF file is not open, we open it. */ 747 /* If DOFF file is not open, we open it. */
@@ -768,7 +769,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name,
768 } 769 }
769 /* 770 /*
770 * Ensure the supplied buffer size is sufficient to store 771 * Ensure the supplied buffer size is sufficient to store
771 * the section content to be read. 772 * the section buf to be read.
772 */ 773 */
773 ul_sect_size = sect->size * byte_size; 774 ul_sect_size = sect->size * byte_size;
774 /* Make sure size is even for good swap */ 775 /* Make sure size is even for good swap */
@@ -780,7 +781,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name,
780 if (ul_sect_size > size) { 781 if (ul_sect_size > size) {
781 status = -EPERM; 782 status = -EPERM;
782 } else { 783 } else {
783 if (!dload_get_section(zl_lib->desc, sect, content)) 784 if (!dload_get_section(zl_lib->desc, sect, buf))
784 status = -EBADF; 785 status = -EBADF;
785 786
786 } 787 }
@@ -790,8 +791,8 @@ func_cont:
790 opened_doff = false; 791 opened_doff = false;
791 } 792 }
792 793
793 dev_dbg(bridge, "%s: lib: %p name: %s content: %p size: 0x%x, " 794 dev_dbg(bridge, "%s: lib: %p name: %s buf: %p size: 0x%x, "
794 "status 0x%x\n", __func__, lib, name, content, size, status); 795 "status 0x%x\n", __func__, lib, name, buf, size, status);
795 return status; 796 return status;
796} 797}
797 798
@@ -935,13 +936,13 @@ static u16 name_hash(void *key, u16 max_bucket)
935/* 936/*
936 * ======== name_match ======== 937 * ======== name_match ========
937 */ 938 */
938static bool name_match(void *key, void *value) 939static bool name_match(void *key, void *sp)
939{ 940{
940 DBC_REQUIRE(key != NULL); 941 DBC_REQUIRE(key != NULL);
941 DBC_REQUIRE(value != NULL); 942 DBC_REQUIRE(sp != NULL);
942 943
943 if ((key != NULL) && (value != NULL)) { 944 if ((key != NULL) && (sp != NULL)) {
944 if (strcmp((char *)key, ((struct dbll_symbol *)value)->name) == 945 if (strcmp((char *)key, ((struct dbll_symbol *)sp)->name) ==
945 0) 946 0)
946 return true; 947 return true;
947 } 948 }
diff --git a/drivers/staging/tidspbridge/pmgr/dmm.c b/drivers/staging/tidspbridge/pmgr/dmm.c
index c661e5869ad..c4d6cbc4a31 100644
--- a/drivers/staging/tidspbridge/pmgr/dmm.c
+++ b/drivers/staging/tidspbridge/pmgr/dmm.c
@@ -405,14 +405,14 @@ int dmm_un_reserve_memory(struct dmm_object *dmm_mgr, u32 rsv_addr)
405 * Purpose: 405 * Purpose:
406 * Returns a region containing the specified memory region 406 * Returns a region containing the specified memory region
407 */ 407 */
408static struct map_page *get_region(u32 addrs) 408static struct map_page *get_region(u32 addr)
409{ 409{
410 struct map_page *curr_region = NULL; 410 struct map_page *curr_region = NULL;
411 u32 i = 0; 411 u32 i = 0;
412 412
413 if (virtual_mapping_table != NULL) { 413 if (virtual_mapping_table != NULL) {
414 /* find page mapped by this address */ 414 /* find page mapped by this address */
415 i = DMM_ADDR_TO_INDEX(addrs); 415 i = DMM_ADDR_TO_INDEX(addr);
416 if (i < table_size) 416 if (i < table_size)
417 curr_region = virtual_mapping_table + i; 417 curr_region = virtual_mapping_table + i;
418 } 418 }
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index 03a231705a4..a6bbb240d86 100644
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -269,11 +269,11 @@ int drv_get_node_res_element(void *hnode, void *node_resource,
269/* Allocate the STRM resource element 269/* Allocate the STRM resource element
270* This is called after the actual resource is allocated 270* This is called after the actual resource is allocated
271 */ 271 */
272int drv_proc_insert_strm_res_element(void *stream_handle, 272int drv_proc_insert_strm_res_element(void *stream_obj,
273 void *hstrm_res, void *process_ctxt) 273 void *strm_res, void *process_ctxt)
274{ 274{
275 struct strm_res_object **pstrm_res = 275 struct strm_res_object **pstrm_res =
276 (struct strm_res_object **)hstrm_res; 276 (struct strm_res_object **)strm_res;
277 struct process_context *ctxt = (struct process_context *)process_ctxt; 277 struct process_context *ctxt = (struct process_context *)process_ctxt;
278 int status = 0; 278 int status = 0;
279 struct strm_res_object *temp_strm_res = NULL; 279 struct strm_res_object *temp_strm_res = NULL;
@@ -287,7 +287,7 @@ int drv_proc_insert_strm_res_element(void *stream_handle,
287 kfree(*pstrm_res); 287 kfree(*pstrm_res);
288 return -EPERM; 288 return -EPERM;
289 } 289 }
290 (*pstrm_res)->hstream = stream_handle; 290 (*pstrm_res)->hstream = stream_obj;
291 if (ctxt->pstrm_list != NULL) { 291 if (ctxt->pstrm_list != NULL) {
292 temp_strm_res = ctxt->pstrm_list; 292 temp_strm_res = ctxt->pstrm_list;
293 while (temp_strm_res->next != NULL) 293 while (temp_strm_res->next != NULL)
@@ -305,9 +305,9 @@ int drv_proc_insert_strm_res_element(void *stream_handle,
305/* Release Stream resource element context 305/* Release Stream resource element context
306* This function called after the actual resource is freed 306* This function called after the actual resource is freed
307 */ 307 */
308int drv_proc_remove_strm_res_element(void *hstrm_res, void *process_ctxt) 308int drv_proc_remove_strm_res_element(void *strm_res, void *process_ctxt)
309{ 309{
310 struct strm_res_object *pstrm_res = (struct strm_res_object *)hstrm_res; 310 struct strm_res_object *pstrm_res = (struct strm_res_object *)strm_res;
311 struct process_context *ctxt = (struct process_context *)process_ctxt; 311 struct process_context *ctxt = (struct process_context *)process_ctxt;
312 struct strm_res_object *temp_strm_res; 312 struct strm_res_object *temp_strm_res;
313 int status = 0; 313 int status = 0;
@@ -375,11 +375,11 @@ int drv_remove_all_strm_res_elements(void *process_ctxt)
375} 375}
376 376
377/* Getting the stream resource element */ 377/* Getting the stream resource element */
378int drv_get_strm_res_element(void *stream_obj, void *hstrm_res, 378int drv_get_strm_res_element(void *stream_obj, void *strm_resources,
379 void *process_ctxt) 379 void *process_ctxt)
380{ 380{
381 struct strm_res_object **strm_res = 381 struct strm_res_object **strm_res =
382 (struct strm_res_object **)hstrm_res; 382 (struct strm_res_object **)strm_resources;
383 struct process_context *ctxt = (struct process_context *)process_ctxt; 383 struct process_context *ctxt = (struct process_context *)process_ctxt;
384 int status = 0; 384 int status = 0;
385 struct strm_res_object *temp_strm2 = NULL; 385 struct strm_res_object *temp_strm2 = NULL;
@@ -405,11 +405,11 @@ int drv_get_strm_res_element(void *stream_obj, void *hstrm_res,
405} 405}
406 406
407/* Updating the stream resource element */ 407/* Updating the stream resource element */
408int drv_proc_update_strm_res(u32 num_bufs, void *hstrm_res) 408int drv_proc_update_strm_res(u32 num_bufs, void *strm_resources)
409{ 409{
410 int status = 0; 410 int status = 0;
411 struct strm_res_object **strm_res = 411 struct strm_res_object **strm_res =
412 (struct strm_res_object **)hstrm_res; 412 (struct strm_res_object **)strm_resources;
413 413
414 (*strm_res)->num_bufs = num_bufs; 414 (*strm_res)->num_bufs = num_bufs;
415 return status; 415 return status;
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.h b/drivers/staging/tidspbridge/rmgr/drv_interface.h
index fd6f48975f3..ab070602adc 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.h
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.h
@@ -20,8 +20,9 @@
20/* Prototypes for all functions in this bridge */ 20/* Prototypes for all functions in this bridge */
21static int __init bridge_init(void); /* Initialize bridge */ 21static int __init bridge_init(void); /* Initialize bridge */
22static void __exit bridge_exit(void); /* Opposite of initialize */ 22static void __exit bridge_exit(void); /* Opposite of initialize */
23static int bridge_open(struct inode *, struct file *); /* Open */ 23static int bridge_open(struct inode *ip, struct file *filp); /* Open */
24static int bridge_release(struct inode *, struct file *); /* Release */ 24static int bridge_release(struct inode *ip, struct file *filp); /* Release */
25static long bridge_ioctl(struct file *, unsigned int, unsigned long); 25static long bridge_ioctl(struct file *filp, unsigned int code,
26 unsigned long args);
26static int bridge_mmap(struct file *filp, struct vm_area_struct *vma); 27static int bridge_mmap(struct file *filp, struct vm_area_struct *vma);
27#endif /* ifndef _DRV_INTERFACE_H_ */ 28#endif /* ifndef _DRV_INTERFACE_H_ */
diff --git a/drivers/staging/tidspbridge/rmgr/dspdrv.c b/drivers/staging/tidspbridge/rmgr/dspdrv.c
index 19a7471e4ab..8a282488e31 100644
--- a/drivers/staging/tidspbridge/rmgr/dspdrv.c
+++ b/drivers/staging/tidspbridge/rmgr/dspdrv.c
@@ -116,7 +116,7 @@ func_cont:
116 * ======== dsp_deinit ======== 116 * ======== dsp_deinit ========
117 * Frees the resources allocated for bridge. 117 * Frees the resources allocated for bridge.
118 */ 118 */
119bool dsp_deinit(u32 device_ctxt) 119bool dsp_deinit(u32 device_context)
120{ 120{
121 bool ret = true; 121 bool ret = true;
122 u32 device_node; 122 u32 device_node;
@@ -126,10 +126,10 @@ bool dsp_deinit(u32 device_ctxt)
126 (void)dev_remove_device((struct cfg_devnode *)device_node); 126 (void)dev_remove_device((struct cfg_devnode *)device_node);
127 127
128 (void)drv_release_resources((u32) device_node, 128 (void)drv_release_resources((u32) device_node,
129 (struct drv_object *)device_ctxt); 129 (struct drv_object *)device_context);
130 } 130 }
131 131
132 (void)drv_destroy((struct drv_object *)device_ctxt); 132 (void)drv_destroy((struct drv_object *)device_context);
133 133
134 /* Get the Manager Object from Registry 134 /* Get the Manager Object from Registry
135 * MGR Destroy will unload the DCD dll */ 135 * MGR Destroy will unload the DCD dll */
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index 46fc76535e0..e96f5077a6e 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -304,7 +304,7 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj,
304 enum nldr_phase phase, u16 depth); 304 enum nldr_phase phase, u16 depth);
305static int load_ovly(struct nldr_nodeobject *nldr_node_obj, 305static int load_ovly(struct nldr_nodeobject *nldr_node_obj,
306 enum nldr_phase phase); 306 enum nldr_phase phase);
307static int remote_alloc(void **ref, u16 mem_sect_type, u32 size, 307static int remote_alloc(void **ref, u16 mem_sect, u32 size,
308 u32 align, u32 *dsp_address, 308 u32 align, u32 *dsp_address,
309 OPTIONAL s32 segmnt_id, 309 OPTIONAL s32 segmnt_id,
310 OPTIONAL s32 req, bool reserve); 310 OPTIONAL s32 req, bool reserve);
@@ -1161,7 +1161,7 @@ static void free_sects(struct nldr_object *nldr_obj,
1161 * libraries. 1161 * libraries.
1162 */ 1162 */
1163static bool get_symbol_value(void *handle, void *parg, void *rmm_handle, 1163static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
1164 char *name, struct dbll_sym_val **sym) 1164 char *sym_name, struct dbll_sym_val **sym)
1165{ 1165{
1166 struct nldr_object *nldr_obj = (struct nldr_object *)handle; 1166 struct nldr_object *nldr_obj = (struct nldr_object *)handle;
1167 struct nldr_nodeobject *nldr_node_obj = 1167 struct nldr_nodeobject *nldr_node_obj =
@@ -1171,11 +1171,12 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
1171 bool status = false; 1171 bool status = false;
1172 1172
1173 /* check the base image */ 1173 /* check the base image */
1174 status = nldr_obj->ldr_fxns.get_addr_fxn(nldr_obj->base_lib, name, sym); 1174 status = nldr_obj->ldr_fxns.get_addr_fxn(nldr_obj->base_lib,
1175 sym_name, sym);
1175 if (!status) 1176 if (!status)
1176 status = 1177 status =
1177 nldr_obj->ldr_fxns.get_c_addr_fxn(nldr_obj->base_lib, name, 1178 nldr_obj->ldr_fxns.get_c_addr_fxn(nldr_obj->base_lib,
1178 sym); 1179 sym_name, sym);
1179 1180
1180 /* 1181 /*
1181 * Check in root lib itself. If the library consists of 1182 * Check in root lib itself. If the library consists of
@@ -1183,11 +1184,12 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
1183 * library may need to be resolved. 1184 * library may need to be resolved.
1184 */ 1185 */
1185 if (!status) { 1186 if (!status) {
1186 status = nldr_obj->ldr_fxns.get_addr_fxn(root->lib, name, sym); 1187 status = nldr_obj->ldr_fxns.get_addr_fxn(root->lib, sym_name,
1188 sym);
1187 if (!status) { 1189 if (!status) {
1188 status = 1190 status =
1189 nldr_obj->ldr_fxns.get_c_addr_fxn(root->lib, name, 1191 nldr_obj->ldr_fxns.get_c_addr_fxn(root->lib,
1190 sym); 1192 sym_name, sym);
1191 } 1193 }
1192 } 1194 }
1193 1195
@@ -1198,13 +1200,15 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
1198 if (!status) { 1200 if (!status) {
1199 for (i = 0; i < root->dep_libs; i++) { 1201 for (i = 0; i < root->dep_libs; i++) {
1200 status = 1202 status =
1201 nldr_obj->ldr_fxns.get_addr_fxn(root->dep_libs_tree 1203 nldr_obj->ldr_fxns.get_addr_fxn(root->
1202 [i].lib, name, sym); 1204 dep_libs_tree
1205 [i].lib,
1206 sym_name, sym);
1203 if (!status) { 1207 if (!status) {
1204 status = 1208 status =
1205 nldr_obj->ldr_fxns. 1209 nldr_obj->ldr_fxns.
1206 get_c_addr_fxn(root->dep_libs_tree[i].lib, 1210 get_c_addr_fxn(root->dep_libs_tree[i].lib,
1207 name, sym); 1211 sym_name, sym);
1208 } 1212 }
1209 if (status) { 1213 if (status) {
1210 /* Symbol found */ 1214 /* Symbol found */
@@ -1220,11 +1224,11 @@ static bool get_symbol_value(void *handle, void *parg, void *rmm_handle,
1220 status = 1224 status =
1221 nldr_obj->ldr_fxns. 1225 nldr_obj->ldr_fxns.
1222 get_addr_fxn(nldr_node_obj->pers_lib_table[i].lib, 1226 get_addr_fxn(nldr_node_obj->pers_lib_table[i].lib,
1223 name, sym); 1227 sym_name, sym);
1224 if (!status) { 1228 if (!status) {
1225 status = nldr_obj->ldr_fxns.get_c_addr_fxn 1229 status = nldr_obj->ldr_fxns.get_c_addr_fxn
1226 (nldr_node_obj->pers_lib_table[i].lib, name, 1230 (nldr_node_obj->pers_lib_table[i].lib,
1227 sym); 1231 sym_name, sym);
1228 } 1232 }
1229 if (status) { 1233 if (status) {
1230 /* Symbol found */ 1234 /* Symbol found */
@@ -1623,7 +1627,7 @@ func_end:
1623/* 1627/*
1624 * ======== remote_alloc ======== 1628 * ======== remote_alloc ========
1625 */ 1629 */
1626static int remote_alloc(void **ref, u16 space, u32 size, 1630static int remote_alloc(void **ref, u16 mem_sect, u32 size,
1627 u32 align, u32 *dsp_address, 1631 u32 align, u32 *dsp_address,
1628 OPTIONAL s32 segmnt_id, OPTIONAL s32 req, 1632 OPTIONAL s32 segmnt_id, OPTIONAL s32 req,
1629 bool reserve) 1633 bool reserve)
@@ -1640,8 +1644,8 @@ static int remote_alloc(void **ref, u16 space, u32 size,
1640 bool mem_load_req = false; 1644 bool mem_load_req = false;
1641 int status = -ENOMEM; /* Set to fail */ 1645 int status = -ENOMEM; /* Set to fail */
1642 DBC_REQUIRE(hnode); 1646 DBC_REQUIRE(hnode);
1643 DBC_REQUIRE(space == DBLL_CODE || space == DBLL_DATA || 1647 DBC_REQUIRE(mem_sect == DBLL_CODE || mem_sect == DBLL_DATA ||
1644 space == DBLL_BSS); 1648 mem_sect == DBLL_BSS);
1645 nldr_obj = hnode->nldr_obj; 1649 nldr_obj = hnode->nldr_obj;
1646 rmm = nldr_obj->rmm; 1650 rmm = nldr_obj->rmm;
1647 /* Convert size to DSP words */ 1651 /* Convert size to DSP words */
@@ -1670,7 +1674,7 @@ static int remote_alloc(void **ref, u16 space, u32 size,
1670 DBC_ASSERT(false); 1674 DBC_ASSERT(false);
1671 break; 1675 break;
1672 } 1676 }
1673 if (space == DBLL_CODE) 1677 if (mem_sect == DBLL_CODE)
1674 mem_phase_bit++; 1678 mem_phase_bit++;
1675 1679
1676 if (mem_phase_bit < MAXFLAGS) 1680 if (mem_phase_bit < MAXFLAGS)
@@ -1681,9 +1685,9 @@ static int remote_alloc(void **ref, u16 space, u32 size,
1681 mem_load_req = true; 1685 mem_load_req = true;
1682 1686
1683 } 1687 }
1684 mem_sect_type = (space == DBLL_CODE) ? DYNM_CODE : DYNM_DATA; 1688 mem_sect_type = (mem_sect == DBLL_CODE) ? DYNM_CODE : DYNM_DATA;
1685 1689
1686 /* Find an appropriate segment based on space */ 1690 /* Find an appropriate segment based on mem_sect */
1687 if (segid == NULLID) { 1691 if (segid == NULLID) {
1688 /* No memory requirements of preferences */ 1692 /* No memory requirements of preferences */
1689 DBC_ASSERT(!mem_load_req); 1693 DBC_ASSERT(!mem_load_req);
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index e788f3178a5..76011083958 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -1804,7 +1804,7 @@ int node_get_channel_id(struct node_object *hnode, u32 dir, u32 index,
1804 * Retrieve a message from a node on the DSP. 1804 * Retrieve a message from a node on the DSP.
1805 */ 1805 */
1806int node_get_message(struct node_object *hnode, 1806int node_get_message(struct node_object *hnode,
1807 OUT struct dsp_msg *pmsg, u32 utimeout) 1807 OUT struct dsp_msg *message, u32 utimeout)
1808{ 1808{
1809 struct node_mgr *hnode_mgr; 1809 struct node_mgr *hnode_mgr;
1810 enum node_type node_type; 1810 enum node_type node_type;
@@ -1815,7 +1815,7 @@ int node_get_message(struct node_object *hnode,
1815 struct proc_object *hprocessor; 1815 struct proc_object *hprocessor;
1816 1816
1817 DBC_REQUIRE(refs > 0); 1817 DBC_REQUIRE(refs > 0);
1818 DBC_REQUIRE(pmsg != NULL); 1818 DBC_REQUIRE(message != NULL);
1819 1819
1820 if (!hnode) { 1820 if (!hnode) {
1821 status = -EFAULT; 1821 status = -EFAULT;
@@ -1846,14 +1846,14 @@ int node_get_message(struct node_object *hnode,
1846 * available. */ 1846 * available. */
1847 intf_fxns = hnode_mgr->intf_fxns; 1847 intf_fxns = hnode_mgr->intf_fxns;
1848 status = 1848 status =
1849 (*intf_fxns->pfn_msg_get) (hnode->msg_queue_obj, pmsg, utimeout); 1849 (*intf_fxns->pfn_msg_get) (hnode->msg_queue_obj, message, utimeout);
1850 /* Check if message contains SM descriptor */ 1850 /* Check if message contains SM descriptor */
1851 if (DSP_FAILED(status) || !(pmsg->dw_cmd & DSP_RMSBUFDESC)) 1851 if (DSP_FAILED(status) || !(message->dw_cmd & DSP_RMSBUFDESC))
1852 goto func_end; 1852 goto func_end;
1853 1853
1854 /* Translate DSP byte addr to GPP Va. */ 1854 /* Translate DSP byte addr to GPP Va. */
1855 tmp_buf = cmm_xlator_translate(hnode->xlator, 1855 tmp_buf = cmm_xlator_translate(hnode->xlator,
1856 (void *)(pmsg->dw_arg1 * 1856 (void *)(message->dw_arg1 *
1857 hnode->hnode_mgr-> 1857 hnode->hnode_mgr->
1858 udsp_word_size), CMM_DSPPA2PA); 1858 udsp_word_size), CMM_DSPPA2PA);
1859 if (tmp_buf != NULL) { 1859 if (tmp_buf != NULL) {
@@ -1862,8 +1862,8 @@ int node_get_message(struct node_object *hnode,
1862 CMM_PA2VA); 1862 CMM_PA2VA);
1863 if (tmp_buf != NULL) { 1863 if (tmp_buf != NULL) {
1864 /* Adjust SM size in msg */ 1864 /* Adjust SM size in msg */
1865 pmsg->dw_arg1 = (u32) tmp_buf; 1865 message->dw_arg1 = (u32) tmp_buf;
1866 pmsg->dw_arg2 *= hnode->hnode_mgr->udsp_word_size; 1866 message->dw_arg2 *= hnode->hnode_mgr->udsp_word_size;
1867 } else { 1867 } else {
1868 status = -ESRCH; 1868 status = -ESRCH;
1869 } 1869 }
@@ -1871,8 +1871,8 @@ int node_get_message(struct node_object *hnode,
1871 status = -ESRCH; 1871 status = -ESRCH;
1872 } 1872 }
1873func_end: 1873func_end:
1874 dev_dbg(bridge, "%s: hnode: %p pmsg: %p utimeout: 0x%x\n", __func__, 1874 dev_dbg(bridge, "%s: hnode: %p message: %p utimeout: 0x%x\n", __func__,
1875 hnode, pmsg, utimeout); 1875 hnode, message, utimeout);
1876 return status; 1876 return status;
1877} 1877}
1878 1878
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index aa48fa8502b..9ed42eb444f 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -108,7 +108,7 @@ static u32 refs;
108DEFINE_MUTEX(proc_lock); /* For critical sections */ 108DEFINE_MUTEX(proc_lock); /* For critical sections */
109 109
110/* ----------------------------------- Function Prototypes */ 110/* ----------------------------------- Function Prototypes */
111static int proc_monitor(struct proc_object *hprocessor); 111static int proc_monitor(struct proc_object *proc_obj);
112static s32 get_envp_count(char **envp); 112static s32 get_envp_count(char **envp);
113static char **prepend_envp(char **new_envp, char **envp, s32 envp_elems, 113static char **prepend_envp(char **new_envp, char **envp, s32 envp_elems,
114 s32 cnew_envp, char *sz_var); 114 s32 cnew_envp, char *sz_var);
@@ -1788,32 +1788,32 @@ func_end:
1788 * Ensures: 1788 * Ensures:
1789 * Success: ProcObject state is PROC_IDLE 1789 * Success: ProcObject state is PROC_IDLE
1790 */ 1790 */
1791static int proc_monitor(struct proc_object *p_proc_object) 1791static int proc_monitor(struct proc_object *proc_obj)
1792{ 1792{
1793 int status = -EPERM; 1793 int status = -EPERM;
1794 struct msg_mgr *hmsg_mgr; 1794 struct msg_mgr *hmsg_mgr;
1795 int brd_state; 1795 int brd_state;
1796 1796
1797 DBC_REQUIRE(refs > 0); 1797 DBC_REQUIRE(refs > 0);
1798 DBC_REQUIRE(p_proc_object); 1798 DBC_REQUIRE(proc_obj);
1799 1799
1800 /* This is needed only when Device is loaded when it is 1800 /* This is needed only when Device is loaded when it is
1801 * already 'ACTIVE' */ 1801 * already 'ACTIVE' */
1802 /* Destory the Node Manager, msg_ctrl Manager */ 1802 /* Destory the Node Manager, msg_ctrl Manager */
1803 if (DSP_SUCCEEDED(dev_destroy2(p_proc_object->hdev_obj))) { 1803 if (DSP_SUCCEEDED(dev_destroy2(proc_obj->hdev_obj))) {
1804 /* Destroy the msg_ctrl by calling msg_delete */ 1804 /* Destroy the msg_ctrl by calling msg_delete */
1805 dev_get_msg_mgr(p_proc_object->hdev_obj, &hmsg_mgr); 1805 dev_get_msg_mgr(proc_obj->hdev_obj, &hmsg_mgr);
1806 if (hmsg_mgr) { 1806 if (hmsg_mgr) {
1807 msg_delete(hmsg_mgr); 1807 msg_delete(hmsg_mgr);
1808 dev_set_msg_mgr(p_proc_object->hdev_obj, NULL); 1808 dev_set_msg_mgr(proc_obj->hdev_obj, NULL);
1809 } 1809 }
1810 } 1810 }
1811 /* Place the Board in the Monitor State */ 1811 /* Place the Board in the Monitor State */
1812 if (DSP_SUCCEEDED((*p_proc_object->intf_fxns->pfn_brd_monitor) 1812 if (DSP_SUCCEEDED((*proc_obj->intf_fxns->pfn_brd_monitor)
1813 (p_proc_object->hbridge_context))) { 1813 (proc_obj->hbridge_context))) {
1814 status = 0; 1814 status = 0;
1815 if (DSP_SUCCEEDED((*p_proc_object->intf_fxns->pfn_brd_status) 1815 if (DSP_SUCCEEDED((*proc_obj->intf_fxns->pfn_brd_status)
1816 (p_proc_object->hbridge_context, &brd_state))) 1816 (proc_obj->hbridge_context, &brd_state)))
1817 DBC_ASSERT(brd_state == BRD_IDLE); 1817 DBC_ASSERT(brd_state == BRD_IDLE);
1818 } 1818 }
1819 1819
diff --git a/drivers/staging/tidspbridge/rmgr/rmm.c b/drivers/staging/tidspbridge/rmgr/rmm.c
index 0354b0f75c4..910132ff1d5 100644
--- a/drivers/staging/tidspbridge/rmgr/rmm.c
+++ b/drivers/staging/tidspbridge/rmgr/rmm.c
@@ -307,7 +307,7 @@ void rmm_exit(void)
307/* 307/*
308 * ======== rmm_free ======== 308 * ======== rmm_free ========
309 */ 309 */
310bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 addr, u32 size, 310bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr, u32 size,
311 bool reserved) 311 bool reserved)
312{ 312{
313 struct rmm_ovly_sect *sect; 313 struct rmm_ovly_sect *sect;
@@ -316,8 +316,9 @@ bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 addr, u32 size,
316 DBC_REQUIRE(target); 316 DBC_REQUIRE(target);
317 317
318 DBC_REQUIRE(reserved || segid < target->num_segs); 318 DBC_REQUIRE(reserved || segid < target->num_segs);
319 DBC_REQUIRE(reserved || (addr >= target->seg_tab[segid].base && 319 DBC_REQUIRE(reserved || (dsp_addr >= target->seg_tab[segid].base &&
320 (addr + size) <= (target->seg_tab[segid].base + 320 (dsp_addr + size) <= (target->seg_tab[segid].
321 base +
321 target->seg_tab[segid]. 322 target->seg_tab[segid].
322 length))); 323 length)));
323 324
@@ -325,7 +326,7 @@ bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 addr, u32 size,
325 * Free or unreserve memory. 326 * Free or unreserve memory.
326 */ 327 */
327 if (!reserved) { 328 if (!reserved) {
328 ret = free_block(target, segid, addr, size); 329 ret = free_block(target, segid, dsp_addr, size);
329 if (ret) 330 if (ret)
330 target->seg_tab[segid].number--; 331 target->seg_tab[segid].number--;
331 332
@@ -333,7 +334,7 @@ bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 addr, u32 size,
333 /* Unreserve memory */ 334 /* Unreserve memory */
334 sect = (struct rmm_ovly_sect *)lst_first(target->ovly_list); 335 sect = (struct rmm_ovly_sect *)lst_first(target->ovly_list);
335 while (sect != NULL) { 336 while (sect != NULL) {
336 if (addr == sect->addr) { 337 if (dsp_addr == sect->addr) {
337 DBC_ASSERT(size == sect->size); 338 DBC_ASSERT(size == sect->size);
338 /* Remove from list */ 339 /* Remove from list */
339 lst_remove_elem(target->ovly_list, 340 lst_remove_elem(target->ovly_list,
diff --git a/drivers/staging/tidspbridge/services/cfg.c b/drivers/staging/tidspbridge/services/cfg.c
index ac23b0917cd..86c8da4a0e0 100644
--- a/drivers/staging/tidspbridge/services/cfg.c
+++ b/drivers/staging/tidspbridge/services/cfg.c
@@ -111,7 +111,7 @@ int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
111 * Purpose: 111 * Purpose:
112 * Retreive the default executable, if any, for this board. 112 * Retreive the default executable, if any, for this board.
113 */ 113 */
114int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size, 114int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 buf_size,
115 OUT char *str_exec_file) 115 OUT char *str_exec_file)
116{ 116{
117 int status = 0; 117 int status = 0;
@@ -123,7 +123,7 @@ int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
123 else if (!str_exec_file || !drv_datap) 123 else if (!str_exec_file || !drv_datap)
124 status = -EFAULT; 124 status = -EFAULT;
125 125
126 if (strlen(drv_datap->base_img) > ul_buf_size) 126 if (strlen(drv_datap->base_img) > buf_size)
127 status = -EINVAL; 127 status = -EINVAL;
128 128
129 if (DSP_SUCCEEDED(status) && drv_datap->base_img) 129 if (DSP_SUCCEEDED(status) && drv_datap->base_img)
@@ -132,7 +132,7 @@ int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
132 if (DSP_FAILED(status)) 132 if (DSP_FAILED(status))
133 pr_err("%s: Failed, status 0x%x\n", __func__, status); 133 pr_err("%s: Failed, status 0x%x\n", __func__, status);
134 DBC_ENSURE(((status == 0) && 134 DBC_ENSURE(((status == 0) &&
135 (strlen(str_exec_file) <= ul_buf_size)) 135 (strlen(str_exec_file) <= buf_size))
136 || (status != 0)); 136 || (status != 0));
137 return status; 137 return status;
138} 138}