diff options
author | Rene Sapiens <rene.sapiens@ti.com> | 2011-01-18 03:19:08 +0000 |
---|---|---|
committer | Omar Ramirez Luna <omar.ramirez@ti.com> | 2011-02-04 20:12:17 -0600 |
commit | dab7f7fee09b28034af3cac527b16927e4e2a193 (patch) | |
tree | acac71303b1b821e00bcdc838497b7ff00eea3b0 /drivers/staging/tidspbridge/rmgr | |
parent | 09f133045c57c479cad02d44791534df3b5b056e (diff) |
staging: tidspbridge: set6 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:
Original: Replacement:
pfn_write write
pf_phase_split phase_split
ul_alignment alignment
ul_bufsize bufsize
ul_bufsize_rms bufsize_rms
ul_chnl_buf_size chnl_buf_size
ul_chnl_offset chnl_offset
ul_code_mem_seg_mask code_mem_seg_mask
ul_dais_arg dais_arg
ul_data1 data1
ul_data_mem_seg_mask data_mem_seg_mask
ul_dsp_addr dsp_addr
ul_dsp_res_addr dsp_res_addr
ul_dsp_size dsp_size
ul_dsp_va dsp_va
ul_dsp_virt dsp_virt
ul_entry entry
ul_external_mem_size external_mem_size
ul_fxn_addrs fxn_addrs
ul_gpp_pa gpp_pa
Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Diffstat (limited to 'drivers/staging/tidspbridge/rmgr')
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/dbdcd.c | 8 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/disp.c | 18 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/nldr.c | 52 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/node.c | 40 |
4 files changed, 59 insertions, 59 deletions
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c index 9e12a2c07f41..f0b396f07d15 100644 --- a/drivers/staging/tidspbridge/rmgr/dbdcd.c +++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c @@ -1227,14 +1227,14 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size, /* Dynamic load data requirements */ if (token) { - gen_obj->obj_data.node_obj.ul_data_mem_seg_mask = + gen_obj->obj_data.node_obj.data_mem_seg_mask = atoi(token); token = strsep(&psz_cur, seps); } /* Dynamic load code requirements */ if (token) { - gen_obj->obj_data.node_obj.ul_code_mem_seg_mask = + gen_obj->obj_data.node_obj.code_mem_seg_mask = atoi(token); token = strsep(&psz_cur, seps); } @@ -1288,7 +1288,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size, gen_obj->obj_data.proc_info.ul_internal_mem_size = atoi(token); token = strsep(&psz_cur, seps); - gen_obj->obj_data.proc_info.ul_external_mem_size = atoi(token); + gen_obj->obj_data.proc_info.external_mem_size = atoi(token); token = strsep(&psz_cur, seps); gen_obj->obj_data.proc_info.processor_id = atoi(token); @@ -1312,7 +1312,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size, token = strsep(&psz_cur, seps); gen_obj->obj_data.ext_proc_obj.ty_tlb[entry_id]. - ul_dsp_virt = atoi(token); + dsp_virt = atoi(token); } #endif diff --git a/drivers/staging/tidspbridge/rmgr/disp.c b/drivers/staging/tidspbridge/rmgr/disp.c index 02fc425eb6d9..49e38f36b05d 100644 --- a/drivers/staging/tidspbridge/rmgr/disp.c +++ b/drivers/staging/tidspbridge/rmgr/disp.c @@ -65,8 +65,8 @@ struct disp_object { struct chnl_object *chnl_to_dsp; /* Chnl for commands to RMS */ struct chnl_object *chnl_from_dsp; /* Chnl for replies from RMS */ u8 *pbuf; /* Buffer for commands, replies */ - u32 ul_bufsize; /* pbuf size in bytes */ - u32 ul_bufsize_rms; /* pbuf size in RMS words */ + u32 bufsize; /* buf size in bytes */ + u32 bufsize_rms; /* buf size in RMS words */ u32 char_size; /* Size of DSP character */ u32 word_size; /* Size of DSP word */ u32 data_mau_size; /* Size of DSP Data MAU */ @@ -140,14 +140,14 @@ int disp_create(struct disp_object **dispatch_obj, /* Open channels for communicating with the RMS */ chnl_attr_obj.uio_reqs = CHNLIOREQS; chnl_attr_obj.event_obj = NULL; - ul_chnl_id = disp_attrs->ul_chnl_offset + CHNLTORMSOFFSET; + ul_chnl_id = disp_attrs->chnl_offset + CHNLTORMSOFFSET; status = (*intf_fxns->chnl_open) (&(disp_obj->chnl_to_dsp), disp_obj->hchnl_mgr, CHNL_MODETODSP, ul_chnl_id, &chnl_attr_obj); if (!status) { - ul_chnl_id = disp_attrs->ul_chnl_offset + CHNLFROMRMSOFFSET; + ul_chnl_id = disp_attrs->chnl_offset + CHNLFROMRMSOFFSET; status = (*intf_fxns->chnl_open) (&(disp_obj->chnl_from_dsp), disp_obj->hchnl_mgr, @@ -156,9 +156,9 @@ int disp_create(struct disp_object **dispatch_obj, } if (!status) { /* Allocate buffer for commands, replies */ - disp_obj->ul_bufsize = disp_attrs->ul_chnl_buf_size; - disp_obj->ul_bufsize_rms = RMS_COMMANDBUFSIZE; - disp_obj->pbuf = kzalloc(disp_obj->ul_bufsize, GFP_KERNEL); + disp_obj->bufsize = disp_attrs->chnl_buf_size; + disp_obj->bufsize_rms = RMS_COMMANDBUFSIZE; + disp_obj->pbuf = kzalloc(disp_obj->bufsize, GFP_KERNEL); if (disp_obj->pbuf == NULL) status = -ENOMEM; } @@ -295,7 +295,7 @@ int disp_node_create(struct disp_object *disp_obj, DBC_REQUIRE(pargs != NULL); node_type = node_get_type(hnode); node_msg_args = pargs->asa.node_msg_args; - max = disp_obj->ul_bufsize_rms; /*Max # of RMS words that can be sent */ + max = disp_obj->bufsize_rms; /*Max # of RMS words that can be sent */ DBC_ASSERT(max == RMS_COMMANDBUFSIZE); chars_in_rms_word = sizeof(rms_word) / disp_obj->char_size; /* Number of RMS words needed to hold arg data */ @@ -404,7 +404,7 @@ int disp_node_create(struct disp_object *disp_obj, more_task_args->stack_seg = task_arg_obj.stack_seg; more_task_args->heap_addr = task_arg_obj.udsp_heap_addr; more_task_args->heap_size = task_arg_obj.heap_size; - more_task_args->misc = task_arg_obj.ul_dais_arg; + more_task_args->misc = task_arg_obj.dais_arg; more_task_args->num_input_streams = task_arg_obj.num_inputs; total += diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c index 0537346bcb6c..688d9658ed60 100644 --- a/drivers/staging/tidspbridge/rmgr/nldr.c +++ b/drivers/staging/tidspbridge/rmgr/nldr.c @@ -220,7 +220,7 @@ struct nldr_nodeobject { struct dsp_uuid uuid; /* Node's UUID */ bool dynamic; /* Dynamically loaded node? */ bool overlay; /* Overlay node? */ - bool *pf_phase_split; /* Multiple phase libraries? */ + bool *phase_split; /* Multiple phase libraries? */ struct lib_node root; /* Library containing node phase */ struct lib_node create_lib; /* Library with create phase lib */ struct lib_node execute_lib; /* Library with execute phase lib */ @@ -326,7 +326,7 @@ int nldr_allocate(struct nldr_object *nldr_obj, void *priv_ref, if (nldr_node_obj == NULL) { status = -ENOMEM; } else { - nldr_node_obj->pf_phase_split = pf_phase_split; + nldr_node_obj->phase_split = pf_phase_split; nldr_node_obj->pers_libs = 0; nldr_node_obj->nldr_obj = nldr_obj; nldr_node_obj->priv_ref = priv_ref; @@ -344,44 +344,44 @@ int nldr_allocate(struct nldr_object *nldr_obj, void *priv_ref, */ /* Create phase */ nldr_node_obj->seg_id[CREATEDATAFLAGBIT] = (u16) - (node_props->ul_data_mem_seg_mask >> CREATEBIT) & + (node_props->data_mem_seg_mask >> CREATEBIT) & SEGMASK; nldr_node_obj->code_data_flag_mask |= - ((node_props->ul_data_mem_seg_mask >> + ((node_props->data_mem_seg_mask >> (CREATEBIT + FLAGBIT)) & 1) << CREATEDATAFLAGBIT; nldr_node_obj->seg_id[CREATECODEFLAGBIT] = (u16) - (node_props->ul_code_mem_seg_mask >> + (node_props->code_mem_seg_mask >> CREATEBIT) & SEGMASK; nldr_node_obj->code_data_flag_mask |= - ((node_props->ul_code_mem_seg_mask >> + ((node_props->code_mem_seg_mask >> (CREATEBIT + FLAGBIT)) & 1) << CREATECODEFLAGBIT; /* Execute phase */ nldr_node_obj->seg_id[EXECUTEDATAFLAGBIT] = (u16) - (node_props->ul_data_mem_seg_mask >> + (node_props->data_mem_seg_mask >> EXECUTEBIT) & SEGMASK; nldr_node_obj->code_data_flag_mask |= - ((node_props->ul_data_mem_seg_mask >> + ((node_props->data_mem_seg_mask >> (EXECUTEBIT + FLAGBIT)) & 1) << EXECUTEDATAFLAGBIT; nldr_node_obj->seg_id[EXECUTECODEFLAGBIT] = (u16) - (node_props->ul_code_mem_seg_mask >> + (node_props->code_mem_seg_mask >> EXECUTEBIT) & SEGMASK; nldr_node_obj->code_data_flag_mask |= - ((node_props->ul_code_mem_seg_mask >> + ((node_props->code_mem_seg_mask >> (EXECUTEBIT + FLAGBIT)) & 1) << EXECUTECODEFLAGBIT; /* Delete phase */ nldr_node_obj->seg_id[DELETEDATAFLAGBIT] = (u16) - (node_props->ul_data_mem_seg_mask >> DELETEBIT) & + (node_props->data_mem_seg_mask >> DELETEBIT) & SEGMASK; nldr_node_obj->code_data_flag_mask |= - ((node_props->ul_data_mem_seg_mask >> + ((node_props->data_mem_seg_mask >> (DELETEBIT + FLAGBIT)) & 1) << DELETEDATAFLAGBIT; nldr_node_obj->seg_id[DELETECODEFLAGBIT] = (u16) - (node_props->ul_code_mem_seg_mask >> + (node_props->code_mem_seg_mask >> DELETEBIT) & SEGMASK; nldr_node_obj->code_data_flag_mask |= - ((node_props->ul_code_mem_seg_mask >> + ((node_props->code_mem_seg_mask >> (DELETEBIT + FLAGBIT)) & 1) << DELETECODEFLAGBIT; } else { /* Non-dynamically loaded nodes are part of the @@ -430,7 +430,7 @@ int nldr_create(struct nldr_object **nldr, DBC_REQUIRE(hdev_obj != NULL); DBC_REQUIRE(pattrs != NULL); DBC_REQUIRE(pattrs->ovly != NULL); - DBC_REQUIRE(pattrs->pfn_write != NULL); + DBC_REQUIRE(pattrs->write != NULL); /* Allocate dynamic loader object */ nldr_obj = kzalloc(sizeof(struct nldr_object), GFP_KERNEL); @@ -533,9 +533,9 @@ int nldr_create(struct nldr_object **nldr, new_attrs.free = (dbll_free_fxn) remote_free; new_attrs.sym_lookup = (dbll_sym_lookup) get_symbol_value; new_attrs.sym_handle = nldr_obj; - new_attrs.write = (dbll_write_fxn) pattrs->pfn_write; + new_attrs.write = (dbll_write_fxn) pattrs->write; nldr_obj->ovly_fxn = pattrs->ovly; - nldr_obj->write_fxn = pattrs->pfn_write; + nldr_obj->write_fxn = pattrs->write; nldr_obj->ldr_attrs = new_attrs; } kfree(rmm_segs); @@ -678,7 +678,7 @@ int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj, nldr_obj = nldr_node_obj->nldr_obj; /* Called from node_create(), node_delete(), or node_run(). */ - if (nldr_node_obj->dynamic && *nldr_node_obj->pf_phase_split) { + if (nldr_node_obj->dynamic && *nldr_node_obj->phase_split) { switch (nldr_node_obj->phase) { case NLDR_CREATE: root = nldr_node_obj->create_lib; @@ -821,7 +821,7 @@ int nldr_load(struct nldr_nodeobject *nldr_node_obj, false, nldr_node_obj->lib_path, phase, 0); if (!status) { - if (*nldr_node_obj->pf_phase_split) { + if (*nldr_node_obj->phase_split) { switch (phase) { case NLDR_CREATE: nldr_node_obj->create_lib = @@ -868,7 +868,7 @@ int nldr_unload(struct nldr_nodeobject *nldr_node_obj, if (nldr_node_obj != NULL) { if (nldr_node_obj->dynamic) { - if (*nldr_node_obj->pf_phase_split) { + if (*nldr_node_obj->phase_split) { switch (phase) { case NLDR_CREATE: root_lib = &nldr_node_obj->create_lib; @@ -1264,7 +1264,7 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj, dcd_get_library_name(nldr_node_obj->nldr_obj-> hdcd_mgr, &uuid, psz_file_name, &dw_buf_size, phase, - nldr_node_obj->pf_phase_split); + nldr_node_obj->phase_split); } else { /* Dependent libraries are registered with a phase */ status = @@ -1314,7 +1314,7 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj, } DBC_ASSERT(nd_libs >= np_libs); if (!status) { - if (!(*nldr_node_obj->pf_phase_split)) + if (!(*nldr_node_obj->phase_split)) np_libs = 0; /* nd_libs = #of dependent libraries */ @@ -1359,7 +1359,7 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj, * is, then record it. If root library IS persistent, * the deplib is already included */ if (!root_prstnt && persistent_dep_libs[i] && - *nldr_node_obj->pf_phase_split) { + *nldr_node_obj->phase_split) { if ((nldr_node_obj->pers_libs) >= MAXLIBS) { status = -EILSEQ; break; @@ -1385,11 +1385,11 @@ static int load_lib(struct nldr_nodeobject *nldr_node_obj, if (!status) { if ((status != 0) && !root_prstnt && persistent_dep_libs[i] && - *nldr_node_obj->pf_phase_split) { + *nldr_node_obj->phase_split) { (nldr_node_obj->pers_libs)++; } else { if (!persistent_dep_libs[i] || - !(*nldr_node_obj->pf_phase_split)) { + !(*nldr_node_obj->phase_split)) { nd_libs_loaded++; } } @@ -1903,7 +1903,7 @@ int nldr_find_addr(struct nldr_nodeobject *nldr_node, u32 sym_addr, pr_debug("%s(0x%x, 0x%x, 0x%x, 0x%x, %s)\n", __func__, (u32) nldr_node, sym_addr, offset_range, (u32) offset_output, sym_name); - if (nldr_node->dynamic && *nldr_node->pf_phase_split) { + if (nldr_node->dynamic && *nldr_node->phase_split) { switch (nldr_node->phase) { case NLDR_CREATE: root = nldr_node->create_lib; diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c index 8008a5c0022b..4e6a63e745b1 100644 --- a/drivers/staging/tidspbridge/rmgr/node.c +++ b/drivers/staging/tidspbridge/rmgr/node.c @@ -142,13 +142,13 @@ struct node_mgr { DECLARE_BITMAP(zc_chnl_map, CHNL_MAXCHANNELS); struct ntfy_object *ntfy_obj; /* Manages registered notifications */ struct mutex node_mgr_lock; /* For critical sections */ - u32 ul_fxn_addrs[NUMRMSFXNS]; /* RMS function addresses */ + u32 fxn_addrs[NUMRMSFXNS]; /* RMS function addresses */ struct msg_mgr *msg_mgr_obj; /* Processor properties needed by Node Dispatcher */ u32 ul_num_chnls; /* Total number of channels */ - u32 ul_chnl_offset; /* Offset of chnl ids rsvd for RMS */ - u32 ul_chnl_buf_size; /* Buffer size for data to RMS */ + u32 chnl_offset; /* Offset of chnl ids rsvd for RMS */ + u32 chnl_buf_size; /* Buffer size for data to RMS */ int proc_family; /* eg, 5000 */ int proc_type; /* eg, 5510 */ u32 udsp_word_size; /* Size of DSP word on host bytes */ @@ -367,7 +367,7 @@ int node_allocate(struct proc_object *hprocessor, } /* Assuming that 0 is not a valid function address */ - if (hnode_mgr->ul_fxn_addrs[0] == 0) { + if (hnode_mgr->fxn_addrs[0] == 0) { /* No RMS on target - we currently can't handle this */ pr_err("%s: Failed, no RMS in base image\n", __func__); status = -EPERM; @@ -813,7 +813,7 @@ int node_change_priority(struct node_object *hnode, s32 prio) status = disp_node_change_priority(hnode_mgr->disp_obj, hnode, - hnode_mgr->ul_fxn_addrs + hnode_mgr->fxn_addrs [RMSCHANGENODEPRIORITY], hnode->node_env, prio); } @@ -1216,14 +1216,14 @@ int node_create(struct node_object *hnode) hnode->dcd_props.obj_data.node_obj. pstr_i_alg_name, &hnode->create_args.asa. - task_arg_obj.ul_dais_arg); + task_arg_obj.dais_arg); } } } if (!status) { if (node_type != NODE_DEVICE) { status = disp_node_create(hnode_mgr->disp_obj, hnode, - hnode_mgr->ul_fxn_addrs + hnode_mgr->fxn_addrs [RMSCREATENODE], ul_create_fxn, &(hnode->create_args), @@ -1324,8 +1324,8 @@ int node_create_mgr(struct node_mgr **node_man, goto out_err; /* Create NODE Dispatcher */ - disp_attr_obj.ul_chnl_offset = node_mgr_obj->ul_chnl_offset; - disp_attr_obj.ul_chnl_buf_size = node_mgr_obj->ul_chnl_buf_size; + disp_attr_obj.chnl_offset = node_mgr_obj->chnl_offset; + disp_attr_obj.chnl_buf_size = node_mgr_obj->chnl_buf_size; disp_attr_obj.proc_family = node_mgr_obj->proc_family; disp_attr_obj.proc_type = node_mgr_obj->proc_type; @@ -1344,12 +1344,12 @@ int node_create_mgr(struct node_mgr **node_man, mutex_init(&node_mgr_obj->node_mgr_lock); /* Block out reserved channels */ - for (i = 0; i < node_mgr_obj->ul_chnl_offset; i++) + for (i = 0; i < node_mgr_obj->chnl_offset; i++) set_bit(i, node_mgr_obj->chnl_map); /* Block out channels reserved for RMS */ - set_bit(node_mgr_obj->ul_chnl_offset, node_mgr_obj->chnl_map); - set_bit(node_mgr_obj->ul_chnl_offset + 1, node_mgr_obj->chnl_map); + set_bit(node_mgr_obj->chnl_offset, node_mgr_obj->chnl_map); + set_bit(node_mgr_obj->chnl_offset + 1, node_mgr_obj->chnl_map); /* NO RM Server on the IVA */ if (dev_type != IVA_UNIT) { @@ -1363,7 +1363,7 @@ int node_create_mgr(struct node_mgr **node_man, node_mgr_obj->nldr_fxns = nldr_fxns; /* Dyn loader funcs */ nldr_attrs_obj.ovly = ovly; - nldr_attrs_obj.pfn_write = mem_write; + nldr_attrs_obj.write = mem_write; nldr_attrs_obj.us_dsp_word_size = node_mgr_obj->udsp_word_size; nldr_attrs_obj.us_dsp_mau_size = node_mgr_obj->udsp_mau_size; node_mgr_obj->loader_init = node_mgr_obj->nldr_fxns.init(); @@ -1489,7 +1489,7 @@ func_cont1: status = disp_node_delete(disp_obj, pnode, hnode_mgr-> - ul_fxn_addrs + fxn_addrs [RMSDELETENODE], ul_delete_fxn, pnode->node_env); @@ -2012,7 +2012,7 @@ int node_pause(struct node_object *hnode) } status = disp_node_change_priority(hnode_mgr->disp_obj, hnode, - hnode_mgr->ul_fxn_addrs[RMSCHANGENODEPRIORITY], + hnode_mgr->fxn_addrs[RMSCHANGENODEPRIORITY], hnode->node_env, NODE_SUSPENDEDPRI); /* Update state */ @@ -2274,14 +2274,14 @@ int node_run(struct node_object *hnode) } } if (!status) { - ul_fxn_addr = hnode_mgr->ul_fxn_addrs[RMSEXECUTENODE]; + ul_fxn_addr = hnode_mgr->fxn_addrs[RMSEXECUTENODE]; status = disp_node_run(hnode_mgr->disp_obj, hnode, ul_fxn_addr, ul_execute_fxn, hnode->node_env); } } else if (state == NODE_PAUSED) { - ul_fxn_addr = hnode_mgr->ul_fxn_addrs[RMSCHANGENODEPRIORITY]; + ul_fxn_addr = hnode_mgr->fxn_addrs[RMSCHANGENODEPRIORITY]; status = disp_node_change_priority(hnode_mgr->disp_obj, hnode, ul_fxn_addr, hnode->node_env, NODE_GET_PRIORITY(hnode)); @@ -2902,8 +2902,8 @@ static int get_proc_props(struct node_mgr *hnode_mgr, host_res = pbridge_context->resources; if (!host_res) return -EPERM; - hnode_mgr->ul_chnl_offset = host_res->chnl_offset; - hnode_mgr->ul_chnl_buf_size = host_res->chnl_buf_size; + hnode_mgr->chnl_offset = host_res->chnl_offset; + hnode_mgr->chnl_buf_size = host_res->chnl_buf_size; hnode_mgr->ul_num_chnls = host_res->num_chnls; /* @@ -3024,7 +3024,7 @@ static int get_rms_fxns(struct node_mgr *hnode_mgr) for (i = 0; i < NUMRMSFXNS; i++) { status = dev_get_symbol(dev_obj, psz_fxns[i], - &(hnode_mgr->ul_fxn_addrs[i])); + &(hnode_mgr->fxn_addrs[i])); if (status) { if (status == -ESPIPE) { /* |