staging:tidspbridge - Remove hungarian notation from structures
cover staging:tidspbridge - Remove hungarian notation from structures
This series of patches remove the hungarian notation from the structure's elements.
The words to be renamed are:
Original Replacement:
---------------- ----------------
dw_api_reg_base api_reg_base dw_brd_state brd_state dw_chnl_buf_size chnl_buf_size dw_chnl_offset chnl_offset dw_cmd cmd dw_core_pm_base core_pm_base dw_dsp_base dsp_base dw_dsp_base_va dsp_base_va dw_dsp_bufs dsp_bufs dw_dsp_buf_size dsp_buf_size dw_dsp_clk_m2_base dsp_clk_m2_base dw_dsp_ext_base_addr dsp_ext_base_addr dw_dsp_phys_addr_offset dsp_phys_addr_offset dw_dsp_start_add dsp_start_add dw_err_mask err_mask dw_gpp_base_pa gpp_base_pa dw_api_clk_base api_clk_base dw_api_reg_base api_reg_base dw_arg arg dw_arg1 arg1 dw_arg2 arg2 dw_chnl_buf_size chnl_buf_size dw_dsp_base_addr dsp_base_addr dw_dmmu_base dmmu_base dw_index index dw_int_addr int_addr dw_internal_size internal_size dw_last_output last_output dw_mem_base mem_base dw_mem_length mem_length dw_mem_phys mem_phys dw_mode mode dw_num_chnls num_chnls dw_offset_for_monitor offset_for_monitor dw_output_mask output_mask dw_page_size page_size dw_pa pa dw_per_base per_base dw_per_pm_base per_pm_base dw_public_rhea public_rhea dw_seg_base_pa seg_base_pa dw_seg_base_va seg_base_va dw_self_loop self_loop dw_state state dw_tc_endianism tc_endianism dw_test_base test_base dw_type type dw_val1 val1 dw_val2 val2 dw_val3 val3 dw_va va dw_virt_base virt_base dw_vm_base vm_base dw_vm_size vm_size pfn_allocate allocate pfn_brd_mem_copy brd_mem_copy pfn_brd_mem_map brd_mem_map pfn_brd_mem_un_map brd_mem_un_map pfn_brd_mem_write brd_mem_write pfn_brd_monitor brd_monitor pfn_brd_read brd_read pfn_brd_set_state brd_set_state pfn_brd_start brd_start pfn_brd_status brd_status pfn_brd_stop brd_stop pfn_brd_write brd_write pfn_chnl_add_io_req chnl_add_io_req pfn_chnl_cancel_io chnl_cancel_io pfn_chnl_close chnl_close pfn_chnl_create chnl_create pfn_chnl_destroy chnl_destroy pfn_chnl_flush_io chnl_flush_io pfn_chnl_get_info chnl_get_info pfn_chnl_get_ioc chnl_get_ioc pfn_chnl_get_mgr_info chnl_get_mgr_info pfn_chnl_idle chnl_idle pfn_chnl_open chnl_open
pfn_chnl_register_notify chnl_register_notifypfn_create createpfn_delete deletepfn_dev_cntrl dev_cntrl
pfn_dev_create by dev_create pfn_dev_destroy dev_destroy pfn_exit exit pfn_get_fxn_addr get_fxn_addr pfn_init init pfn_io_create io_create pfn_io_destroy io_destroy pfn_io_get_proc_load io_get_proc_load pfn_io_on_loaded io_on_loaded pfn_load load pfn_msg_create msg_create pfn_msg_create_queue msg_create_queue pfn_msg_delete msg_delete pfn_msg_delete_queue msg_delete_queue pfn_msg_get msg_get pfn_msg_put msg_put pfn_msg_register_notify msg_register_notify pfn_msg_set_queue_id msg_set_queue_id pfn_ovly ovly pfn_unload unload 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 ul_gpp_phys gpp_phys ul_gpp_read_pointer gpp_read_pointer ul_gpp_size gpp_size ul_gpp_va gpp_va ul_heap_size heap_size ul_internal_mem_size internal_mem_size ul_in_use_cnt in_use_cnt ul_len_max_free_block len_max_free_block ul_max max ul_min_block_size min_block_size ul_min min ul_mpu_addr mpu_addr ul_n_bytes bytes ul_num_alloc_blocks num_alloc_blocks ul_number_bytes number_bytes ul_num_chnls num_chnls ul_num_free_blocks num_free_blocks ul_num_gppsm_segs num_gppsm_segs ul_pos pos ul_reserved reserved hbridge_context bridge_context hchnl_mgr chnl_mgr hcmm_mgr cmm_mgr hdcd_mgr dcd_mgr hdeh_mgr deh_mgr hdev_obj dev_obj hdrv_obj drv_obj hmgr_obj mgr_obj hmsg_mgr msg_mgr hnode_mgr node_mgr psz_last_coff last_coff ul_resource resource ul_seg_id seg_id ul_size size ul_sm_size sm_size ul_total_free_size total_free_size ul_total_in_use_cnt total_in_use_cnt ul_total_seg_size total_seg_size ul_trace_buffer_begin trace_buffer_begin ul_trace_buffer_current trace_buffer_current ul_trace_buffer_end trace_buffer_end ul_unit unit ul_virt_size virt_size us_dsp_mau_size dsp_mau_size us_dsp_word_size dsp_word_size hprocessor processor udma_priority dma_priority udsp_data_mau_size dsp_data_mau_size udsp_heap_addr dsp_heap_addr udsp_heap_res_addr dsp_heap_res_addr udsp_heap_virt_addr dsp_heap_virt_addr udsp_mau_size dsp_mau_size udsp_word_size dsp_word_size ugpp_heap_addr gpp_heap_addr ugpp_heap_virt_addr gpp_heap_virt_addr us_data2 data2 us_data3 data3 uc_data4 data4 uc_data5 data5 uc_data6 data6 us_load_type load_type usm_length sm_length utimeout timeout uwc_deadline wc_deadline uwc_execution_time wc_execution_time uwc_period wc_period hnext next hnode node hprev prev hroot root hstream stream pbuf buf pcb_arg cb_arg pdspheap_list dspheap_list pmsg msg ps_name name pstr_create_phase_fxn str_create_phase_fxn pstr_delete_phase_fxn str_delete_phase_fxn pstr_dev_name str_dev_name pstr_event_name str_event_name pstr_execute_phase_fxn str_execute_phase_fxn pstr_i_alg_name str_i_alg_name udma_chnl_id dma_chnl_id un_bufs_in_strm bufs_in_strm usm_buf_size sm_buf_size hio_mgr io_mgr dw_api_reg_base api_reg_base dw_api_clk_base api_clk_base ap_channel channels pio_requests io_requests pio_completions io_completions pndb_props ndb_props pndb_props_size ndb_props_size pu_num_nodes num_nodes pu_num_procs num_procs psz_path_name sz_path_name pu_index index pargs args pu_allocated allocated psize size hnotification notification pp_rsv_addr rsv_addr prsv_addr rsv_addr pmpu_addr mpu_addr pp_map_addr map_addr ul_map_attr map_attr undb_props_size ndb_props_size dw_buf_size buf_size dw_bytes bytes pattr attr pdw_arg arg ph_cmm_mgr cmm_mgr ph_event event ph_node node ph_stream stream pmask mask pp_argv argv pp_buf_va buf_va pstatus status ul_flags flags ul_seg_id seg_id usize size
Rene Sapiens (12):
staging:tidspbridge - set1 remove hungarian from structs staging:tidspbridge - set2 remove hungarian from structs staging:tidspbridge - set3 remove hungarian from structs staging:tidspbridge - set4 remove hungarian from structs staging:tidspbridge - set5 remove hungarian from structs staging:tidspbridge - set6 remove hungarian from structs staging:tidspbridge - set7 remove hungarian from structs staging:tidspbridge - set8 remove hungarian from structs staging:tidspbridge - set9 remove hungarian from structs staging:tidspbridge - set10 remove hungarian from structs staging:tidspbridge - set11 remove hungarian from structs staging:tidspbridge - set12 remove hungarian from structs
drivers/staging/tidspbridge/core/_deh.h | 2 +- drivers/staging/tidspbridge/core/_msg_sm.h | 4 +- drivers/staging/tidspbridge/core/_tiomap.h | 30 +- drivers/staging/tidspbridge/core/chnl_sm.c | 120 +++--- drivers/staging/tidspbridge/core/io_sm.c | 384 +++++++++--------- drivers/staging/tidspbridge/core/msg_sm.c | 22 +- drivers/staging/tidspbridge/core/tiomap3430.c | 194 +++++----- drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 108 +++--- drivers/staging/tidspbridge/core/tiomap_io.c | 92 +++--- drivers/staging/tidspbridge/core/ue_deh.c | 28 +- drivers/staging/tidspbridge/dynload/cload.c | 42 +- .../staging/tidspbridge/dynload/dload_internal.h | 6 +- drivers/staging/tidspbridge/gen/uuidutil.c | 22 +- .../tidspbridge/include/dspbridge/_chnl_sm.h | 22 +- .../tidspbridge/include/dspbridge/cfgdefs.h | 34 +- .../tidspbridge/include/dspbridge/chnldefs.h | 6 +- .../tidspbridge/include/dspbridge/chnlpriv.h | 8 +- .../staging/tidspbridge/include/dspbridge/cmm.h | 2 +- .../tidspbridge/include/dspbridge/cmmdefs.h | 38 +- .../staging/tidspbridge/include/dspbridge/cod.h | 2 +- .../tidspbridge/include/dspbridge/dbdcddef.h | 14 +- .../staging/tidspbridge/include/dspbridge/dbdefs.h | 72 ++-- .../staging/tidspbridge/include/dspbridge/dev.h | 6 +- .../tidspbridge/include/dspbridge/dispdefs.h | 4 +- .../staging/tidspbridge/include/dspbridge/drv.h | 16 +- .../tidspbridge/include/dspbridge/dspapi-ioctl.h | 212 +++++----- .../tidspbridge/include/dspbridge/dspdefs.h | 78 ++-- .../tidspbridge/include/dspbridge/dspioctl.h | 8 +- .../staging/tidspbridge/include/dspbridge/iodefs.h | 2 +- .../tidspbridge/include/dspbridge/mgrpriv.h | 4 +- .../tidspbridge/include/dspbridge/nldrdefs.h | 24 +- .../tidspbridge/include/dspbridge/nodepriv.h | 10 +- .../tidspbridge/include/dspbridge/strmdefs.h | 4 +- drivers/staging/tidspbridge/pmgr/chnl.c | 4 +- drivers/staging/tidspbridge/pmgr/cmm.c | 224 ++++++------ drivers/staging/tidspbridge/pmgr/cod.c | 6 +- drivers/staging/tidspbridge/pmgr/dbll.c | 12 +- drivers/staging/tidspbridge/pmgr/dev.c | 268 +++++++------- drivers/staging/tidspbridge/pmgr/dspapi.c | 272 +++++++------- drivers/staging/tidspbridge/pmgr/io.c | 8 +- drivers/staging/tidspbridge/pmgr/ioobj.h | 4 +- drivers/staging/tidspbridge/pmgr/msg.c | 4 +- drivers/staging/tidspbridge/rmgr/dbdcd.c | 58 ++-- drivers/staging/tidspbridge/rmgr/disp.c | 82 ++-- drivers/staging/tidspbridge/rmgr/drv.c | 86 ++-- drivers/staging/tidspbridge/rmgr/mgr.c | 16 +- drivers/staging/tidspbridge/rmgr/nldr.c | 114 +++--- drivers/staging/tidspbridge/rmgr/node.c | 414 ++++++++++---------- drivers/staging/tidspbridge/rmgr/proc.c | 168 ++++---- drivers/staging/tidspbridge/rmgr/pwr.c | 8 +- drivers/staging/tidspbridge/rmgr/rmm.c | 18 +- drivers/staging/tidspbridge/rmgr/strm.c | 86 ++-- 52 files changed, 1736 insertions(+), 1736 deletions(-)
PATCH 1/12 staging:tidspbridge - set1 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: dw_api_reg_base api_reg_base dw_brd_state brd_state dw_chnl_buf_size chnl_buf_size dw_chnl_offset chnl_offset dw_cmd cmd dw_core_pm_base core_pm_base dw_dsp_base dsp_base dw_dsp_base_va dsp_base_va dw_dsp_bufs dsp_bufs dw_dsp_buf_size dsp_buf_size dw_dsp_clk_m2_base dsp_clk_m2_base dw_dsp_ext_base_addr dsp_ext_base_addr dw_dsp_phys_addr_offset dsp_phys_addr_offset dw_dsp_start_add dsp_start_add dw_err_mask err_mask dw_gpp_base_pa gpp_base_pa dw_api_clk_base api_clk_base dw_api_reg_base api_reg_base dw_arg arg dw_arg1 arg1 dw_arg2 arg2 dw_chnl_buf_size chnl_buf_size
--- drivers/staging/tidspbridge/core/_tiomap.h | 10 ++-- drivers/staging/tidspbridge/core/chnl_sm.c | 6 +- drivers/staging/tidspbridge/core/io_sm.c | 38 +++++++------- drivers/staging/tidspbridge/core/tiomap3430.c | 50 ++++++++++---------- drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 38 +++++++------- drivers/staging/tidspbridge/core/tiomap_io.c | 38 +++++++------- drivers/staging/tidspbridge/core/ue_deh.c | 4 +- .../tidspbridge/include/dspbridge/_chnl_sm.h | 2 +- .../tidspbridge/include/dspbridge/cfgdefs.h | 10 ++-- .../tidspbridge/include/dspbridge/chnldefs.h | 2 +- .../tidspbridge/include/dspbridge/cmmdefs.h | 8 ++-- .../staging/tidspbridge/include/dspbridge/dbdefs.h | 8 ++-- .../tidspbridge/include/dspbridge/dspapi-ioctl.h | 4 +- drivers/staging/tidspbridge/pmgr/cmm.c | 22 ++++---- drivers/staging/tidspbridge/pmgr/dspapi.c | 4 +- drivers/staging/tidspbridge/rmgr/drv.c | 10 ++-- drivers/staging/tidspbridge/rmgr/node.c | 28 ++++++------ drivers/staging/tidspbridge/rmgr/strm.c | 2 +- 18 files changed, 142 insertions(+), 142 deletions(-)
drivers/staging/tidspbridge/core/_tiomap.h +5 -5
@@ -309,22 +309,22 @@ static const struct bpwr_clk_t bpwr_clks[] = {/* This Bridge driver's device context: */ struct bridge_dev_context {struct dev_object *hdev_obj;/* Handle to Bridge device object. */ -u32 dw_dsp_base_addr;/* Arm's API to DSP virt base addr */ +u32 dsp_base_addr;/* Arm's API to DSP virt base addr */ /* * DSP External memory prog address as seen virtually by the OS on * the host side. */ -u32 dw_dsp_ext_base_addr;/* See the comment above */ +u32 dsp_ext_base_addr;/* See the comment above */ u32 dw_api_reg_base;/* API mem map'd registers */ void __iomem *dw_dsp_mmu_base;/* DSP MMU Mapped registers */ u32 dw_api_clk_base;/* CLK Registers */ -u32 dw_dsp_clk_m2_base;/* DSP Clock Module m2 */ +u32 dsp_clk_m2_base;/* DSP Clock Module m2 */ u32 dw_public_rhea;/* Pub Rhea */ u32 dw_int_addr;/* MB INTR reg */ u32 dw_tc_endianism;/* TC Endianism register */ u32 dw_test_base;/* DSP MMU Mapped registers */ u32 dw_self_loop;/* Pointer to the selfloop */ -u32 dw_dsp_start_add;/* API Boot vector */ +u32 dsp_start_add;/* API Boot vector */ u32 dw_internal_size;/* Internal memory size */ struct omap_mbox *mbox;/* Mail box handle */
@@ -337,7 +337,7 @@ struct bridge_dev_context {*/ /* DMMU TLB entries */ struct bridge_ioctl_extproc atlb_entry[BRDIOCTL_NUMOFMMUTLB ]; -u32 dw_brd_state;/* Last known board state. */ +u32 brd_state;/* Last known board state. */ /* TC Settings */ bool tc_word_swap_on;/* Traffic Controller Word Swap */
drivers/staging/tidspbridge/core/chnl_sm.c +3 -3
@@ -196,7 +196,7 @@ func_cont: chnl_packet_obj->byte_size = byte_size; chnl_packet_obj->buf_size = buf_size;/* Only valid for output channel */ - chnl_packet_obj->dw_arg = dw_arg; + chnl_packet_obj->arg = dw_arg; chnl_packet_obj->status = (is_eos ?CHNL_IOCSTATEOS :CHNL_IOCSTATCOMPLETE );list_add_tail (&chnl_packet_obj->link, &pchnl->pio_requests);
@@ -607,7 +607,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout, ioc.pbuf = chnl_packet_obj->host_user_buf; ioc.byte_size = chnl_packet_obj->byte_size; ioc.buf_size = chnl_packet_obj->buf_size; - ioc.dw_arg = chnl_packet_obj->dw_arg; + ioc.arg = chnl_packet_obj->arg; ioc.status |= chnl_packet_obj->status;/* Place the used chirp on the free list: */ list_add_tail(&chnl_packet_obj->link,
@@ -615,7 +615,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout, }else { ioc.pbuf =NULL ; ioc.byte_size =0 ; - ioc.dw_arg =0 ; + ioc.arg =0 ; ioc.buf_size =0 ; }/* Ensure invariant: If any IOC's are queued for this channel... */
drivers/staging/tidspbridge/core/io_sm.c +19 -19
@@ -1113,7 +1113,7 @@ static void input_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl, pio_mgr->input, bytes); pchnl->bytes_moved += bytes; chnl_packet_obj->byte_size = bytes; - chnl_packet_obj->dw_arg = dw_arg; + chnl_packet_obj->arg = dw_arg; chnl_packet_obj->status =CHNL_IOCSTATCOMPLETE ;if (bytes ==0 ) {
@@ -1200,14 +1200,14 @@ static void input_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr) msg_input = pio_mgr->msg_input;for (i =0 ; i < num_msgs; i++) {/* Read the next message */ - addr = (u32) &(((struct msg_dspmsg *)msg_input)->msg.dw_cmd); - msg.msg.dw_cmd = + addr = (u32) &(((struct msg_dspmsg *)msg_input)->msg.cmd); + msg.msg.cmd =read_ext32_bit_dsp_data (pio_mgr->hbridge_context, addr); - addr = (u32) &(((struct msg_dspmsg *)msg_input)->msg.dw_arg1); - msg.msg.dw_arg1 = + addr = (u32) &(((struct msg_dspmsg *)msg_input)->msg.arg1); + msg.msg.arg1 =read_ext32_bit_dsp_data (pio_mgr->hbridge_context, addr); - addr = (u32) &(((struct msg_dspmsg *)msg_input)->msg.dw_arg2); - msg.msg.dw_arg2 = + addr = (u32) &(((struct msg_dspmsg *)msg_input)->msg.arg2); + msg.msg.arg2 =read_ext32_bit_dsp_data (pio_mgr->hbridge_context, addr); addr = (u32) &(((struct msg_dspmsg *)msg_input)->msgq_id); msg.msgq_id =
@@ -1215,9 +1215,9 @@ static void input_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr) msg_input +=sizeof (struct msg_dspmsg );/* Determine which queue to put the message in */ -dev_dbg (bridge,"input msg: dw_cmd=0x%x dw_arg1=0x%x " -"dw_arg2=0x%x msgq_id=0x%x\n" , msg.msg.dw_cmd, - msg.msg.dw_arg1, msg.msg.dw_arg2, msg.msgq_id); +dev_dbg (bridge,"input msg: cmd=0x%x dw_arg1=0x%x " +"dw_arg2=0x%x msgq_id=0x%x\n" , msg.msg.cmd, + msg.msg.arg1, msg.msg.arg2, msg.msgq_id);/* * Interrupt may occur before shared memory and message * input locations have been set up. If all nodes were
@@ -1228,14 +1228,14 @@ static void input_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr)if (msg.msgq_id != msg_queue_obj->msgq_id)continue ;/* Found it */ -if (msg.msg.dw_cmd ==RMS_EXITACK ) { +if (msg.msg.cmd ==RMS_EXITACK ) {/* * Call the node exit notification. * The exit message does not get * queued. */ (*hmsg_mgr->on_exit)(msg_queue_obj->arg, - msg.msg.dw_arg1); + msg.msg.arg1);break ; }/*
@@ -1367,7 +1367,7 @@ static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl, chnl_packet_obj->byte_size); pchnl->bytes_moved += chnl_packet_obj->byte_size;/* Write all 32 bits of arg */ - sm->arg = chnl_packet_obj->dw_arg; + sm->arg = chnl_packet_obj->arg;#if _CHNL_WORDSIZE ==2 /* Access can be different SM access word size (e.g. 16/32 bit words) */ sm->output_id = (u16 ) chnl_id;
@@ -1430,16 +1430,16 @@ static void output_msg(struct io_mgr *pio_mgr, struct msg_mgr *hmsg_mgr) addr = (u32) &msg_output->msgq_id;write_ext32_bit_dsp_data (pio_mgr->hbridge_context, addr, val); - val = (pmsg->msg_data).msg.dw_cmd; - addr = (u32) &msg_output->msg.dw_cmd; + val = (pmsg->msg_data).msg.cmd; + addr = (u32) &msg_output->msg.cmd;write_ext32_bit_dsp_data (pio_mgr->hbridge_context, addr, val); - val = (pmsg->msg_data).msg.dw_arg1; - addr = (u32) &msg_output->msg.dw_arg1; + val = (pmsg->msg_data).msg.arg1; + addr = (u32) &msg_output->msg.arg1;write_ext32_bit_dsp_data (pio_mgr->hbridge_context, addr, val); - val = (pmsg->msg_data).msg.dw_arg2; - addr = (u32) &msg_output->msg.dw_arg2; + val = (pmsg->msg_data).msg.arg2; + addr = (u32) &msg_output->msg.arg2;write_ext32_bit_dsp_data (pio_mgr->hbridge_context, addr, val); msg_output++;
drivers/staging/tidspbridge/core/tiomap3430.c +25 -25
158 lines not on this page · raw message
drivers/staging/tidspbridge/core/tiomap3430_pwr.c +19 -19
@@ -118,7 +118,7 @@ int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context)if (!status) {/* Update the Bridger Driver state */ - dev_context->dw_brd_state =BRD_DSP_HIBERNATION ; + dev_context->brd_state =BRD_DSP_HIBERNATION ;#ifdef CONFIG_TIDSPBRIDGE_DVFS status =dev_get_io_mgr (dev_context->hdev_obj, &hio_mgr);
@@ -163,7 +163,7 @@ int sleep_dsp(struct bridge_dev_context *dev_context, u32 dw_cmd,if ((dw_cmd !=PWR_DEEPSLEEP ) && (dw_cmd !=PWR_EMERGENCYDEEPSLEEP ))return -EINVAL ; -switch (dev_context->dw_brd_state) { +switch (dev_context->brd_state) {case BRD_RUNNING :omap_mbox_save_ctx (dev_context->mbox);if (dsp_test_sleepstate ==PWRDM_POWER_OFF ) {
@@ -223,9 +223,9 @@ int sleep_dsp(struct bridge_dev_context *dev_context, u32 dw_cmd, }else {/* Update the Bridger Driver state */ if (dsp_test_sleepstate ==PWRDM_POWER_OFF ) - dev_context->dw_brd_state =BRD_HIBERNATION ; + dev_context->brd_state =BRD_HIBERNATION ;else - dev_context->dw_brd_state =BRD_RETENTION ; + dev_context->brd_state =BRD_RETENTION ;/* Disable wdt on hibernation. */ dsp_wdt_enable (false);
@@ -258,8 +258,8 @@ int wake_dsp(struct bridge_dev_context *dev_context, void *pargs)#ifdef CONFIG_PM /* Check the board state, if it is not 'SLEEP' then return */ -if (dev_context->dw_brd_state ==BRD_RUNNING || - dev_context->dw_brd_state ==BRD_STOPPED ) { +if (dev_context->brd_state ==BRD_RUNNING || + dev_context->brd_state ==BRD_STOPPED ) {/* The Device is in 'RET' or 'OFF' state and Bridge state is not * 'SLEEP', this means state inconsistency, so return */ return 0 ;
@@ -269,7 +269,7 @@ int wake_dsp(struct bridge_dev_context *dev_context, void *pargs)sm_interrupt_dsp (dev_context,MBX_PM_DSPWAKEUP );/* Set the device state to RUNNIG */ - dev_context->dw_brd_state =BRD_RUNNING ; + dev_context->brd_state =BRD_RUNNING ;#endif /* CONFIG_PM */ return status; }
@@ -351,12 +351,12 @@ int pre_scale_dsp(struct bridge_dev_context *dev_context, void *pargs)dev_dbg (bridge,"OPP: %s voltage_domain = %x, level = 0x%x\n" , __func__, voltage_domain, level); -if ((dev_context->dw_brd_state ==BRD_HIBERNATION ) || - (dev_context->dw_brd_state ==BRD_RETENTION ) || - (dev_context->dw_brd_state ==BRD_DSP_HIBERNATION )) { +if ((dev_context->brd_state ==BRD_HIBERNATION ) || + (dev_context->brd_state ==BRD_RETENTION ) || + (dev_context->brd_state ==BRD_DSP_HIBERNATION )) {dev_dbg (bridge,"OPP: %s IVA in sleep. No message to DSP\n" );return 0 ; - }else if ((dev_context->dw_brd_state ==BRD_RUNNING )) { + }else if ((dev_context->brd_state ==BRD_RUNNING )) {/* Send a prenotificatio to DSP */ dev_dbg (bridge,"OPP: %s sent notification to DSP\n" , __func__);sm_interrupt_dsp (dev_context,MBX_PM_SETPOINT_PRENOTIFY );
@@ -390,14 +390,14 @@ int post_scale_dsp(struct bridge_dev_context *dev_context, level = *((u32 *) pargs +1 );dev_dbg (bridge,"OPP: %s voltage_domain = %x, level = 0x%x\n" , __func__, voltage_domain, level); -if ((dev_context->dw_brd_state ==BRD_HIBERNATION ) || - (dev_context->dw_brd_state ==BRD_RETENTION ) || - (dev_context->dw_brd_state ==BRD_DSP_HIBERNATION )) { +if ((dev_context->brd_state ==BRD_HIBERNATION ) || + (dev_context->brd_state ==BRD_RETENTION ) || + (dev_context->brd_state ==BRD_DSP_HIBERNATION )) {/* Update the OPP value in shared memory */ io_sh_msetting (hio_mgr,SHM_CURROPP , &level);dev_dbg (bridge,"OPP: %s IVA in sleep. Wrote to shm\n" , __func__); - }else if ((dev_context->dw_brd_state ==BRD_RUNNING )) { + }else if ((dev_context->brd_state ==BRD_RUNNING )) {/* Update the OPP value in shared memory */ io_sh_msetting (hio_mgr,SHM_CURROPP , &level);/* Send a post notification to DSP */
@@ -486,8 +486,8 @@ void dsp_clk_wakeup_event_ctrl(u32 clock_id, bool enable)writel (mpu_grpsel, resources->dw_per_pm_base +0xA4 );break ;case BPWR_MCBSP1 : - iva2_grpsel =readl (resources->dw_core_pm_base +0xA8 ); - mpu_grpsel =readl (resources->dw_core_pm_base +0xA4 ); + iva2_grpsel =readl (resources->core_pm_base +0xA8 ); + mpu_grpsel =readl (resources->core_pm_base +0xA4 );if (enable) { iva2_grpsel |=OMAP3430_GRPSEL_MCBSP1_MASK ; mpu_grpsel &= ~OMAP3430_GRPSEL_MCBSP1_MASK ;
@@ -495,8 +495,8 @@ void dsp_clk_wakeup_event_ctrl(u32 clock_id, bool enable) mpu_grpsel |=OMAP3430_GRPSEL_MCBSP1_MASK ; iva2_grpsel &= ~OMAP3430_GRPSEL_MCBSP1_MASK ; } -writel (iva2_grpsel, resources->dw_core_pm_base +0xA8 ); -writel (mpu_grpsel, resources->dw_core_pm_base +0xA4 ); +writel (iva2_grpsel, resources->core_pm_base +0xA8 ); +writel (mpu_grpsel, resources->core_pm_base +0xA4 );break ;case BPWR_MCBSP2 : iva2_grpsel =readl (resources->dw_per_pm_base +0xA8 );
drivers/staging/tidspbridge/core/tiomap_io.c +19 -19
@@ -61,7 +61,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,u32 ul_tlb_base_virt =0 ;u32 ul_shm_offset_virt =0 ;u32 dw_ext_prog_virt_mem; -u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr; +u32 dw_base_addr = dev_context->dsp_ext_base_addr;bool trace_read = false;if (!ul_shm_base_virt) {
@@ -92,7 +92,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,/* If reading from TRACE, force remap/unmap */ if (trace_read && dw_base_addr) { dw_base_addr =0 ; - dev_context->dw_dsp_ext_base_addr =0 ; + dev_context->dsp_ext_base_addr =0 ; }if (!dw_base_addr) {
@@ -148,14 +148,14 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt, dw_ext_prog_virt_mem -= ul_shm_offset_virt; dw_ext_prog_virt_mem += (ul_ext_base - ul_dyn_ext_base); - dev_context->dw_dsp_ext_base_addr = + dev_context->dsp_ext_base_addr = dw_ext_prog_virt_mem;/* * This dw_dsp_ext_base_addr will get cleared * only when the board is stopped. */ -if (!dev_context->dw_dsp_ext_base_addr) +if (!dev_context->dsp_ext_base_addr) status = -EPERM ; }
@@ -184,7 +184,7 @@ int write_dsp_data(struct bridge_dev_context *dev_context, u32 mem_type) {u32 offset; -u32 dw_base_addr = dev_context->dw_dsp_base_addr; +u32 dw_base_addr = dev_context->dsp_base_addr;struct cfg_hostres *resources = dev_context->resources;int status =0 ;u32 base1, base2, base3;
@@ -195,7 +195,7 @@ int write_dsp_data(struct bridge_dev_context *dev_context,if (!resources)return -EPERM ; - offset = dsp_addr - dev_context->dw_dsp_start_add; + offset = dsp_addr - dev_context->dsp_start_add;if (offset < base1) { dw_base_addr =MEM_LINEAR_ADDRESS (resources->dw_mem_base[2 ], resources->dw_mem_length[2 ]);
@@ -230,7 +230,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context, u32 ul_num_bytes, u32 mem_type, bool dynamic_load) { - u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr; + u32 dw_base_addr = dev_context->dsp_ext_base_addr;u32 dw_offset =0 ;u8 temp_byte1, temp_byte2;u8 remain_byte[4 ];
@@ -263,8 +263,8 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,if ((dynamic_load || trace_load) && dw_base_addr) { dw_base_addr =0 ;MEM_UNMAP_LINEAR_ADDRESS ((void *) - dev_context->dw_dsp_ext_base_addr); - dev_context->dw_dsp_ext_base_addr =0x0 ; + dev_context->dsp_ext_base_addr); + dev_context->dsp_ext_base_addr =0x0 ; }if (!dw_base_addr) {if (symbols_reloaded)
@@ -344,14 +344,14 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context, (ul_ext_base - ul_dyn_ext_base); } - dev_context->dw_dsp_ext_base_addr = + dev_context->dsp_ext_base_addr = (u32 )MEM_LINEAR_ADDRESS ((void *) dw_ext_prog_virt_mem, ul_ext_end - ul_ext_base); - dw_base_addr += dev_context->dw_dsp_ext_base_addr; + dw_base_addr += dev_context->dsp_ext_base_addr;/* This dw_dsp_ext_base_addr will get cleared only when * the board is stopped. */ -if (!dev_context->dw_dsp_ext_base_addr) +if (!dev_context->dsp_ext_base_addr) ret = -EPERM ; } }
@@ -375,10 +375,10 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context, *((u32 *) host_buff) = dw_base_addr + dw_offset; }/* Unmap here to force remap for other Ext loads */ -if ((dynamic_load || trace_load) && dev_context->dw_dsp_ext_base_addr) { +if ((dynamic_load || trace_load) && dev_context->dsp_ext_base_addr) {MEM_UNMAP_LINEAR_ADDRESS ((void *) - dev_context->dw_dsp_ext_base_addr); - dev_context->dw_dsp_ext_base_addr =0x0 ; + dev_context->dsp_ext_base_addr); + dev_context->dsp_ext_base_addr =0x0 ; } symbols_reloaded = false;return ret;
@@ -401,8 +401,8 @@ int sm_interrupt_dsp(struct bridge_dev_context *dev_context, u16 mb_val)if (!resources)return -EPERM ; -if (dev_context->dw_brd_state ==BRD_DSP_HIBERNATION || - dev_context->dw_brd_state ==BRD_HIBERNATION ) { +if (dev_context->brd_state ==BRD_DSP_HIBERNATION || + dev_context->brd_state ==BRD_HIBERNATION ) {#ifdef CONFIG_TIDSPBRIDGE_DVFS if (pdata->dsp_get_opp) opplevel = (*pdata->dsp_get_opp) ();
@@ -439,8 +439,8 @@ int sm_interrupt_dsp(struct bridge_dev_context *dev_context, u16 mb_val)/* Access MMU SYS CONFIG register to generate a short wakeup */ temp =readl (resources->dw_dmmu_base +0x10 ); - dev_context->dw_brd_state =BRD_RUNNING ; - }else if (dev_context->dw_brd_state ==BRD_RETENTION ) { + dev_context->brd_state =BRD_RUNNING ; + }else if (dev_context->brd_state ==BRD_RETENTION ) {/* Restart the peripheral clocks */ dsp_clock_enable_all (dev_context->dsp_per_clks); }
drivers/staging/tidspbridge/core/ue_deh.c +2 -2
@@ -254,7 +254,7 @@ void bridge_deh_notify(struct deh_mgr *deh, int event, int info) }/* Filter subsequent notifications when an error occurs */ -if (dev_context->dw_brd_state !=BRD_ERROR ) { +if (dev_context->brd_state !=BRD_ERROR ) {ntfy_notify (deh->ntfy_obj, event);#ifdef CONFIG_TIDSPBRIDGE_RECOVERY bridge_recover_schedule ();
@@ -262,7 +262,7 @@ void bridge_deh_notify(struct deh_mgr *deh, int event, int info) }/* Set the Board state as ERROR */ - dev_context->dw_brd_state =BRD_ERROR ; + dev_context->brd_state =BRD_ERROR ;/* Disable all the clocks that were enabled by DSP */ dsp_clock_disable_all (dev_context->dsp_per_clks);/*
drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h +1 -1
@@ -171,7 +171,7 @@ struct chnl_irp {u8 *host_user_buf;/* Buffer to be filled/emptied. (System) */ u8 *host_sys_buf; -u32 dw_arg;/* Issue/Reclaim argument. */ +u32 arg;/* Issue/Reclaim argument. */ u32 dsp_tx_addr;/* Transfer address on DSP side. */ u32 byte_size;/* Bytes transferred. */ u32 buf_size;/* Actual buffer size when allocated. */
drivers/staging/tidspbridge/include/dspbridge/cfgdefs.h +5 -5
@@ -56,18 +56,18 @@ struct cfg_hostres {* dw_mem_base + this offset */ /* * Info needed by NODE for allocating channels to communicate with RMS: -* dw_chnl_offset: Offset of RMS channels. Lower channels are +* chnl_offset: Offset of RMS channels. Lower channels are * reserved. -* dw_chnl_buf_size: Size of channel buffer to send to RMS +* chnl_buf_size: Size of channel buffer to send to RMS * dw_num_chnls: Total number of channels * (including reserved). */ -u32 dw_chnl_offset; -u32 dw_chnl_buf_size; +u32 chnl_offset; +u32 chnl_buf_size;u32 dw_num_chnls;void __iomem *dw_per_base;u32 dw_per_pm_base; -u32 dw_core_pm_base; +u32 core_pm_base;void __iomem *dw_dmmu_base; };
drivers/staging/tidspbridge/include/dspbridge/chnldefs.h +1 -1
@@ -60,7 +60,7 @@ struct chnl_ioc {u32 byte_size;/* Bytes transferred. */ u32 buf_size;/* Actual buffer size in bytes */ u32 status;/* Status of IO completion. */ - u32 dw_arg; /* User argument associated with pbuf. */ + u32 arg; /* User argument associated with pbuf. */ };#endif /* CHNLDEFS_ */
drivers/staging/tidspbridge/include/dspbridge/cmmdefs.h +4 -4
@@ -54,9 +54,9 @@ struct cmm_seginfo {u32 dw_seg_base_pa;/* Start Phys address of SM segment */ /* Total size in bytes of segment: DSP+GPP */ u32 ul_total_seg_size; -u32 dw_gpp_base_pa;/* Start Phys addr of Gpp SM seg */ +u32 gpp_base_pa;/* Start Phys addr of Gpp SM seg */ u32 ul_gpp_size;/* Size of Gpp SM seg in bytes */ -u32 dw_dsp_base_va;/* DSP virt base byte address */ +u32 dsp_base_va;/* DSP virt base byte address */ u32 ul_dsp_size;/* DSP seg size in bytes */ /* # of current GPP allocations from this segment */ u32 ul_in_use_cnt;
@@ -79,8 +79,8 @@ struct cmm_info {/* XlatorCreate attributes */ struct cmm_xlatorattrs {u32 ul_seg_id;/* segment Id used for SM allocations */ -u32 dw_dsp_bufs;/* # of DSP-side bufs */ -u32 dw_dsp_buf_size;/* size of DSP-side bufs in GPP bytes */ +u32 dsp_bufs;/* # of DSP-side bufs */ +u32 dsp_buf_size;/* size of DSP-side bufs in GPP bytes */ /* Vm base address alloc'd in client process context */ void *vm_base;/* dw_vm_size must be >= (dwMaxNumBufs * dwMaxSize) */
drivers/staging/tidspbridge/include/dspbridge/dbdefs.h +4 -4
@@ -263,9 +263,9 @@ struct dsp_cbdata {/* The dsp_msg structure */ struct dsp_msg { -u32 dw_cmd; -u32 dw_arg1; -u32 dw_arg2; +u32 cmd; +u32 arg1; +u32 arg2; };/* The dsp_resourcereqmts structure for node's resource requirements */
@@ -387,7 +387,7 @@ struct dsp_processorinfo {/* Error information of last DSP exception signalled to the GPP */ struct dsp_errorinfo { -u32 dw_err_mask; +u32 err_mask;u32 dw_val1;u32 dw_val2;u32 dw_val3;
drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h +2 -2
@@ -68,7 +68,7 @@ union trapped_args {struct {void *hprocessor; -u32 dw_cmd; +u32 cmd;struct dsp_cbdata __user *pargs; } args_proc_ctrl;
@@ -301,7 +301,7 @@ union trapped_args {u8 *pbuffer;u32 dw_bytes;u32 dw_buf_size; -u32 dw_arg; +u32 arg; } args_strm_issue;struct {
drivers/staging/tidspbridge/pmgr/cmm.c +11 -11
@@ -66,10 +66,10 @@ struct cmm_allocator { /* sma */u32 ul_sm_size;/* Size of SM block in bytes */ unsigned int dw_vm_base;/* Start of VM block. (Dev driver * context for 'sma') */ -u32 dw_dsp_phys_addr_offset;/* DSP PA to GPP PA offset for this +u32 dsp_phys_addr_offset;/* DSP PA to GPP PA offset for this * SM space */ s8 c_factor;/* DSPPa to GPPPa Conversion Factor */ -unsigned int dw_dsp_base;/* DSP virt base byte address */ +unsigned int dsp_base;/* DSP virt base byte address */ u32 ul_dsp_size;/* DSP seg size in bytes */ struct cmm_object *hcmm_mgr;/* back ref to parent mgr */ /* node list of available memory */
@@ -119,8 +119,8 @@ static struct cmm_attrs cmm_dfltalctattrs = {static struct cmm_xlatorattrs cmm_dfltxlatorattrs = {/* ul_seg_id, does not have to match cmm_dfltalctattrs ul_seg_id */ 1 , -0 ,/* dw_dsp_bufs */ -0 ,/* dw_dsp_buf_size */ +0 ,/* dsp_bufs */ +0 ,/* dsp_buf_size */ NULL ,/* vm_base */ 0 ,/* dw_vm_size */ };
@@ -442,12 +442,12 @@ int cmm_get_info(struct cmm_object *hcmm_mgr, altr->shm_base - altr->ul_dsp_size; cmm_info_obj->seg_info[ul_seg -1 ].ul_total_seg_size = altr->ul_dsp_size + altr->ul_sm_size; - cmm_info_obj->seg_info[ul_seg -1 ].dw_gpp_base_pa = + cmm_info_obj->seg_info[ul_seg -1 ].gpp_base_pa = altr->shm_base; cmm_info_obj->seg_info[ul_seg -1 ].ul_gpp_size = altr->ul_sm_size; - cmm_info_obj->seg_info[ul_seg -1 ].dw_dsp_base_va = - altr->dw_dsp_base; + cmm_info_obj->seg_info[ul_seg -1 ].dsp_base_va = + altr->dsp_base; cmm_info_obj->seg_info[ul_seg -1 ].ul_dsp_size = altr->ul_dsp_size; cmm_info_obj->seg_info[ul_seg - 1].dw_seg_base_va =
@@ -540,9 +540,9 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr, psma->shm_base = dw_gpp_base_pa;/* SM Base phys */ psma->ul_sm_size = ul_size;/* SM segment size in bytes */ psma->dw_vm_base = gpp_base_va; - psma->dw_dsp_phys_addr_offset = dsp_addr_offset; + psma->dsp_phys_addr_offset = dsp_addr_offset; psma->c_factor = c_factor; - psma->dw_dsp_base = dw_dsp_base; + psma->dsp_base = dw_dsp_base; psma->ul_dsp_size = ul_dsp_size;if (psma->dw_vm_base ==0 ) { status = -EPERM ;
@@ -994,14 +994,14 @@ void *cmm_xlator_translate(struct cmm_xlatorobject *xlator, void *paddr, dw_addr_xlate =GPPPA2DSPPA ((allocator->shm_base - allocator->ul_dsp_size), dw_addr_xlate, - allocator->dw_dsp_phys_addr_offset * + allocator->dsp_phys_addr_offset * allocator->c_factor); }else if (xtype ==CMM_DSPPA2PA ) {/* Got DSP Pa, convert to GPP Pa */ dw_addr_xlate =DSPPA2GPPPA (allocator->shm_base - allocator->ul_dsp_size, dw_addr_xlate, - allocator->dw_dsp_phys_addr_offset * + allocator->dsp_phys_addr_offset * allocator->c_factor); } loop_cont:
drivers/staging/tidspbridge/pmgr/dspapi.c +2 -2
@@ -639,7 +639,7 @@ u32 procwrap_ctrl(union trapped_args *args, void *pr_ctxt) }if (!status) { status =proc_ctrl (hprocessor, - args->args_proc_ctrl.dw_cmd, + args->args_proc_ctrl.cmd, (struct dsp_cbdata *)pargs); }
@@ -1717,7 +1717,7 @@ u32 strmwrap_issue(union trapped_args *args, void *pr_ctxt) args->args_strm_issue.pbuffer, args->args_strm_issue.dw_bytes, args->args_strm_issue.dw_buf_size, - args->args_strm_issue.dw_arg); + args->args_strm_issue.arg);return status; }
drivers/staging/tidspbridge/rmgr/drv.c +5 -5
@@ -699,10 +699,10 @@ static int request_bridge_resources(struct cfg_hostres *res) host_res->birq_registers =0 ; host_res->birq_attrib =0 ; host_res->dw_offset_for_monitor =0 ; - host_res->dw_chnl_offset =0 ; + host_res->chnl_offset =0 ;/* CHNL_MAXCHANNELS */ host_res->dw_num_chnls =CHNL_MAXCHANNELS ; - host_res->dw_chnl_buf_size =0x400 ; + host_res->chnl_buf_size =0x400 ;return 0 ; }
@@ -741,7 +741,7 @@ int drv_request_bridge_res_dsp(void **phost_resources) OMAP_PER_CM_SIZE); host_res->dw_per_pm_base = (u32 )ioremap (OMAP_PER_PRM_BASE ,OMAP_PER_PRM_SIZE ); - host_res->dw_core_pm_base = (u32 )ioremap (OMAP_CORE_PRM_BASE , + host_res->core_pm_base = (u32 )ioremap (OMAP_CORE_PRM_BASE ,OMAP_CORE_PRM_SIZE ); host_res->dw_dmmu_base =ioremap (OMAP_DMMU_BASE ,OMAP_DMMU_SIZE );
@@ -783,10 +783,10 @@ int drv_request_bridge_res_dsp(void **phost_resources) host_res->birq_registers =0 ; host_res->birq_attrib =0 ; host_res->dw_offset_for_monitor =0 ; - host_res->dw_chnl_offset =0 ; + host_res->chnl_offset =0 ;/* CHNL_MAXCHANNELS */ host_res->dw_num_chnls =CHNL_MAXCHANNELS ; - host_res->dw_chnl_buf_size =0x400 ; + host_res->chnl_buf_size =0x400 ; dw_buff_size =sizeof (struct cfg_hostres ); } *phost_resources = host_res;
drivers/staging/tidspbridge/rmgr/node.c +14 -14
@@ -1837,12 +1837,12 @@ int node_get_message(struct node_object *hnode, status = (*intf_fxns->pfn_msg_get) (hnode->msg_queue_obj, message, utimeout);/* Check if message contains SM descriptor */ -if (status || !(message->dw_cmd &DSP_RMSBUFDESC )) +if (status || !(message->cmd &DSP_RMSBUFDESC )) goto func_end;/* Translate DSP byte addr to GPP Va. */ tmp_buf =cmm_xlator_translate (hnode->xlator, - (void *)(message->dw_arg1 * + (void *)(message->arg1 * hnode->hnode_mgr-> udsp_word_size),CMM_DSPPA2PA );if (tmp_buf !=NULL ) {
@@ -1851,8 +1851,8 @@ int node_get_message(struct node_object *hnode, CMM_PA2VA);if (tmp_buf !=NULL ) {/* Adjust SM size in msg */ - message->dw_arg1 = (u32 ) tmp_buf; - message->dw_arg2 *= hnode->hnode_mgr->udsp_word_size; + message->arg1 = (u32 ) tmp_buf; + message->arg2 *= hnode->hnode_mgr->udsp_word_size; }else { status = -ESRCH ; }
@@ -2142,19 +2142,19 @@ int node_put_message(struct node_object *hnode,/* assign pmsg values to new msg */ new_msg = *pmsg;/* Now, check if message contains a SM buffer descriptor */ -if (pmsg->dw_cmd &DSP_RMSBUFDESC ) { +if (pmsg->cmd &DSP_RMSBUFDESC ) {/* Translate GPP Va to DSP physical buf Ptr. */ tmp_buf =cmm_xlator_translate (hnode->xlator, - (void *)new_msg.dw_arg1, + (void *)new_msg.arg1,CMM_VA2DSPPA );if (tmp_buf !=NULL ) {/* got translation, convert to MAUs in msg */ if (hnode->hnode_mgr->udsp_word_size !=0 ) { - new_msg.dw_arg1 = + new_msg.arg1 = (u32 ) tmp_buf / hnode->hnode_mgr->udsp_word_size;/* MAUs */ - new_msg.dw_arg2 /= hnode->hnode_mgr-> + new_msg.arg2 /= hnode->hnode_mgr-> udsp_word_size; }else { pr_err("%s: udsp_word_size is zero!\n",
@@ -2420,10 +2420,10 @@ int node_terminate(struct node_object *hnode, int *pstatus) goto func_cont; } - msg.dw_cmd =RMS_EXIT ; - msg.dw_arg1 = hnode->node_env; - killmsg.dw_cmd =RMS_KILLTASK ; - killmsg.dw_arg1 = hnode->node_env; + msg.cmd =RMS_EXIT ; + msg.arg1 = hnode->node_env; + killmsg.cmd =RMS_KILLTASK ; + killmsg.arg1 = hnode->node_env; intf_fxns = hnode_mgr->intf_fxns;if (hnode->utimeout >MAXTIMEOUT )
@@ -2944,8 +2944,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->dw_chnl_offset; - hnode_mgr->ul_chnl_buf_size = host_res->dw_chnl_buf_size; + hnode_mgr->ul_chnl_offset = host_res->chnl_offset; + hnode_mgr->ul_chnl_buf_size = host_res->chnl_buf_size; hnode_mgr->ul_num_chnls = host_res->dw_num_chnls;/*
drivers/staging/tidspbridge/rmgr/strm.c +1 -1
@@ -639,7 +639,7 @@ int strm_reclaim(struct strm_object *stream_obj, u8 ** buf_ptr,if (buff_size) *buff_size = chnl_ioc_obj.buf_size; - *pdw_arg = chnl_ioc_obj.dw_arg; + *pdw_arg = chnl_ioc_obj.arg;if (!CHNL_IS_IO_COMPLETE (chnl_ioc_obj)) {if (CHNL_IS_TIMED_OUT (chnl_ioc_obj)) { status = -ETIME ;
Signature · 1 line
1.6.3.3
PATCH 2/12 staging:tidspbridge - set2 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: dw_dsp_base_addr dsp_base_addr dw_dmmu_base dmmu_base dw_index index dw_int_addr int_addr dw_internal_size internal_size dw_last_output last_output dw_mem_base mem_base dw_mem_length mem_length dw_mem_phys mem_phys dw_mode mode dw_num_chnls num_chnls dw_offset_for_monitor offset_for_monitor dw_output_mask output_mask dw_page_size page_size dw_pa pa dw_per_base per_base dw_per_pm_base per_pm_base dw_public_rhea public_rhea dw_seg_base_pa seg_base_pa
--- drivers/staging/tidspbridge/core/_tiomap.h | 8 +- drivers/staging/tidspbridge/core/chnl_sm.c | 8 +- drivers/staging/tidspbridge/core/io_sm.c | 18 ++-- drivers/staging/tidspbridge/core/tiomap3430.c | 104 ++++++++++---------- drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 64 ++++++------ drivers/staging/tidspbridge/core/tiomap_io.c | 16 ++-- drivers/staging/tidspbridge/core/ue_deh.c | 18 ++-- .../tidspbridge/include/dspbridge/_chnl_sm.h | 4 +- .../tidspbridge/include/dspbridge/cfgdefs.h | 20 ++-- .../tidspbridge/include/dspbridge/chnlpriv.h | 2 +- .../tidspbridge/include/dspbridge/cmmdefs.h | 2 +- drivers/staging/tidspbridge/pmgr/cmm.c | 24 +++--- drivers/staging/tidspbridge/pmgr/dev.c | 8 +- drivers/staging/tidspbridge/pmgr/dspapi.c | 2 +- drivers/staging/tidspbridge/rmgr/drv.c | 60 ++++++------ drivers/staging/tidspbridge/rmgr/node.c | 4 +- 16 files changed, 181 insertions(+), 181 deletions(-)
drivers/staging/tidspbridge/core/_tiomap.h +4 -4
@@ -316,16 +316,16 @@ struct bridge_dev_context {*/ u32 dsp_ext_base_addr;/* See the comment above */ u32 dw_api_reg_base;/* API mem map'd registers */ -void __iomem *dw_dsp_mmu_base;/* DSP MMU Mapped registers */ +void __iomem *dsp_mmu_base;/* DSP MMU Mapped registers */ u32 dw_api_clk_base;/* CLK Registers */ u32 dsp_clk_m2_base;/* DSP Clock Module m2 */ -u32 dw_public_rhea;/* Pub Rhea */ -u32 dw_int_addr;/* MB INTR reg */ +u32 public_rhea;/* Pub Rhea */ +u32 int_addr;/* MB INTR reg */ u32 dw_tc_endianism;/* TC Endianism register */ u32 dw_test_base;/* DSP MMU Mapped registers */ u32 dw_self_loop;/* Pointer to the selfloop */ u32 dsp_start_add;/* API Boot vector */ -u32 dw_internal_size;/* Internal memory size */ +u32 internal_size;/* Internal memory size */ struct omap_mbox *mbox;/* Mail box handle */
drivers/staging/tidspbridge/core/chnl_sm.c +4 -4
@@ -272,7 +272,7 @@ int bridge_chnl_cancel_io(struct chnl_object *chnl_obj) }else {/* Record that we no longer have output buffers * available: */ - chnl_mgr_obj->dw_output_mask &= ~(1 << chnl_id); + chnl_mgr_obj->output_mask &= ~(1 << chnl_id); } }/* Move all IOR's to IOC queue: */
@@ -386,8 +386,8 @@ int bridge_chnl_create(struct chnl_mgr **channel_mgr,/* Total # chnls supported */ chnl_mgr_obj->max_channels = max_channels; chnl_mgr_obj->open_channels =0 ; - chnl_mgr_obj->dw_output_mask =0 ; - chnl_mgr_obj->dw_last_output =0 ; + chnl_mgr_obj->output_mask =0 ; + chnl_mgr_obj->last_output =0 ; chnl_mgr_obj->hdev_obj = hdev_obj;spin_lock_init (&chnl_mgr_obj->chnl_mgr_lock); }else {
@@ -511,7 +511,7 @@ int bridge_chnl_get_info(struct chnl_object *chnl_obj, channel_info->hchnl_mgr = pchnl->chnl_mgr_obj; channel_info->event_obj = pchnl->user_event; channel_info->cnhl_id = pchnl->chnl_id; - channel_info->dw_mode = pchnl->chnl_mode; + channel_info->mode = pchnl->chnl_mode; channel_info->bytes_tx = pchnl->bytes_moved; channel_info->process = pchnl->process; channel_info->sync_event = pchnl->sync_event;
drivers/staging/tidspbridge/core/io_sm.c +9 -9
@@ -417,8 +417,8 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)/* The first MMU TLB entry(TLB_0) in DCD is ShmBase. */ ndx =0 ; - ul_gpp_pa = host_res->dw_mem_phys[1 ]; - ul_gpp_va = host_res->dw_mem_base[1 ]; + ul_gpp_pa = host_res->mem_phys[1 ]; + ul_gpp_va = host_res->mem_base[1 ];/* This is the virtual uncached ioremapped address!!! */ /* Why can't we directly take the DSPVA from the symbols? */ ul_dsp_va = hio_mgr->ext_proc_info.ty_tlb[0 ].ul_dsp_virt;
@@ -441,9 +441,9 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) ul_dyn_ext_base, ul_ext_end, ul_seg_size, ul_seg1_size);if ((ul_seg_size + ul_seg1_size + ul_pad_size) > - host_res->dw_mem_length[1 ]) { + host_res->mem_length[1 ]) {pr_err ("%s: shm Error, reserved 0x%x required 0x%x\n" , - __func__, host_res->dw_mem_length[1 ], + __func__, host_res->mem_length[1 ], ul_seg_size + ul_seg1_size + ul_pad_size); status = -ENOMEM ; }
@@ -993,7 +993,7 @@ void io_request_chnl(struct io_mgr *io_manager, struct chnl_object *pchnl,* Record the fact that we have a buffer available for * output. */ - chnl_mgr_obj->dw_output_mask |= (1 << pchnl->chnl_id); + chnl_mgr_obj->output_mask |= (1 << pchnl->chnl_id); }else {DBC_ASSERT (io_mode);/* Shouldn't get here. */ }
@@ -1036,7 +1036,7 @@ static u32 find_ready_output(struct chnl_mgr *chnl_mgr_obj,u32 shift; id = (pchnl != -NULL ? pchnl->chnl_id : (chnl_mgr_obj->dw_last_output +1 )); +NULL ? pchnl->chnl_id : (chnl_mgr_obj->last_output +1 )); id = ((id ==CHNL_MAXCHANNELS ) ?0 : id);if (id >=CHNL_MAXCHANNELS ) goto func_end;
@@ -1047,7 +1047,7 @@ static u32 find_ready_output(struct chnl_mgr *chnl_mgr_obj,if (mask & shift) { ret = id;if (pchnl ==NULL ) - chnl_mgr_obj->dw_last_output = id; + chnl_mgr_obj->last_output = id;break ; } id = id +1 ;
@@ -1336,7 +1336,7 @@ static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl, dw_dsp_f_mask = sm->dsp_free_mask; chnl_id =find_ready_output (chnl_mgr_obj, pchnl, - (chnl_mgr_obj->dw_output_mask & dw_dsp_f_mask)); + (chnl_mgr_obj->output_mask & dw_dsp_f_mask));if (chnl_id ==OUTPUTNOTREADY ) goto func_end;
@@ -1358,7 +1358,7 @@ static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,/* Record fact that no more I/O buffers available */ if (list_empty (&pchnl->pio_requests)) - chnl_mgr_obj->dw_output_mask &= ~(1 << chnl_id); + chnl_mgr_obj->output_mask &= ~(1 << chnl_id);/* Transfer buffer to DSP side */ chnl_packet_obj->byte_size = min(pio_mgr->usm_buf_size,
drivers/staging/tidspbridge/core/tiomap3430.c +52 -52
214 lines not on this page · raw message
drivers/staging/tidspbridge/core/tiomap3430_pwr.c +32 -32
136 lines not on this page · raw message
drivers/staging/tidspbridge/core/tiomap_io.c +8 -8
@@ -197,16 +197,16 @@ int write_dsp_data(struct bridge_dev_context *dev_context, offset = dsp_addr - dev_context->dsp_start_add;if (offset < base1) { - dw_base_addr =MEM_LINEAR_ADDRESS (resources->dw_mem_base[2 ], - resources->dw_mem_length[2 ]); + dw_base_addr =MEM_LINEAR_ADDRESS (resources->mem_base[2 ], + resources->mem_length[2 ]); }else if (offset > base1 && offset < base2 +OMAP_DSP_MEM2_SIZE ) { - dw_base_addr =MEM_LINEAR_ADDRESS (resources->dw_mem_base[3 ], - resources->dw_mem_length[3 ]); + dw_base_addr =MEM_LINEAR_ADDRESS (resources->mem_base[3 ], + resources->mem_length[3 ]); offset = offset - base2; }else if (offset >= base2 +OMAP_DSP_MEM2_SIZE && offset < base3 +OMAP_DSP_MEM3_SIZE ) { - dw_base_addr =MEM_LINEAR_ADDRESS (resources->dw_mem_base[4 ], - resources->dw_mem_length[4 ]); + dw_base_addr =MEM_LINEAR_ADDRESS (resources->mem_base[4 ], + resources->mem_length[4 ]); offset = offset - base3; }else {return -EPERM ;
@@ -339,7 +339,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context, dw_ext_prog_virt_mem = dev_context->atlb_entry[0 ].ul_gpp_va; }else { - dw_ext_prog_virt_mem = host_res->dw_mem_base[1 ]; + dw_ext_prog_virt_mem = host_res->mem_base[1 ]; dw_ext_prog_virt_mem += (ul_ext_base - ul_dyn_ext_base); }
@@ -437,7 +437,7 @@ int sm_interrupt_dsp(struct bridge_dev_context *dev_context, u16 mb_val)omap_mbox_restore_ctx (dev_context->mbox);/* Access MMU SYS CONFIG register to generate a short wakeup */ - temp =readl (resources->dw_dmmu_base +0x10 ); + temp =readl (resources->dmmu_base +0x10 ); dev_context->brd_state =BRD_RUNNING ; }else if (dev_context->brd_state ==BRD_RETENTION ) {
drivers/staging/tidspbridge/core/ue_deh.c +9 -9
@@ -59,9 +59,9 @@ static irqreturn_t mmu_fault_isr(int irq, void *data)return IRQ_HANDLED ; } -hw_mmu_event_status (resources->dw_dmmu_base, &event); +hw_mmu_event_status (resources->dmmu_base, &event);if (event ==HW_MMU_TRANSLATION_FAULT ) { -hw_mmu_fault_addr_read (resources->dw_dmmu_base, &fault_addr); +hw_mmu_fault_addr_read (resources->dmmu_base, &fault_addr);dev_dbg (bridge,"%s: event=0x%x, fault_addr=0x%x\n" , __func__, event, fault_addr);/*
@@ -73,10 +73,10 @@ static irqreturn_t mmu_fault_isr(int irq, void *data)/* Disable the MMU events, else once we clear it will * start to raise INTs again */ -hw_mmu_event_disable (resources->dw_dmmu_base, +hw_mmu_event_disable (resources->dmmu_base,HW_MMU_TRANSLATION_FAULT ); }else { -hw_mmu_event_disable (resources->dw_dmmu_base, +hw_mmu_event_disable (resources->dmmu_base,HW_MMU_ALL_INTERRUPTS ); }return IRQ_HANDLED ;
@@ -185,10 +185,10 @@ static void mmu_fault_print_stack(struct bridge_dev_context *dev_context)* access entry #0. Then add a new entry so that the DSP OS * can continue in order to dump the stack. */ -hw_mmu_twl_disable (resources->dw_dmmu_base); -hw_mmu_tlb_flush_all (resources->dw_dmmu_base); +hw_mmu_twl_disable (resources->dmmu_base); +hw_mmu_tlb_flush_all (resources->dmmu_base); -hw_mmu_tlb_add (resources->dw_dmmu_base, +hw_mmu_tlb_add (resources->dmmu_base,virt_to_phys (dummy_va_addr), fault_addr,HW_PAGE_SIZE4KB ,1 , &map_attrs,HW_SET ,HW_SET );
@@ -198,12 +198,12 @@ static void mmu_fault_print_stack(struct bridge_dev_context *dev_context)dsp_gpt_wait_overflow (DSP_CLK_GPT8 ,0xfffffffe );/* Clear MMU interrupt */ -hw_mmu_event_ack (resources->dw_dmmu_base, +hw_mmu_event_ack (resources->dmmu_base,HW_MMU_TRANSLATION_FAULT );dump_dsp_stack (dev_context);dsp_clk_disable (DSP_CLK_GPT8 ); -hw_mmu_disable (resources->dw_dmmu_base); +hw_mmu_disable (resources->dmmu_base); free_page((unsigned long)dummy_va_addr); }#endif
drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h +2 -2
@@ -119,8 +119,8 @@ struct chnl_mgr {struct dev_object *hdev_obj;/* These fields initialized in bridge_chnl_create(): */ -u32 dw_output_mask;/* Host output channels w/ full buffers */ -u32 dw_last_output;/* Last output channel fired from DPC */ +u32 output_mask;/* Host output channels w/ full buffers */ +u32 last_output;/* Last output channel fired from DPC */ /* Critical section object handle */ spinlock_t chnl_mgr_lock;u32 word_size;/* Size in bytes of DSP word */
drivers/staging/tidspbridge/include/dspbridge/cfgdefs.h +10 -10
@@ -47,28 +47,28 @@ struct cfg_devnode;struct cfg_hostres {u32 num_mem_windows;/* Set to default */ /* This is the base.memory */ -u32 dw_mem_base[CFG_MAXMEMREGISTERS ];/* shm virtual address */ -u32 dw_mem_length[CFG_MAXMEMREGISTERS ];/* Length of the Base */ -u32 dw_mem_phys[CFG_MAXMEMREGISTERS ];/* shm Physical address */ +u32 mem_base[CFG_MAXMEMREGISTERS ];/* shm virtual address */ +u32 mem_length[CFG_MAXMEMREGISTERS ];/* Length of the Base */ +u32 mem_phys[CFG_MAXMEMREGISTERS ];/* shm Physical address */ u8 birq_registers;/* IRQ Number */ u8 birq_attrib;/* IRQ Attribute */ -u32 dw_offset_for_monitor;/* The Shared memory starts from -* dw_mem_base + this offset */ +u32 offset_for_monitor;/* The Shared memory starts from +* mem_base + this offset */ /* * Info needed by NODE for allocating channels to communicate with RMS: * chnl_offset: Offset of RMS channels. Lower channels are * reserved. * chnl_buf_size: Size of channel buffer to send to RMS -* dw_num_chnls: Total number of channels +* num_chnls: Total number of channels * (including reserved). */ u32 chnl_offset;u32 chnl_buf_size; -u32 dw_num_chnls; -void __iomem *dw_per_base; -u32 dw_per_pm_base; +u32 num_chnls; +void __iomem *per_base; +u32 per_pm_base;u32 core_pm_base; -void __iomem *dw_dmmu_base; +void __iomem *dmmu_base; };struct cfg_dspmemdesc {
drivers/staging/tidspbridge/include/dspbridge/chnlpriv.h +1 -1
@@ -71,7 +71,7 @@ struct chnl_info {void *event_obj;/* Channel I/O completion event. */ /*Abstraction of I/O completion event. */ struct sync_object *sync_event; -s8 dw_mode;/* Channel mode. */ +s8 mode;/* Channel mode. */ u8 dw_state;/* Current channel state. */ u32 bytes_tx;/* Total bytes transferred. */ u32 cio_cs;/* Number of IOCs in queue. */
drivers/staging/tidspbridge/include/dspbridge/cmmdefs.h +1 -1
@@ -51,7 +51,7 @@ struct cmm_attrs {*/ struct cmm_seginfo { -u32 dw_seg_base_pa;/* Start Phys address of SM segment */ +u32 seg_base_pa;/* Start Phys address of SM segment */ /* Total size in bytes of segment: DSP+GPP */ u32 ul_total_seg_size;u32 gpp_base_pa;/* Start Phys addr of Gpp SM seg */
drivers/staging/tidspbridge/pmgr/cmm.c +12 -12
@@ -49,7 +49,7 @@#include <dspbridge/cmm.h> /* ----------------------------------- Defines, Data Structures, Typedefs */ -#define NEXT_PA (pnode) (pnode->dw_pa + pnode->ul_size) +#define NEXT_PA (pnode) (pnode->pa + pnode->ul_size)/* Other bus/platform translations */ #define DSPPA2GPPPA (base, x, y) ((x)+(y))
@@ -99,7 +99,7 @@ struct cmm_object {struct mutex cmm_lock;/* Lock to access cmm mgr */ struct list_head node_free_list;/* Free list of memory nodes */ u32 ul_min_block_size;/* Min SM block; default 16 bytes */ -u32 dw_page_size;/* Memory Page size (1k/4k) */ +u32 page_size;/* Memory Page size (1k/4k) */ /* GPP SM segment ptrs */ struct cmm_allocator *pa_gppsm_seg_tab[CMM_MAXGPPSEGS ]; };
@@ -128,7 +128,7 @@ static struct cmm_xlatorattrs cmm_dfltxlatorattrs = {/* SM node representing a block of memory. */ struct cmm_mnode {struct list_head link;/* must be 1st element */ -u32 dw_pa;/* Phys addr */ +u32 pa;/* Phys addr */ u32 dw_va;/* Virtual address in device process context */ u32 ul_size;/* SM block size in bytes */ u32 client_proc;/* Process that allocated this mem block */
@@ -199,7 +199,7 @@ void *cmm_calloc_buf(struct cmm_object *hcmm_mgr, u32 usize,/* create a new block with the leftovers and * add to freelist */ new_node = -get_node (cmm_mgr_obj, pnode->dw_pa + usize, +get_node (cmm_mgr_obj, pnode->pa + usize, pnode->dw_va + usize, (u32 ) delta_size);/* leftovers go free */
@@ -216,7 +216,7 @@ void *cmm_calloc_buf(struct cmm_object *hcmm_mgr, u32 usize,/* put our node on InUse list */ list_add_tail (&pnode->link, &allocator->in_use_list); - buf_pa = (void *)pnode->dw_pa;/* physical address */ + buf_pa = (void *)pnode->pa;/* physical address */ /* clear mem */ pbyte = (u8 *) pnode->dw_va;for (cnt =0 ; cnt < (s32 ) usize; cnt++, pbyte++)
@@ -260,7 +260,7 @@ int cmm_create(struct cmm_object **ph_cmm_mgr,DBC_ASSERT (mgr_attrts->ul_min_block_size >=4 );/* save away smallest block allocation for this cmm mgr */ cmm_obj->ul_min_block_size = mgr_attrts->ul_min_block_size; - cmm_obj->dw_page_size =PAGE_SIZE ; + cmm_obj->page_size =PAGE_SIZE ;/* create node free list */ INIT_LIST_HEAD (&cmm_obj->node_free_list);
@@ -369,7 +369,7 @@ int cmm_free_buf(struct cmm_object *hcmm_mgr, void *buf_pa, u32 ul_seg_id)mutex_lock (&cmm_mgr_obj->cmm_lock);list_for_each_entry_safe (curr, tmp, &allocator->in_use_list, link) { -if (curr->dw_pa == (u32 ) buf_pa) { +if (curr->pa == (u32 ) buf_pa) {list_del (&curr->link);add_to_free_list (allocator, curr); status =0 ;
@@ -438,7 +438,7 @@ int cmm_get_info(struct cmm_object *hcmm_mgr,if (!altr)continue ; cmm_info_obj->ul_num_gppsm_segs++; - cmm_info_obj->seg_info[ul_seg -1 ].dw_seg_base_pa = + cmm_info_obj->seg_info[ul_seg -1 ].seg_base_pa = altr->shm_base - altr->ul_dsp_size; cmm_info_obj->seg_info[ul_seg -1 ].ul_total_seg_size = altr->ul_dsp_size + altr->ul_sm_size;
@@ -704,7 +704,7 @@ static struct cmm_mnode *get_node(struct cmm_object *cmm_mgr_obj, u32 dw_pa,list_del_init (&pnode->link); } - pnode->dw_pa = dw_pa; + pnode->pa = dw_pa; pnode->dw_va = dw_va; pnode->ul_size = ul_size;
@@ -763,13 +763,13 @@ static void add_to_free_list(struct cmm_allocator *allocator, }list_for_each_entry (curr, &allocator->free_list, link) { -if (NEXT_PA (curr) == node->dw_pa) { +if (NEXT_PA (curr) == node->pa) { curr->ul_size += node->ul_size;delete_node (allocator->hcmm_mgr, node);return ; } -if (curr->dw_pa ==NEXT_PA (node)) { - curr->dw_pa = node->dw_pa; +if (curr->pa ==NEXT_PA (node)) { + curr->pa = node->pa; curr->dw_va = node->dw_va; curr->ul_size += node->ul_size;delete_node (allocator->hcmm_mgr, node);
drivers/staging/tidspbridge/pmgr/dev.c +4 -4
@@ -219,11 +219,11 @@ int dev_create_device(struct dev_object **device_obj, num_windows = host_res->num_mem_windows;if (num_windows) {/* Assume last memory window is for CHNL */ - io_mgr_attrs.shm_base = host_res->dw_mem_base[1 ] + - host_res->dw_offset_for_monitor; + io_mgr_attrs.shm_base = host_res->mem_base[1 ] + + host_res->offset_for_monitor; io_mgr_attrs.usm_length = - host_res->dw_mem_length[1 ] - - host_res->dw_offset_for_monitor; + host_res->mem_length[1 ] - + host_res->offset_for_monitor; }else { io_mgr_attrs.shm_base =0 ; io_mgr_attrs.usm_length =0 ;
drivers/staging/tidspbridge/pmgr/dspapi.c +1 -1
@@ -68,7 +68,7 @@/* Device IOCtl function pointer */ struct api_cmd {u32 (*fxn) (union trapped_args *args,void *pr_ctxt); -u32 dw_index; +u32 index; };/* ----------------------------------- Globals */
drivers/staging/tidspbridge/rmgr/drv.c +30 -30
110 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/node.c +2 -2
@@ -623,7 +623,7 @@ func_cont: goto func_end; } - ul_gpp_mem_base = (u32 ) host_res->dw_mem_base[1 ]; + ul_gpp_mem_base = (u32 ) host_res->mem_base[1 ]; off_set = pul_value - dynext_base; ul_stack_seg_addr = ul_gpp_mem_base + off_set; ul_stack_seg_val =readl (ul_stack_seg_addr);
@@ -2946,7 +2946,7 @@ static int get_proc_props(struct node_mgr *hnode_mgr,return -EPERM ; hnode_mgr->ul_chnl_offset = host_res->chnl_offset; hnode_mgr->ul_chnl_buf_size = host_res->chnl_buf_size; - hnode_mgr->ul_num_chnls = host_res->dw_num_chnls; + hnode_mgr->ul_num_chnls = host_res->num_chnls;/* * PROC will add an API to get dsp_processorinfo.
Signature · 1 line
1.6.3.3
PATCH 3/12 staging:tidspbridge - set3 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: dw_seg_base_va seg_base_va dw_self_loop self_loop dw_state state dw_tc_endianism tc_endianism dw_test_base test_base dw_type type dw_val1 val1 dw_val2 val2 dw_val3 val3 dw_va va dw_virt_base virt_base dw_vm_base vm_base dw_vm_size vm_size pfn_allocate allocate pfn_brd_mem_copy brd_mem_copy pfn_brd_mem_map brd_mem_map pfn_brd_mem_un_map brd_mem_un_map pfn_brd_mem_write brd_mem_write pfn_brd_monitor brd_monitor pfn_brd_read brd_read
--- drivers/staging/tidspbridge/core/_tiomap.h | 6 +- drivers/staging/tidspbridge/core/chnl_sm.c | 22 +++++----- drivers/staging/tidspbridge/core/io_sm.c | 34 ++++++++-------- drivers/staging/tidspbridge/core/tiomap3430.c | 2 +- .../tidspbridge/include/dspbridge/_chnl_sm.h | 4 +- .../tidspbridge/include/dspbridge/chnlpriv.h | 4 +- .../tidspbridge/include/dspbridge/cmmdefs.h | 6 +- .../staging/tidspbridge/include/dspbridge/dbdefs.h | 6 +- .../tidspbridge/include/dspbridge/dspdefs.h | 12 +++--- .../tidspbridge/include/dspbridge/nldrdefs.h | 2 +- drivers/staging/tidspbridge/pmgr/cmm.c | 44 ++++++++++---------- drivers/staging/tidspbridge/pmgr/dev.c | 16 ++++---- drivers/staging/tidspbridge/rmgr/node.c | 6 +- drivers/staging/tidspbridge/rmgr/proc.c | 6 +- drivers/staging/tidspbridge/rmgr/strm.c | 2 +- 15 files changed, 86 insertions(+), 86 deletions(-)
drivers/staging/tidspbridge/core/_tiomap.h +3 -3
@@ -321,9 +321,9 @@ struct bridge_dev_context {u32 dsp_clk_m2_base;/* DSP Clock Module m2 */ u32 public_rhea;/* Pub Rhea */ u32 int_addr;/* MB INTR reg */ -u32 dw_tc_endianism;/* TC Endianism register */ -u32 dw_test_base;/* DSP MMU Mapped registers */ -u32 dw_self_loop;/* Pointer to the selfloop */ +u32 tc_endianism;/* TC Endianism register */ +u32 test_base;/* DSP MMU Mapped registers */ +u32 self_loop;/* Pointer to the selfloop */ u32 dsp_start_add;/* API Boot vector */ u32 internal_size;/* Internal memory size */
drivers/staging/tidspbridge/core/chnl_sm.c +11 -11
@@ -115,7 +115,7 @@ int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *host_buf,* Check the channel state: only queue chirp if channel state * allows it. */ - dw_state = pchnl->dw_state; + dw_state = pchnl->state;if (dw_state !=CHNL_STATEREADY ) {if (dw_state &CHNL_STATECANCEL )return -ECANCELED ;
@@ -207,7 +207,7 @@ func_cont:* more IOR's. */ if (is_eos) - pchnl->dw_state |=CHNL_STATEEOS ; + pchnl->state |=CHNL_STATEEOS ;/* Legacy DSM Processor-Copy */ DBC_ASSERT (pchnl->chnl_type ==CHNL_PCPY );
@@ -258,7 +258,7 @@ int bridge_chnl_cancel_io(struct chnl_object *chnl_obj)* IORequests or dispatching. */ spin_lock_bh (&chnl_mgr_obj->chnl_mgr_lock); - pchnl->dw_state |=CHNL_STATECANCEL ; + pchnl->state |=CHNL_STATECANCEL ;if (list_empty (&pchnl->pio_requests)) {spin_unlock_bh (&chnl_mgr_obj->chnl_mgr_lock);
@@ -312,7 +312,7 @@ int bridge_chnl_close(struct chnl_object *chnl_obj)if (status)return status;/* Assert I/O on this channel is now cancelled: Protects from io_dpc */ -DBC_ASSERT ((pchnl->dw_state &CHNL_STATECANCEL )); +DBC_ASSERT ((pchnl->state &CHNL_STATECANCEL ));/* Invalidate channel object: Protects from CHNL_GetIOCompletion() */ /* Free the slot in the channel manager: */ pchnl->chnl_mgr_obj->ap_channel[pchnl->chnl_id] =NULL ;
@@ -381,7 +381,7 @@ int bridge_chnl_create(struct chnl_mgr **channel_mgr, * max_channels, GFP_KERNEL);if (chnl_mgr_obj->ap_channel) {/* Initialize chnl_mgr object */ - chnl_mgr_obj->dw_type =CHNL_TYPESM ; + chnl_mgr_obj->type =CHNL_TYPESM ; chnl_mgr_obj->word_size = mgr_attrts->word_size;/* Total # chnls supported */ chnl_mgr_obj->max_channels = max_channels;
@@ -488,7 +488,7 @@ int bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 timeout) }else { status =bridge_chnl_cancel_io (chnl_obj);/* Now, leave the channel in the ready state: */ - pchnl->dw_state &= ~CHNL_STATECANCEL ; + pchnl->state &= ~CHNL_STATECANCEL ; } }DBC_ENSURE (status ||list_empty (&pchnl->pio_requests));
@@ -517,7 +517,7 @@ int bridge_chnl_get_info(struct chnl_object *chnl_obj, channel_info->sync_event = pchnl->sync_event; channel_info->cio_cs = pchnl->cio_cs; channel_info->cio_reqs = pchnl->cio_reqs; - channel_info->dw_state = pchnl->dw_state; + channel_info->state = pchnl->state; }else { status = -EFAULT ; }
@@ -687,7 +687,7 @@ int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr, u32 ch_id,/* Return the requested information: */ mgr_info->chnl_obj = chnl_mgr_obj->ap_channel[ch_id]; mgr_info->open_channels = chnl_mgr_obj->open_channels; - mgr_info->dw_type = chnl_mgr_obj->dw_type; + mgr_info->type = chnl_mgr_obj->type;/* total # of chnls */ mgr_info->max_channels = chnl_mgr_obj->max_channels;
@@ -718,7 +718,7 @@ int bridge_chnl_idle(struct chnl_object *chnl_obj, u32 timeout,/* Reset the byte count and put channel back in ready state. */ chnl_obj->bytes_moved =0 ; - chnl_obj->dw_state &= ~CHNL_STATECANCEL ; + chnl_obj->state &= ~CHNL_STATECANCEL ; }return status;
@@ -769,7 +769,7 @@ int bridge_chnl_open(struct chnl_object **chnl,return -ENOMEM ;/* Protect queues from io_dpc: */ - pchnl->dw_state =CHNL_STATECANCEL ; + pchnl->state =CHNL_STATECANCEL ;/* Allocate initial IOR and IOC queues: */ status = create_chirp_list(&pchnl->free_packets_list,
@@ -817,7 +817,7 @@ int bridge_chnl_open(struct chnl_object **chnl, chnl_mgr_obj->open_channels++;spin_unlock_bh (&chnl_mgr_obj->chnl_mgr_lock);/* Return result... */ - pchnl->dw_state =CHNL_STATEREADY ; + pchnl->state =CHNL_STATEREADY ; *chnl = pchnl;return status;
drivers/staging/tidspbridge/core/io_sm.c +17 -17
@@ -483,7 +483,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) 1)) == 0)) { status = hio_mgr->intf_fxns-> -pfn_brd_mem_map (hio_mgr->hbridge_context, +brd_mem_map (hio_mgr->hbridge_context, pa_curr, va_curr, page_size[i], map_attrs,NULL );
@@ -549,7 +549,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) }else { status = hio_mgr->intf_fxns-> -pfn_brd_mem_map (hio_mgr->hbridge_context, +brd_mem_map (hio_mgr->hbridge_context, pa_curr, va_curr, page_size[i], map_attrs,NULL );
@@ -615,7 +615,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) ae_proc[ndx].ul_dsp_va); ndx++; }else { - status = hio_mgr->intf_fxns->pfn_brd_mem_map + status = hio_mgr->intf_fxns->brd_mem_map (hio_mgr->hbridge_context, hio_mgr->ext_proc_info.ty_tlb[i]. ul_gpp_phys,
@@ -637,7 +637,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)/* Map the L4 peripherals */ i =0 ;while (l4_peripheral_table[i].phys_addr) { - status = hio_mgr->intf_fxns->pfn_brd_mem_map + status = hio_mgr->intf_fxns->brd_mem_map (hio_mgr->hbridge_context, l4_peripheral_table[i].phys_addr, l4_peripheral_table[i].dsp_virt_addr,HW_PAGE_SIZE4KB , map_attrs,NULL );
@@ -977,8 +977,8 @@ void io_request_chnl(struct io_mgr *io_manager, struct chnl_object *pchnl,* Assertion fires if CHNL_AddIOReq() called on a stream * which was cancelled, or attached to a dead board. */ -DBC_ASSERT ((pchnl->dw_state ==CHNL_STATEREADY ) || - (pchnl->dw_state ==CHNL_STATEEOS )); +DBC_ASSERT ((pchnl->state ==CHNL_STATEREADY ) || + (pchnl->state ==CHNL_STATEEOS ));/* Indicate to the DSP we have a buffer available for input */ set_chnl_busy (sm, pchnl->chnl_id); *mbx_val =MBX_PCPY_CLASS ;
@@ -987,7 +987,7 @@ void io_request_chnl(struct io_mgr *io_manager, struct chnl_object *pchnl,* This assertion fails if CHNL_AddIOReq() was called on a * stream which was cancelled, or attached to a dead board. */ -DBC_ASSERT ((pchnl->dw_state & ~CHNL_STATEEOS ) == +DBC_ASSERT ((pchnl->state & ~CHNL_STATEEOS ) ==CHNL_STATEREADY );/* * Record the fact that we have a buffer available for
@@ -1092,7 +1092,7 @@ static void input_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl, } pchnl = chnl_mgr_obj->ap_channel[chnl_id];if ((pchnl !=NULL ) &&CHNL_IS_INPUT (pchnl->chnl_mode)) { -if ((pchnl->dw_state & ~CHNL_STATEEOS ) ==CHNL_STATEREADY ) { +if ((pchnl->state & ~CHNL_STATEEOS ) ==CHNL_STATEREADY ) {/* Get the I/O request, and attempt a transfer */ if (!list_empty (&pchnl->pio_requests)) {if (!pchnl->cio_reqs)
@@ -1122,7 +1122,7 @@ static void input_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,* sends EOS more than once on this * channel. */ -if (pchnl->dw_state &CHNL_STATEEOS ) +if (pchnl->state &CHNL_STATEEOS ) goto func_end;/* * Zero bytes indicates EOS. Update
@@ -1131,7 +1131,7 @@ static void input_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,*/ chnl_packet_obj->status |=CHNL_IOCSTATEOS ; - pchnl->dw_state |=CHNL_STATEEOS ; + pchnl->state |=CHNL_STATEEOS ;/* * Notify that end of stream has * occurred.
@@ -1329,7 +1329,7 @@ static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,if (sm->output_full) goto func_end; -if (pchnl && !((pchnl->dw_state & ~CHNL_STATEEOS ) ==CHNL_STATEREADY )) +if (pchnl && !((pchnl->state & ~CHNL_STATEEOS ) ==CHNL_STATEREADY )) goto func_end;/* Look to see if both a PC and DSP output channel are ready */
@@ -1814,7 +1814,7 @@ int print_dsp_trace_buffer(struct bridge_dev_context *hbridge_context) psz_buf =kzalloc (ul_num_bytes +2 ,GFP_ATOMIC );if (psz_buf !=NULL ) {/* Read trace buffer data */ - status = (*intf_fxns->pfn_brd_read)(pbridge_context, + status = (*intf_fxns->brd_read)(pbridge_context, (u8 *)psz_buf, (u32 )ul_trace_begin, ul_num_bytes,0 );
@@ -1829,7 +1829,7 @@ int print_dsp_trace_buffer(struct bridge_dev_context *hbridge_context) __func__, psz_buf);/* Read the value at the DSP address in trace_cur_pos. */ - status = (*intf_fxns->pfn_brd_read)(pbridge_context, + status = (*intf_fxns->brd_read)(pbridge_context, (u8 *)&trace_cur_pos, (u32 )trace_cur_pos,4 ,0 );if (status)
@@ -1996,7 +1996,7 @@ int dump_dsp_stack(struct bridge_dev_context *bridge_context) poll_cnt < POLL_MAX) {/* Read DSP dump size from the DSP trace buffer... */ - status = (*intf_fxns->pfn_brd_read)(bridge_context, + status = (*intf_fxns->brd_read)(bridge_context, (u8 *)&mmu_fault_dbg_info, (u32 )trace_begin,sizeof (mmu_fault_dbg_info),0 );
@@ -2032,7 +2032,7 @@ int dump_dsp_stack(struct bridge_dev_context *bridge_context) buffer_end = buffer + total_size /4 ;/* Read bytes from the DSP trace buffer... */ - status = (*intf_fxns->pfn_brd_read)(bridge_context, + status = (*intf_fxns->brd_read)(bridge_context, (u8 *)buffer, (u32 )trace_begin, total_size,0 );if (status) {
@@ -2193,7 +2193,7 @@ void dump_dl_modules(struct bridge_dev_context *bridge_context)pr_debug ("%s: _DLModules at 0x%x\n" , __func__, module_dsp_addr);/* Copy the modules_header structure from DSP memory. */ - status = (*intf_fxns->pfn_brd_read)(bridge_context, (u8 *) &modules_hdr, + status = (*intf_fxns->brd_read)(bridge_context, (u8 *) &modules_hdr, (u32 ) module_dsp_addr,sizeof (modules_hdr),0 );if (status) {
@@ -2228,7 +2228,7 @@ void dump_dl_modules(struct bridge_dev_context *bridge_context) goto func_end; }/* Copy the dll_module structure from DSP memory */ - status = (*intf_fxns->pfn_brd_read)(bridge_context, + status = (*intf_fxns->brd_read)(bridge_context, (u8 *)module_struct, module_dsp_addr, module_size,0 );if (status) {
drivers/staging/tidspbridge/core/tiomap3430.c +1 -1
@@ -765,7 +765,7 @@ static int bridge_dev_create(struct bridge_dev_context } dev_context->dsp_start_add = (u32 )OMAP_GEM_BASE ; - dev_context->dw_self_loop = (u32 )NULL ; + dev_context->self_loop = (u32 )NULL ; dev_context->dsp_per_clks =0 ; dev_context->internal_size =OMAP_DSP_SIZE ;/* Clear dev context MMU table entries.
drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h +2 -2
@@ -127,7 +127,7 @@ struct chnl_mgr {u8 max_channels;/* Total number of channels */ u8 open_channels;/* Total number of open channels */ struct chnl_object **ap_channel;/* Array of channels */ -u8 dw_type;/* Type of channel class library */ +u8 type;/* Type of channel class library */ /* If no shm syms, return for CHNL_Open */ int chnl_open_status; };
@@ -140,7 +140,7 @@ struct chnl_object {/* Pointer back to channel manager */ struct chnl_mgr *chnl_mgr_obj;u32 chnl_id;/* Channel id */ -u8 dw_state;/* Current channel state */ +u8 state;/* Current channel state */ s8 chnl_mode;/* Chnl mode and attributes */ /* Chnl I/O completion event (user mode) */ void *user_event;
drivers/staging/tidspbridge/include/dspbridge/chnlpriv.h +2 -2
@@ -72,7 +72,7 @@ struct chnl_info {/*Abstraction of I/O completion event. */ struct sync_object *sync_event;s8 mode;/* Channel mode. */ -u8 dw_state;/* Current channel state. */ +u8 state;/* Current channel state. */ u32 bytes_tx;/* Total bytes transferred. */ u32 cio_cs;/* Number of IOCs in queue. */ u32 cio_reqs;/* Number of IO Requests in queue. */
@@ -81,7 +81,7 @@ struct chnl_info {/* Channel manager info: */ struct chnl_mgrinfo { -u8 dw_type;/* Type of channel class library. */ +u8 type;/* Type of channel class library. */ /* Channel handle, given the channel id. */ struct chnl_object *chnl_obj;u8 open_channels;/* Number of open channels. */
drivers/staging/tidspbridge/include/dspbridge/cmmdefs.h +3 -3
@@ -60,7 +60,7 @@ struct cmm_seginfo {u32 ul_dsp_size;/* DSP seg size in bytes */ /* # of current GPP allocations from this segment */ u32 ul_in_use_cnt; -u32 dw_seg_base_va;/* Start Virt address of SM seg */ +u32 seg_base_va;/* Start Virt address of SM seg */ };
@@ -83,8 +83,8 @@ struct cmm_xlatorattrs {u32 dsp_buf_size;/* size of DSP-side bufs in GPP bytes */ /* Vm base address alloc'd in client process context */ void *vm_base; -/* dw_vm_size must be >= (dwMaxNumBufs * dwMaxSize) */ -u32 dw_vm_size; +/* vm_size must be >= (dwMaxNumBufs * dwMaxSize) */ +u32 vm_size; };/*
drivers/staging/tidspbridge/include/dspbridge/dbdefs.h +3 -3
@@ -388,9 +388,9 @@ struct dsp_processorinfo {/* Error information of last DSP exception signalled to the GPP */ struct dsp_errorinfo {u32 err_mask; -u32 dw_val1; -u32 dw_val2; -u32 dw_val3; +u32 val1; +u32 val2; +u32 val3; };/* The dsp_processorstate structure describes the state of a DSP processor */
drivers/staging/tidspbridge/include/dspbridge/dspdefs.h +6 -6
@@ -984,17 +984,17 @@ struct bridge_drv_interface {fxn_dev_create pfn_dev_create;/* Create device context */ fxn_dev_destroy pfn_dev_destroy;/* Destroy device context */ fxn_dev_ctrl pfn_dev_cntrl;/* Optional vendor interface */ -fxn_brd_monitor pfn_brd_monitor;/* Load and/or start monitor */ +fxn_brd_monitor brd_monitor;/* Load and/or start monitor */ fxn_brd_start pfn_brd_start;/* Start DSP program. */ fxn_brd_stop pfn_brd_stop;/* Stop/reset board. */ fxn_brd_status pfn_brd_status;/* Get current board status. */ -fxn_brd_read pfn_brd_read;/* Read board memory */ +fxn_brd_read brd_read;/* Read board memory */ fxn_brd_write pfn_brd_write;/* Write board memory. */ fxn_brd_setstate pfn_brd_set_state;/* Sets the Board State */ -fxn_brd_memcopy pfn_brd_mem_copy;/* Copies DSP Memory */ -fxn_brd_memwrite pfn_brd_mem_write;/* Write DSP Memory w/o halt */ -fxn_brd_memmap pfn_brd_mem_map;/* Maps MPU mem to DSP mem */ -fxn_brd_memunmap pfn_brd_mem_un_map;/* Unmaps MPU mem to DSP mem */ +fxn_brd_memcopy brd_mem_copy;/* Copies DSP Memory */ +fxn_brd_memwrite brd_mem_write;/* Write DSP Memory w/o halt */ +fxn_brd_memmap brd_mem_map;/* Maps MPU mem to DSP mem */ +fxn_brd_memunmap brd_mem_un_map;/* Unmaps MPU mem to DSP mem */ fxn_chnl_create pfn_chnl_create;/* Create channel manager. */ fxn_chnl_destroy pfn_chnl_destroy;/* Destroy channel manager. */ fxn_chnl_open pfn_chnl_open;/* Create a new channel. */
drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h +1 -1
@@ -280,7 +280,7 @@ typedef int(*nldr_unloadfxn) (struct nldr_nodeobject *nldr_node_obj,* ======== node_ldr_fxns ======== */ struct node_ldr_fxns { -nldr_allocatefxn pfn_allocate; +nldr_allocatefxn allocate;nldr_createfxn pfn_create;nldr_deletefxn pfn_delete;nldr_exitfxn pfn_exit;
drivers/staging/tidspbridge/pmgr/cmm.c +22 -22
147 lines not on this page · raw message
drivers/staging/tidspbridge/pmgr/dev.c +8 -8
@@ -1088,17 +1088,17 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,STORE_FXN (fxn_dev_create, pfn_dev_create);STORE_FXN (fxn_dev_destroy, pfn_dev_destroy);STORE_FXN (fxn_dev_ctrl, pfn_dev_cntrl); -STORE_FXN (fxn_brd_monitor, pfn_brd_monitor); +STORE_FXN (fxn_brd_monitor, brd_monitor);STORE_FXN (fxn_brd_start, pfn_brd_start);STORE_FXN (fxn_brd_stop, pfn_brd_stop);STORE_FXN (fxn_brd_status, pfn_brd_status); -STORE_FXN (fxn_brd_read, pfn_brd_read); +STORE_FXN (fxn_brd_read, brd_read);STORE_FXN (fxn_brd_write, pfn_brd_write);STORE_FXN (fxn_brd_setstate, pfn_brd_set_state); -STORE_FXN (fxn_brd_memcopy, pfn_brd_mem_copy); -STORE_FXN (fxn_brd_memwrite, pfn_brd_mem_write); -STORE_FXN (fxn_brd_memmap, pfn_brd_mem_map); -STORE_FXN (fxn_brd_memunmap, pfn_brd_mem_un_map); +STORE_FXN (fxn_brd_memcopy, brd_mem_copy); +STORE_FXN (fxn_brd_memwrite, brd_mem_write); +STORE_FXN (fxn_brd_memmap, brd_mem_map); +STORE_FXN (fxn_brd_memunmap, brd_mem_un_map);STORE_FXN (fxn_chnl_create, pfn_chnl_create);STORE_FXN (fxn_chnl_destroy, pfn_chnl_destroy);STORE_FXN (fxn_chnl_open, pfn_chnl_open);
@@ -1129,11 +1129,11 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,DBC_ENSURE (intf_fxns->pfn_dev_create !=NULL );DBC_ENSURE (intf_fxns->pfn_dev_destroy !=NULL );DBC_ENSURE (intf_fxns->pfn_dev_cntrl !=NULL ); -DBC_ENSURE (intf_fxns->pfn_brd_monitor !=NULL ); +DBC_ENSURE (intf_fxns->brd_monitor !=NULL );DBC_ENSURE (intf_fxns->pfn_brd_start !=NULL );DBC_ENSURE (intf_fxns->pfn_brd_stop !=NULL );DBC_ENSURE (intf_fxns->pfn_brd_status !=NULL ); -DBC_ENSURE (intf_fxns->pfn_brd_read !=NULL ); +DBC_ENSURE (intf_fxns->brd_read !=NULL );DBC_ENSURE (intf_fxns->pfn_brd_write !=NULL );DBC_ENSURE (intf_fxns->pfn_chnl_create !=NULL );DBC_ENSURE (intf_fxns->pfn_chnl_destroy !=NULL );
drivers/staging/tidspbridge/rmgr/node.c +3 -3
@@ -577,7 +577,7 @@ func_cont:if (!status) {/* Create object for dynamic loading */ - status = hnode_mgr->nldr_fxns.pfn_allocate(hnode_mgr->nldr_obj, + status = hnode_mgr->nldr_fxns.allocate(hnode_mgr->nldr_obj, (void *)pnode, &pnode->dcd_props. obj_data.node_obj,
@@ -3117,7 +3117,7 @@ static u32 ovly(void *priv_ref, u32 dsp_run_addr, u32 dsp_load_addr, status =dev_get_bridge_context (hnode_mgr->hdev_obj, &hbridge_context);if (!status) { status = - (*intf_fxns->pfn_brd_mem_copy) (hbridge_context, + (*intf_fxns->brd_mem_copy) (hbridge_context, dsp_run_addr, dsp_load_addr, ul_num_bytes, (u32 ) mem_space);if (!status)
@@ -3159,7 +3159,7 @@ static u32 mem_write(void *priv_ref, u32 dsp_add, void *pbuf,/* Call new MemWrite function */ intf_fxns = hnode_mgr->intf_fxns; status =dev_get_bridge_context (hnode_mgr->hdev_obj, &hbridge_context); - status = (*intf_fxns->pfn_brd_mem_write) (hbridge_context, pbuf, + status = (*intf_fxns->brd_mem_write) (hbridge_context, pbuf, dsp_add, ul_num_bytes, mem_sect_type);return ul_num_bytes;
drivers/staging/tidspbridge/rmgr/proc.c +3 -3
@@ -1397,7 +1397,7 @@ int proc_map(void *hprocessor, void *pmpu_addr, u32 ul_size,if (!map_obj) status = -ENOMEM ;else - status = (*p_proc_object->intf_fxns->pfn_brd_mem_map) + status = (*p_proc_object->intf_fxns->brd_mem_map) (p_proc_object->hbridge_context, pa_align, va_align, size_align, ul_map_attr, map_obj->pages); }
@@ -1720,7 +1720,7 @@ int proc_un_map(void *hprocessor, void *map_addr, status =dmm_un_map_memory (dmm_mgr, (u32 ) va_align, &size_align);/* Remove mapping from the page tables. */ if (!status) { - status = (*p_proc_object->intf_fxns->pfn_brd_mem_un_map) + status = (*p_proc_object->intf_fxns->brd_mem_un_map) (p_proc_object->hbridge_context, va_align, size_align); }
@@ -1828,7 +1828,7 @@ static int proc_monitor(struct proc_object *proc_obj) } }/* Place the Board in the Monitor State */ -if (!((*proc_obj->intf_fxns->pfn_brd_monitor) +if (!((*proc_obj->intf_fxns->brd_monitor) (proc_obj->hbridge_context))) { status =0 ; if (!((*proc_obj->intf_fxns->pfn_brd_status)
drivers/staging/tidspbridge/rmgr/strm.c +1 -1
@@ -344,7 +344,7 @@ int strm_get_info(struct strm_object *stream_obj, stream_info->user_strm->ul_number_bytes = chnl_info_obj.bytes_tx; stream_info->user_strm->sync_object_handle = chnl_info_obj.event_obj;/* Determine stream state based on channel state and info */ -if (chnl_info_obj.dw_state &CHNL_STATEEOS ) { +if (chnl_info_obj.state &CHNL_STATEEOS ) { stream_info->user_strm->ss_stream_state =STREAM_DONE ; }else {if (chnl_info_obj.cio_cs >0 )
Signature · 1 line
1.6.3.3
PATCH 4/12 staging:tidspbridge - set4 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: pfn_brd_set_state brd_set_state pfn_brd_start brd_start pfn_brd_status brd_status pfn_brd_stop brd_stop pfn_brd_write brd_write pfn_chnl_add_io_req chnl_add_io_req pfn_chnl_cancel_io chnl_cancel_io pfn_chnl_close chnl_close pfn_chnl_create chnl_create pfn_chnl_destroy chnl_destroy pfn_chnl_flush_io chnl_flush_io pfn_chnl_get_info chnl_get_info pfn_chnl_get_ioc chnl_get_ioc pfn_chnl_get_mgr_info chnl_get_mgr_info pfn_chnl_idle chnl_idle pfn_chnl_open chnl_open
pfn_chnl_register_notify chnl_register_notifypfn_create createpfn_delete deletepfn_dev_cntrl dev_cntrl
--- drivers/staging/tidspbridge/core/io_sm.c | 8 +- .../tidspbridge/include/dspbridge/dspdefs.h | 36 +++++----- .../tidspbridge/include/dspbridge/nldrdefs.h | 4 +- drivers/staging/tidspbridge/pmgr/chnl.c | 4 +- drivers/staging/tidspbridge/pmgr/dev.c | 72 ++++++++++---------- drivers/staging/tidspbridge/rmgr/disp.c | 16 ++-- drivers/staging/tidspbridge/rmgr/node.c | 4 +- drivers/staging/tidspbridge/rmgr/proc.c | 20 +++--- drivers/staging/tidspbridge/rmgr/pwr.c | 8 +- drivers/staging/tidspbridge/rmgr/strm.c | 20 +++--- 10 files changed, 96 insertions(+), 96 deletions(-)
drivers/staging/tidspbridge/core/io_sm.c +4 -4
@@ -683,7 +683,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)*/ status = - hio_mgr->intf_fxns->pfn_dev_cntrl (hio_mgr->hbridge_context, + hio_mgr->intf_fxns->dev_cntrl (hio_mgr->hbridge_context,BRDIOCTL_SETMMUCONFIG , ae_proc);if (status)
@@ -829,7 +829,7 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr)if (parg[0 ] ==MBX_PM_HIBERNATE_EN ) {dev_dbg (bridge,"PM: Hibernate command\n" ); status = pio_mgr->intf_fxns-> -pfn_dev_cntrl (pio_mgr->hbridge_context, +dev_cntrl (pio_mgr->hbridge_context,BRDIOCTL_PWR_HIBERNATE , parg);if (status) pr_err("%s: hibernate cmd failed 0x%x\n",
@@ -838,7 +838,7 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr) parg[1 ] = pio_mgr->shared_mem->opp_request.rqst_opp_pt;dev_dbg (bridge,"PM: Requested OPP = 0x%x\n" , parg[1 ]); status = pio_mgr->intf_fxns-> -pfn_dev_cntrl (pio_mgr->hbridge_context, +dev_cntrl (pio_mgr->hbridge_context,BRDIOCTL_CONSTRAINT_REQUEST , parg);if (status) dev_dbg(bridge, "PM: Failed to set constraint "
@@ -847,7 +847,7 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr)dev_dbg (bridge,"PM: clk control value of msg = 0x%x\n" , parg[0 ]); status = pio_mgr->intf_fxns-> -pfn_dev_cntrl (pio_mgr->hbridge_context, +dev_cntrl (pio_mgr->hbridge_context,BRDIOCTL_CLK_CTRL , parg);if (status) dev_dbg(bridge, "PM: Failed to ctrl the DSP clk"
drivers/staging/tidspbridge/include/dspbridge/dspdefs.h +18 -18
@@ -983,32 +983,32 @@ struct bridge_drv_interface {u32 brd_api_minor_version;/* Set to BRD_API_MINOR_VERSION. */ fxn_dev_create pfn_dev_create;/* Create device context */ fxn_dev_destroy pfn_dev_destroy;/* Destroy device context */ -fxn_dev_ctrl pfn_dev_cntrl;/* Optional vendor interface */ +fxn_dev_ctrl dev_cntrl;/* Optional vendor interface */ fxn_brd_monitor brd_monitor;/* Load and/or start monitor */ -fxn_brd_start pfn_brd_start;/* Start DSP program. */ -fxn_brd_stop pfn_brd_stop;/* Stop/reset board. */ -fxn_brd_status pfn_brd_status;/* Get current board status. */ +fxn_brd_start brd_start;/* Start DSP program. */ +fxn_brd_stop brd_stop;/* Stop/reset board. */ +fxn_brd_status brd_status;/* Get current board status. */ fxn_brd_read brd_read;/* Read board memory */ -fxn_brd_write pfn_brd_write;/* Write board memory. */ -fxn_brd_setstate pfn_brd_set_state;/* Sets the Board State */ +fxn_brd_write brd_write;/* Write board memory. */ +fxn_brd_setstate brd_set_state;/* Sets the Board State */ fxn_brd_memcopy brd_mem_copy;/* Copies DSP Memory */ fxn_brd_memwrite brd_mem_write;/* Write DSP Memory w/o halt */ fxn_brd_memmap brd_mem_map;/* Maps MPU mem to DSP mem */ fxn_brd_memunmap brd_mem_un_map;/* Unmaps MPU mem to DSP mem */ -fxn_chnl_create pfn_chnl_create;/* Create channel manager. */ -fxn_chnl_destroy pfn_chnl_destroy;/* Destroy channel manager. */ -fxn_chnl_open pfn_chnl_open;/* Create a new channel. */ -fxn_chnl_close pfn_chnl_close;/* Close a channel. */ -fxn_chnl_addioreq pfn_chnl_add_io_req;/* Req I/O on a channel. */ -fxn_chnl_getioc pfn_chnl_get_ioc;/* Wait for I/O completion. */ -fxn_chnl_cancelio pfn_chnl_cancel_io;/* Cancl I/O on a channel. */ -fxn_chnl_flushio pfn_chnl_flush_io;/* Flush I/O. */ -fxn_chnl_getinfo pfn_chnl_get_info;/* Get channel specific info */ +fxn_chnl_create chnl_create;/* Create channel manager. */ +fxn_chnl_destroy chnl_destroy;/* Destroy channel manager. */ +fxn_chnl_open chnl_open;/* Create a new channel. */ +fxn_chnl_close chnl_close;/* Close a channel. */ +fxn_chnl_addioreq chnl_add_io_req;/* Req I/O on a channel. */ +fxn_chnl_getioc chnl_get_ioc;/* Wait for I/O completion. */ +fxn_chnl_cancelio chnl_cancel_io;/* Cancl I/O on a channel. */ +fxn_chnl_flushio chnl_flush_io;/* Flush I/O. */ +fxn_chnl_getinfo chnl_get_info;/* Get channel specific info */ /* Get channel manager info. */ -fxn_chnl_getmgrinfo pfn_chnl_get_mgr_info; -fxn_chnl_idle pfn_chnl_idle;/* Idle the channel */ +fxn_chnl_getmgrinfo chnl_get_mgr_info; +fxn_chnl_idle chnl_idle;/* Idle the channel */ /* Register for notif. */ -fxn_chnl_registernotify pfn_chnl_register_notify; +fxn_chnl_registernotify chnl_register_notify;fxn_io_create pfn_io_create;/* Create IO manager */ fxn_io_destroy pfn_io_destroy;/* Destroy IO manager */ fxn_io_onloaded pfn_io_on_loaded;/* Notify of program loaded */
drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h +2 -2
@@ -281,8 +281,8 @@ typedef int(*nldr_unloadfxn) (struct nldr_nodeobject *nldr_node_obj,*/ struct node_ldr_fxns {nldr_allocatefxn allocate; -nldr_createfxn pfn_create; -nldr_deletefxn pfn_delete; +nldr_createfxn create; +nldr_deletefxn delete;nldr_exitfxn pfn_exit;nldr_getfxnaddrfxn pfn_get_fxn_addr;nldr_initfxn pfn_init;
drivers/staging/tidspbridge/pmgr/chnl.c +2 -2
@@ -87,7 +87,7 @@ int chnl_create(struct chnl_mgr **channel_mgr,struct bridge_drv_interface *intf_fxns;dev_get_intf_fxns (hdev_obj, &intf_fxns);/* Let Bridge channel module finish the create: */ - status = (*intf_fxns->pfn_chnl_create) (&hchnl_mgr, hdev_obj, + status = (*intf_fxns->chnl_create) (&hchnl_mgr, hdev_obj, mgr_attrts);if (!status) {/* Fill in DSP API channel module's fields of the
@@ -120,7 +120,7 @@ int chnl_destroy(struct chnl_mgr *hchnl_mgr)if (chnl_mgr_obj) { intf_fxns = chnl_mgr_obj->intf_fxns;/* Let Bridge channel module destroy the chnl_mgr: */ - status = (*intf_fxns->pfn_chnl_destroy) (hchnl_mgr); + status = (*intf_fxns->chnl_destroy) (hchnl_mgr); }else { status = -EFAULT ; }
drivers/staging/tidspbridge/pmgr/dev.c +36 -36
98 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/disp.c +8 -8
@@ -141,7 +141,7 @@ int disp_create(struct disp_object **dispatch_obj, chnl_attr_obj.uio_reqs =CHNLIOREQS ; chnl_attr_obj.event_obj =NULL ; ul_chnl_id = disp_attrs->ul_chnl_offset +CHNLTORMSOFFSET ; - status = (*intf_fxns->pfn_chnl_open) (&(disp_obj->chnl_to_dsp), + status = (*intf_fxns->chnl_open) (&(disp_obj->chnl_to_dsp), disp_obj->hchnl_mgr,CHNL_MODETODSP , ul_chnl_id, &chnl_attr_obj);
@@ -149,7 +149,7 @@ int disp_create(struct disp_object **dispatch_obj,if (!status) { ul_chnl_id = disp_attrs->ul_chnl_offset +CHNLFROMRMSOFFSET ; status = - (*intf_fxns->pfn_chnl_open) (&(disp_obj->chnl_from_dsp), + (*intf_fxns->chnl_open) (&(disp_obj->chnl_from_dsp), disp_obj->hchnl_mgr,CHNL_MODEFROMDSP , ul_chnl_id, &chnl_attr_obj);
@@ -566,7 +566,7 @@ static void delete_disp(struct disp_object *disp_obj)if (disp_obj->chnl_from_dsp) {/* Channel close can fail only if the channel handle * is invalid. */ - status = (*intf_fxns->pfn_chnl_close) + status = (*intf_fxns->chnl_close) (disp_obj->chnl_from_dsp);if (status) { dev_dbg(bridge, "%s: Failed to close channel "
@@ -575,7 +575,7 @@ static void delete_disp(struct disp_object *disp_obj) }if (disp_obj->chnl_to_dsp) { status = - (*intf_fxns->pfn_chnl_close) (disp_obj-> + (*intf_fxns->chnl_close) (disp_obj-> chnl_to_dsp);if (status) { dev_dbg(bridge, "%s: Failed to close channel to"
@@ -667,13 +667,13 @@ static int send_message(struct disp_object *disp_obj, u32 timeout, pbuf = disp_obj->pbuf;/* Send the command */ - status = (*intf_fxns->pfn_chnl_add_io_req) (chnl_obj, pbuf, ul_bytes,0 , + status = (*intf_fxns->chnl_add_io_req) (chnl_obj, pbuf, ul_bytes,0 ,0L , dw_arg);if (status) goto func_end; status = - (*intf_fxns->pfn_chnl_get_ioc) (chnl_obj, timeout, &chnl_ioc_obj); + (*intf_fxns->chnl_get_ioc) (chnl_obj, timeout, &chnl_ioc_obj);if (!status) {if (!CHNL_IS_IO_COMPLETE (chnl_ioc_obj)) {if (CHNL_IS_TIMED_OUT (chnl_ioc_obj))
@@ -688,13 +688,13 @@ static int send_message(struct disp_object *disp_obj, u32 timeout, chnl_obj = disp_obj->chnl_from_dsp; ul_bytes =REPLYSIZE ; - status = (*intf_fxns->pfn_chnl_add_io_req) (chnl_obj, pbuf, ul_bytes, + status = (*intf_fxns->chnl_add_io_req) (chnl_obj, pbuf, ul_bytes,0 ,0L , dw_arg);if (status) goto func_end; status = - (*intf_fxns->pfn_chnl_get_ioc) (chnl_obj, timeout, &chnl_ioc_obj); + (*intf_fxns->chnl_get_ioc) (chnl_obj, timeout, &chnl_ioc_obj);if (!status) {if (CHNL_IS_TIMED_OUT (chnl_ioc_obj)) { status = -ETIME ;
drivers/staging/tidspbridge/rmgr/node.c +2 -2
@@ -1408,7 +1408,7 @@ int node_create_mgr(struct node_mgr **node_man, nldr_attrs_obj.us_dsp_mau_size = node_mgr_obj->udsp_mau_size; node_mgr_obj->loader_init = node_mgr_obj->nldr_fxns.pfn_init (); status = - node_mgr_obj->nldr_fxns.pfn_create (&node_mgr_obj->nldr_obj, + node_mgr_obj->nldr_fxns.create (&node_mgr_obj->nldr_obj, hdev_obj, &nldr_attrs_obj); }
@@ -2650,7 +2650,7 @@ static void delete_node_mgr(struct node_mgr *hnode_mgr)/* Delete the loader */ if (hnode_mgr->nldr_obj) - hnode_mgr->nldr_fxns.pfn_delete (hnode_mgr->nldr_obj); + hnode_mgr->nldr_fxns.delete (hnode_mgr->nldr_obj);if (hnode_mgr->loader_init) hnode_mgr->nldr_fxns.pfn_exit ();
drivers/staging/tidspbridge/rmgr/proc.c +10 -10
@@ -540,7 +540,7 @@ int proc_ctrl(void *hprocessor, u32 dw_cmd, struct dsp_cbdata * arg)/* timeout = arg->cb_data; */ status =pwr_wake_dsp (timeout); }else -if (!((*p_proc_object->intf_fxns->pfn_dev_cntrl) +if (!((*p_proc_object->intf_fxns->dev_cntrl) (p_proc_object->hbridge_context, dw_cmd, arg))) { status =0 ;
@@ -995,7 +995,7 @@ int proc_get_state(void *hprocessor,if (p_proc_object) {/* First, retrieve BRD state information */ - status = (*p_proc_object->intf_fxns->pfn_brd_status) + status = (*p_proc_object->intf_fxns->brd_status) (p_proc_object->hbridge_context, &brd_status);if (!status) {switch (brd_status) {
@@ -1262,7 +1262,7 @@ int proc_load(void *hprocessor, const s32 argc_index, }if (!status) {/* Update the Processor status to loaded */ - status = (*p_proc_object->intf_fxns->pfn_brd_set_state) + status = (*p_proc_object->intf_fxns->brd_set_state) (p_proc_object->hbridge_context,BRD_LOADED );if (!status) { p_proc_object->proc_state =PROC_LOADED ;
@@ -1304,7 +1304,7 @@ int proc_load(void *hprocessor, const s32 argc_index,kfree (new_envp); user_args[0 ] = pargv0;if (!status) { -if (!((*p_proc_object->intf_fxns->pfn_brd_status) +if (!((*p_proc_object->intf_fxns->brd_status) (p_proc_object->hbridge_context, &brd_state))) {pr_info ("%s: Processor Loaded %s\n" , __func__, pargv0);kfree (drv_datap->base_img);
@@ -1580,7 +1580,7 @@ int proc_start(void *hprocessor)if (status) goto func_cont; - status = (*p_proc_object->intf_fxns->pfn_brd_start) + status = (*p_proc_object->intf_fxns->brd_start) (p_proc_object->hbridge_context, dw_dsp_addr);if (status) goto func_cont;
@@ -1601,12 +1601,12 @@ int proc_start(void *hprocessor)/* Failed to Create Node Manager and DISP Object * Stop the Processor from running. Put it in STOPPED State */ (void )(*p_proc_object->intf_fxns-> - pfn_brd_stop) (p_proc_object->hbridge_context); + brd_stop) (p_proc_object->hbridge_context); p_proc_object->proc_state =PROC_STOPPED ; } func_cont:if (!status) { -if (!((*p_proc_object->intf_fxns->pfn_brd_status) +if (!((*p_proc_object->intf_fxns->brd_status) (p_proc_object->hbridge_context, &brd_state))) {pr_info ("%s: dsp in running state\n" , __func__);DBC_ASSERT (brd_state !=BRD_HIBERNATION );
@@ -1659,7 +1659,7 @@ int proc_stop(void *hprocessor)/* It is OK to stop a device that does n't have nodes OR not started */ status = (*p_proc_object->intf_fxns-> - pfn_brd_stop) (p_proc_object->hbridge_context); + brd_stop) (p_proc_object->hbridge_context);if (!status) {dev_dbg (bridge,"%s: processor in standby mode\n" , __func__); p_proc_object->proc_state =PROC_STOPPED ;
@@ -1672,7 +1672,7 @@ int proc_stop(void *hprocessor)dev_set_msg_mgr (p_proc_object->hdev_obj,NULL ); }if (!((*p_proc_object-> - intf_fxns->pfn_brd_status) (p_proc_object-> + intf_fxns->brd_status) (p_proc_object-> hbridge_context, &brd_state)))DBC_ASSERT (brd_state ==BRD_STOPPED );
@@ -1831,7 +1831,7 @@ static int proc_monitor(struct proc_object *proc_obj)if (!((*proc_obj->intf_fxns->brd_monitor) (proc_obj->hbridge_context))) { status =0 ; -if (!((*proc_obj->intf_fxns->pfn_brd_status) +if (!((*proc_obj->intf_fxns->brd_status) (proc_obj->hbridge_context, &brd_state)))DBC_ASSERT (brd_state ==BRD_IDLE ); }
drivers/staging/tidspbridge/rmgr/pwr.c +4 -4
@@ -67,7 +67,7 @@ int pwr_sleep_dsp(const u32 sleep_code, const u32 timeout) status = -EINVAL ;if (status != -EINVAL ) { - status = (*intf_fxns->pfn_dev_cntrl) (dw_context, + status = (*intf_fxns->dev_cntrl) (dw_context, ioctlcode, (void *)&arg); }
@@ -97,7 +97,7 @@ int pwr_wake_dsp(const u32 timeout)if (!(dev_get_intf_fxns (hdev_obj, (struct bridge_drv_interface **)&intf_fxns))) { status = - (*intf_fxns->pfn_dev_cntrl) (dw_context, + (*intf_fxns->dev_cntrl) (dw_context,BRDIOCTL_WAKEUP , (void *)&arg); }
@@ -131,7 +131,7 @@ int pwr_pm_pre_scale(u16 voltage_domain, u32 level)if (!(dev_get_intf_fxns (hdev_obj, (struct bridge_drv_interface **)&intf_fxns))) { status = - (*intf_fxns->pfn_dev_cntrl) (dw_context, + (*intf_fxns->dev_cntrl) (dw_context,BRDIOCTL_PRESCALE_NOTIFY , (void *)&arg); }
@@ -165,7 +165,7 @@ int pwr_pm_post_scale(u16 voltage_domain, u32 level)if (!(dev_get_intf_fxns (hdev_obj, (struct bridge_drv_interface **)&intf_fxns))) { status = - (*intf_fxns->pfn_dev_cntrl) (dw_context, + (*intf_fxns->dev_cntrl) (dw_context,BRDIOCTL_POSTSCALE_NOTIFY , (void *)&arg); }
drivers/staging/tidspbridge/rmgr/strm.c +10 -10
@@ -165,7 +165,7 @@ int strm_close(struct strm_res_object *strmres,* -EPIPE */ intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; status = - (*intf_fxns->pfn_chnl_get_info) (stream_obj->chnl_obj, + (*intf_fxns->chnl_get_info) (stream_obj->chnl_obj, &chnl_info_obj);DBC_ASSERT (!status);
@@ -323,7 +323,7 @@ int strm_get_info(struct strm_object *stream_obj, intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; status = - (*intf_fxns->pfn_chnl_get_info) (stream_obj->chnl_obj, + (*intf_fxns->chnl_get_info) (stream_obj->chnl_obj, &chnl_info_obj);if (status) goto func_end;
@@ -377,7 +377,7 @@ int strm_idle(struct strm_object *stream_obj, bool flush_data) }else { intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; - status = (*intf_fxns->pfn_chnl_idle) (stream_obj->chnl_obj, + status = (*intf_fxns->chnl_idle) (stream_obj->chnl_obj, stream_obj->utimeout, flush_data); }
@@ -435,7 +435,7 @@ int strm_issue(struct strm_object *stream_obj, u8 *pbuf, u32 ul_bytes, }if (!status) { - status = (*intf_fxns->pfn_chnl_add_io_req) + status = (*intf_fxns->chnl_add_io_req) (stream_obj->chnl_obj, pbuf, ul_bytes, ul_buf_size, (u32 ) tmp_buf, dw_arg); }
@@ -557,7 +557,7 @@ func_cont: chnl_mode = (dir ==DSP_TONODE ) ?CHNL_MODETODSP :CHNL_MODEFROMDSP ; intf_fxns = strm_mgr_obj->intf_fxns; - status = (*intf_fxns->pfn_chnl_open) (&(strm_obj->chnl_obj), + status = (*intf_fxns->chnl_open) (&(strm_obj->chnl_obj), strm_mgr_obj->hchnl_mgr, chnl_mode, ul_chnl_id, &chnl_attr_obj);
@@ -631,7 +631,7 @@ int strm_reclaim(struct strm_object *stream_obj, u8 ** buf_ptr, intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; status = - (*intf_fxns->pfn_chnl_get_ioc) (stream_obj->chnl_obj, + (*intf_fxns->chnl_get_ioc) (stream_obj->chnl_obj, stream_obj->utimeout, &chnl_ioc_obj);if (!status) {
@@ -719,7 +719,7 @@ int strm_register_notify(struct strm_object *stream_obj, u32 event_mask, intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; status = - (*intf_fxns->pfn_chnl_register_notify) (stream_obj-> + (*intf_fxns->chnl_register_notify) (stream_obj-> chnl_obj, event_mask, notify_type,
@@ -765,7 +765,7 @@ int strm_select(struct strm_object **strm_tab, u32 strms,/* Determine which channels have IO ready */ for (i =0 ; i < strms; i++) { intf_fxns = strm_tab[i]->strm_mgr_obj->intf_fxns; - status = (*intf_fxns->pfn_chnl_get_info) (strm_tab[i]->chnl_obj, + status = (*intf_fxns->chnl_get_info) (strm_tab[i]->chnl_obj, &chnl_info_obj);if (status) {break ;
@@ -786,7 +786,7 @@ int strm_select(struct strm_object **strm_tab, u32 strms,for (i =0 ; i < strms; i++) { intf_fxns = strm_tab[i]->strm_mgr_obj->intf_fxns; - status = (*intf_fxns->pfn_chnl_get_info) + status = (*intf_fxns->chnl_get_info) (strm_tab[i]->chnl_obj, &chnl_info_obj);if (status)break ;
@@ -832,7 +832,7 @@ static int delete_strm(struct strm_object *stream_obj) intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;/* Channel close can fail only if the channel handle * is invalid. */ - status = (*intf_fxns->pfn_chnl_close) + status = (*intf_fxns->chnl_close) (stream_obj->chnl_obj); }/* Free all SM address translator resources */
Signature · 1 line
1.6.3.3
PATCH 5/12 staging:tidspbridge - set5 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: pfn_dev_create by dev_create pfn_dev_destroy dev_destroy pfn_exit exit pfn_get_fxn_addr get_fxn_addr pfn_init init pfn_io_create io_create pfn_io_destroy io_destroy pfn_io_get_proc_load io_get_proc_load pfn_io_on_loaded io_on_loaded pfn_load load pfn_msg_create msg_create pfn_msg_create_queue msg_create_queue pfn_msg_delete msg_delete pfn_msg_delete_queue msg_delete_queue pfn_msg_get msg_get pfn_msg_put msg_put pfn_msg_register_notify msg_register_notify pfn_msg_set_queue_id msg_set_queue_id pfn_ovly ovly pfn_unload unload
--- .../tidspbridge/include/dspbridge/dspdefs.h | 28 ++++++------ .../tidspbridge/include/dspbridge/nldrdefs.h | 12 +++--- drivers/staging/tidspbridge/pmgr/dev.c | 46 ++++++++++---------- drivers/staging/tidspbridge/pmgr/io.c | 4 +- drivers/staging/tidspbridge/pmgr/msg.c | 4 +- drivers/staging/tidspbridge/rmgr/nldr.c | 4 +- drivers/staging/tidspbridge/rmgr/node.c | 46 ++++++++++---------- drivers/staging/tidspbridge/rmgr/proc.c | 4 +- 8 files changed, 74 insertions(+), 74 deletions(-)
drivers/staging/tidspbridge/include/dspbridge/dspdefs.h +14 -14
@@ -981,8 +981,8 @@ typedef void (*fxn_msg_setqueueid) (struct msg_queue *msg_queue_obj,struct bridge_drv_interface {u32 brd_api_major_version;/* Set to BRD_API_MAJOR_VERSION. */ u32 brd_api_minor_version;/* Set to BRD_API_MINOR_VERSION. */ -fxn_dev_create pfn_dev_create;/* Create device context */ -fxn_dev_destroy pfn_dev_destroy;/* Destroy device context */ +fxn_dev_create dev_create;/* Create device context */ +fxn_dev_destroy dev_destroy;/* Destroy device context */ fxn_dev_ctrl dev_cntrl;/* Optional vendor interface */ fxn_brd_monitor brd_monitor;/* Load and/or start monitor */ fxn_brd_start brd_start;/* Start DSP program. */
@@ -1009,23 +1009,23 @@ struct bridge_drv_interface {fxn_chnl_idle chnl_idle;/* Idle the channel */ /* Register for notif. */ fxn_chnl_registernotify chnl_register_notify; -fxn_io_create pfn_io_create;/* Create IO manager */ -fxn_io_destroy pfn_io_destroy;/* Destroy IO manager */ -fxn_io_onloaded pfn_io_on_loaded;/* Notify of program loaded */ +fxn_io_create io_create;/* Create IO manager */ +fxn_io_destroy io_destroy;/* Destroy IO manager */ +fxn_io_onloaded io_on_loaded;/* Notify of program loaded */ /* Get Processor's current and predicted load */ -fxn_io_getprocload pfn_io_get_proc_load; -fxn_msg_create pfn_msg_create;/* Create message manager */ +fxn_io_getprocload io_get_proc_load; +fxn_msg_create msg_create;/* Create message manager */ /* Create message queue */ -fxn_msg_createqueue pfn_msg_create_queue; -fxn_msg_delete pfn_msg_delete;/* Delete message manager */ +fxn_msg_createqueue msg_create_queue; +fxn_msg_delete msg_delete;/* Delete message manager */ /* Delete message queue */ -fxn_msg_deletequeue pfn_msg_delete_queue; -fxn_msg_get pfn_msg_get;/* Get a message */ -fxn_msg_put pfn_msg_put;/* Send a message */ +fxn_msg_deletequeue msg_delete_queue; +fxn_msg_get msg_get;/* Get a message */ +fxn_msg_put msg_put;/* Send a message */ /* Register for notif. */ -fxn_msg_registernotify pfn_msg_register_notify; +fxn_msg_registernotify msg_register_notify;/* Set message queue id */ -fxn_msg_setqueueid pfn_msg_set_queue_id; +fxn_msg_setqueueid msg_set_queue_id; };/*
drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h +6 -6
@@ -82,7 +82,7 @@ typedef u32(*nldr_writefxn) (void *priv_ref,* Attributes passed to nldr_create function. */ struct nldr_attrs { -nldr_ovlyfxn pfn_ovly; +nldr_ovlyfxn ovly;nldr_writefxn pfn_write;u16 us_dsp_word_size;u16 us_dsp_mau_size;
@@ -283,11 +283,11 @@ struct node_ldr_fxns {nldr_allocatefxn allocate;nldr_createfxn create;nldr_deletefxn delete; -nldr_exitfxn pfn_exit; -nldr_getfxnaddrfxn pfn_get_fxn_addr; -nldr_initfxn pfn_init; -nldr_loadfxn pfn_load; - nldr_unloadfxn pfn_unload; +nldr_exitfxn exit; +nldr_getfxnaddrfxn get_fxn_addr; +nldr_initfxn init; +nldr_loadfxn load; + nldr_unloadfxn unload; };#endif /* NLDRDEFS_ */
drivers/staging/tidspbridge/pmgr/dev.c +23 -23
79 lines not on this page · raw message
drivers/staging/tidspbridge/pmgr/io.c +2 -2
@@ -68,7 +68,7 @@ int io_create(struct io_mgr **io_man, struct dev_object *hdev_obj,dev_get_intf_fxns (hdev_obj, &intf_fxns);/* Let Bridge channel module finish the create: */ - status = (*intf_fxns->pfn_io_create) (&hio_mgr, hdev_obj, + status = (*intf_fxns->io_create) (&hio_mgr, hdev_obj, mgr_attrts);if (!status) {
@@ -100,7 +100,7 @@ int io_destroy(struct io_mgr *hio_mgr) intf_fxns = pio_mgr->intf_fxns;/* Let Bridge channel module destroy the io_mgr: */ - status = (*intf_fxns->pfn_io_destroy) (hio_mgr); + status = (*intf_fxns->io_destroy) (hio_mgr);return status; }
drivers/staging/tidspbridge/pmgr/msg.c +2 -2
@@ -64,7 +64,7 @@ int msg_create(struct msg_mgr **msg_man,/* Let Bridge message module finish the create: */ status = - (*intf_fxns->pfn_msg_create) (&hmsg_mgr, hdev_obj, msg_callback); + (*intf_fxns->msg_create) (&hmsg_mgr, hdev_obj, msg_callback);if (!status) {/* Fill in DSP API message module's fields of the msg_mgr
@@ -96,7 +96,7 @@ void msg_delete(struct msg_mgr *hmsg_mgr) intf_fxns = msg_mgr_obj->intf_fxns;/* Let Bridge message module destroy the msg_mgr: */ - (*intf_fxns->pfn_msg_delete) (hmsg_mgr); + (*intf_fxns->msg_delete) (hmsg_mgr); }else {dev_dbg (bridge,"%s: Error hmsg_mgr handle: %p\n" , __func__, hmsg_mgr);
drivers/staging/tidspbridge/rmgr/nldr.c +2 -2
@@ -432,7 +432,7 @@ int nldr_create(struct nldr_object **nldr,DBC_REQUIRE (nldr !=NULL );DBC_REQUIRE (hdev_obj !=NULL );DBC_REQUIRE (pattrs !=NULL ); -DBC_REQUIRE (pattrs->pfn_ovly !=NULL ); +DBC_REQUIRE (pattrs->ovly !=NULL );DBC_REQUIRE (pattrs->pfn_write !=NULL );/* Allocate dynamic loader object */
@@ -537,7 +537,7 @@ int nldr_create(struct nldr_object **nldr, 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; - nldr_obj->ovly_fxn = pattrs->pfn_ovly; + nldr_obj->ovly_fxn = pattrs->ovly; nldr_obj->write_fxn = pattrs->pfn_write; nldr_obj->ldr_attrs = new_attrs; }
drivers/staging/tidspbridge/rmgr/node.c +23 -23
181 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/proc.c +2 -2
@@ -917,7 +917,7 @@ int proc_get_resource_info(void *hprocessor, u32 resource_type,if (hio_mgr) status = p_proc_object->intf_fxns-> -pfn_io_get_proc_load (hio_mgr, +io_get_proc_load (hio_mgr, (struct dsp_procloadstat *) &(resource_info->result. proc_load_stat));
@@ -1227,7 +1227,7 @@ int proc_load(void *hprocessor, const s32 argc_index,/* Set the Device object's message manager */ status =dev_get_io_mgr (p_proc_object->hdev_obj, &hio_mgr);if (hio_mgr) - status = (*p_proc_object->intf_fxns->pfn_io_on_loaded) + status = (*p_proc_object->intf_fxns->io_on_loaded) (hio_mgr);else status = -EFAULT ;
Signature · 1 line
1.6.3.3
PATCH 6/12 staging:tidspbridge - set6 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables 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
--- drivers/staging/tidspbridge/core/io_sm.c | 50 +++++++++--------- drivers/staging/tidspbridge/core/tiomap3430.c | 16 +++--- drivers/staging/tidspbridge/core/tiomap_io.c | 4 +- drivers/staging/tidspbridge/gen/uuidutil.c | 4 +- .../tidspbridge/include/dspbridge/cmmdefs.h | 4 +- .../tidspbridge/include/dspbridge/dbdcddef.h | 4 +- .../staging/tidspbridge/include/dspbridge/dbdefs.h | 4 +- .../tidspbridge/include/dspbridge/dispdefs.h | 4 +- .../staging/tidspbridge/include/dspbridge/drv.h | 4 +- .../tidspbridge/include/dspbridge/dspioctl.h | 4 +- .../tidspbridge/include/dspbridge/mgrpriv.h | 2 +- .../tidspbridge/include/dspbridge/nldrdefs.h | 2 +- .../tidspbridge/include/dspbridge/nodepriv.h | 2 +- drivers/staging/tidspbridge/pmgr/cmm.c | 22 ++++---- drivers/staging/tidspbridge/pmgr/cod.c | 6 +- drivers/staging/tidspbridge/rmgr/dbdcd.c | 8 ++-- drivers/staging/tidspbridge/rmgr/disp.c | 18 +++--- drivers/staging/tidspbridge/rmgr/nldr.c | 52 ++++++++++---------- drivers/staging/tidspbridge/rmgr/node.c | 40 ++++++++-------- 19 files changed, 125 insertions(+), 125 deletions(-)
drivers/staging/tidspbridge/core/io_sm.c +25 -25
@@ -121,7 +121,7 @@ struct io_mgr {u32 ul_gpp_read_pointer;/* GPP Read pointer to Trace buffer */ u8 *pmsg;u32 ul_gpp_va; -u32 ul_dsp_va; +u32 dsp_va;#endif /* IO Dpc */ u32 dpc_req;/* Number of requested DPC's. */
@@ -421,7 +421,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) ul_gpp_va = host_res->mem_base[1 ];/* This is the virtual uncached ioremapped address!!! */ /* Why can't we directly take the DSPVA from the symbols? */ - ul_dsp_va = hio_mgr->ext_proc_info.ty_tlb[0 ].ul_dsp_virt; + ul_dsp_va = hio_mgr->ext_proc_info.ty_tlb[0 ].dsp_virt; ul_seg_size = (shm0_end - ul_dsp_va) * hio_mgr->word_size; ul_seg1_size = (ul_ext_end - ul_dyn_ext_base) * hio_mgr->word_size;
@@ -527,13 +527,13 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)* This is the physical address written to * DSP MMU. */ - ae_proc[ndx].ul_gpp_pa = pa_curr; + ae_proc[ndx].gpp_pa = pa_curr;/* * This is the virtual uncached ioremapped * address!!! */ ae_proc[ndx].ul_gpp_va = gpp_va_curr; - ae_proc[ndx].ul_dsp_va = + ae_proc[ndx].dsp_va = va_curr / hio_mgr->word_size; ae_proc[ndx].ul_size = page_size[i]; ae_proc[ndx].endianism =HW_LITTLE_ENDIAN ;
@@ -541,9 +541,9 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) ae_proc[ndx].mixed_mode =HW_MMU_CPUES ;dev_dbg (bridge,"shm MMU TLB entry PA %x" " VA %x DSP_VA %x Size %x\n" , - ae_proc[ndx].ul_gpp_pa, + ae_proc[ndx].gpp_pa, ae_proc[ndx].ul_gpp_va, - ae_proc[ndx].ul_dsp_va * + ae_proc[ndx].dsp_va * hio_mgr->word_size, page_size[i]); ndx++; }else {
@@ -556,9 +556,9 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)dev_dbg (bridge,"shm MMU PTE entry PA %x" " VA %x DSP_VA %x Size %x\n" , - ae_proc[ndx].ul_gpp_pa, + ae_proc[ndx].gpp_pa, ae_proc[ndx].ul_gpp_va, - ae_proc[ndx].ul_dsp_va * + ae_proc[ndx].dsp_va * hio_mgr->word_size, page_size[i]);if (status) goto func_end;
@@ -587,32 +587,32 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) ul_gpp_pa - 0x100000 && hio_mgr->ext_proc_info.ty_tlb[i].ul_gpp_phys <= ul_gpp_pa + ul_seg_size) - || (hio_mgr->ext_proc_info.ty_tlb[i].ul_dsp_virt > + || (hio_mgr->ext_proc_info.ty_tlb[i].dsp_virt > ul_dsp_va - 0x100000 / hio_mgr->word_size - && hio_mgr->ext_proc_info.ty_tlb[i].ul_dsp_virt <= + && hio_mgr->ext_proc_info.ty_tlb[i].dsp_virt <= ul_dsp_va + ul_seg_size / hio_mgr->word_size)) {dev_dbg (bridge,"CDB MMU entry %d conflicts with " "shm.\n\tCDB: GppPa %x, DspVa %x.\n\tSHM: " "GppPa %x, DspVa %x, Bytes %x.\n" , i, hio_mgr->ext_proc_info.ty_tlb[i].ul_gpp_phys, - hio_mgr->ext_proc_info.ty_tlb[i].ul_dsp_virt, + hio_mgr->ext_proc_info.ty_tlb[i].dsp_virt, ul_gpp_pa, ul_dsp_va, ul_seg_size); status = -EPERM ; } else {if (ndx <MAX_LOCK_TLB_ENTRIES ) { - ae_proc[ndx].ul_dsp_va = + ae_proc[ndx].dsp_va = hio_mgr->ext_proc_info.ty_tlb[i]. - ul_dsp_virt; - ae_proc[ndx].ul_gpp_pa = + dsp_virt; + ae_proc[ndx].gpp_pa = hio_mgr->ext_proc_info.ty_tlb[i]. ul_gpp_phys; ae_proc[ndx].ul_gpp_va =0 ;/* 1 MB */ ae_proc[ndx].ul_size =0x100000 ;dev_dbg (bridge,"shm MMU entry PA %x " -"DSP_VA 0x%x\n" , ae_proc[ndx].ul_gpp_pa, - ae_proc[ndx].ul_dsp_va); +"DSP_VA 0x%x\n" , ae_proc[ndx].gpp_pa, + ae_proc[ndx].dsp_va); ndx++; }else { status = hio_mgr->intf_fxns->brd_mem_map
@@ -620,7 +620,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) hio_mgr->ext_proc_info.ty_tlb[i]. ul_gpp_phys, hio_mgr->ext_proc_info.ty_tlb[i]. - ul_dsp_virt,0x100000 , map_attrs, + dsp_virt,0x100000 , map_attrs, NULL); } }
@@ -647,8 +647,8 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) }for (i = ndx; i <BRDIOCTL_NUMOFMMUTLB ; i++) { - ae_proc[i].ul_dsp_va =0 ; - ae_proc[i].ul_gpp_pa =0 ; + ae_proc[i].dsp_va =0 ; + ae_proc[i].gpp_pa =0 ; ae_proc[i].ul_gpp_va =0 ; ae_proc[i].ul_size =0 ; }
@@ -668,12 +668,12 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) status = -EFAULT ; goto func_end; }else { -if (ae_proc[0 ].ul_dsp_va > ul_shm_base) { +if (ae_proc[0 ].dsp_va > ul_shm_base) { status = -EPERM ; goto func_end; }/* ul_shm_base may not be at ul_dsp_va address */ - ul_shm_base_offset = (ul_shm_base - ae_proc[0 ].ul_dsp_va) * + ul_shm_base_offset = (ul_shm_base - ae_proc[0 ].dsp_va) * hio_mgr->word_size;/* * bridge_dev_ctrl() will set dev context dsp-mmu info. In
@@ -698,7 +698,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) }/* Register SM */ status = -register_shm_segs (hio_mgr, cod_man, ae_proc[0 ].ul_gpp_pa); +register_shm_segs (hio_mgr, cod_man, ae_proc[0 ].gpp_pa); } hio_mgr->shared_mem = (struct shm *)ul_shm_base;
@@ -771,7 +771,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)if (!hio_mgr->pmsg) status = -ENOMEM ; - hio_mgr->ul_dsp_va = ul_dsp_va; + hio_mgr->dsp_va = ul_dsp_va; hio_mgr->ul_gpp_va = (ul_gpp_va + ul_seg1_size + ul_pad_size);#endif
@@ -1544,7 +1544,7 @@ static int register_shm_segs(struct io_mgr *hio_mgr, ul_gpp_phys = hio_mgr->ext_proc_info.ty_tlb[0 ].ul_gpp_phys;/* Get size in bytes */ ul_dsp_virt = - hio_mgr->ext_proc_info.ty_tlb[0 ].ul_dsp_virt * + hio_mgr->ext_proc_info.ty_tlb[0 ].dsp_virt * hio_mgr->word_size;/* * Calc byte offset used to convert GPP phys <-> DSP byte
@@ -1698,7 +1698,7 @@ void print_dsp_debug_trace(struct io_mgr *hio_mgr) *(u32 *) (hio_mgr->ul_trace_buffer_current); ul_gpp_cur_pointer = hio_mgr->ul_gpp_va + (ul_gpp_cur_pointer - - hio_mgr->ul_dsp_va); + hio_mgr->dsp_va);/* No new debug messages available yet */ if (ul_gpp_cur_pointer == hio_mgr->ul_gpp_read_pointer) {
drivers/staging/tidspbridge/core/tiomap3430.c +8 -8
@@ -399,7 +399,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, ul_shm_base_virt *=DSPWORDSIZE ;DBC_ASSERT (ul_shm_base_virt !=0 );/* DSP Virtual address */ - ul_tlb_base_virt = dev_context->atlb_entry[0 ].ul_dsp_va; + ul_tlb_base_virt = dev_context->atlb_entry[0 ].dsp_va;DBC_ASSERT (ul_tlb_base_virt <= ul_shm_base_virt); ul_shm_offset_virt = ul_shm_base_virt - (ul_tlb_base_virt *DSPWORDSIZE );
@@ -464,19 +464,19 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, .mixed_size = e->mixed_mode, }; -if (!e->ul_gpp_pa || !e->ul_dsp_va) +if (!e->gpp_pa || !e->dsp_va)continue ;dev_dbg (bridge,"MMU %d, pa: 0x%x, va: 0x%x, size: 0x%x" , itmp_entry_ndx, - e->ul_gpp_pa, - e->ul_dsp_va, + e->gpp_pa, + e->dsp_va, e->ul_size);hw_mmu_tlb_add (dev_context->dsp_mmu_base, - e->ul_gpp_pa, - e->ul_dsp_va, + e->gpp_pa, + e->dsp_va, e->ul_size, itmp_entry_ndx, &map_attrs,1 ,1 );
@@ -771,8 +771,8 @@ static int bridge_dev_create(struct bridge_dev_context/* Clear dev context MMU table entries. * These get set on bridge_io_on_loaded() call after program loaded. */ for (entry_ndx =0 ; entry_ndx <BRDIOCTL_NUMOFMMUTLB ; entry_ndx++) { - dev_context->atlb_entry[entry_ndx].ul_gpp_pa = - dev_context->atlb_entry[entry_ndx].ul_dsp_va =0 ; + dev_context->atlb_entry[entry_ndx].gpp_pa = + dev_context->atlb_entry[entry_ndx].dsp_va =0 ; } dev_context->dsp_base_addr = (u32) MEM_LINEAR_ADDRESS((void *) (config_param->
drivers/staging/tidspbridge/core/tiomap_io.c +2 -2
@@ -134,7 +134,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,if (!status) { ul_tlb_base_virt = - dev_context->atlb_entry[0 ].ul_dsp_va *DSPWORDSIZE ; + dev_context->atlb_entry[0 ].dsp_va *DSPWORDSIZE ;DBC_ASSERT (ul_tlb_base_virt <= ul_shm_base_virt); dw_ext_prog_virt_mem = dev_context->atlb_entry[0 ].ul_gpp_va;
@@ -319,7 +319,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,if (!ret) { ul_tlb_base_virt = - dev_context->atlb_entry[0 ].ul_dsp_va *DSPWORDSIZE ; + dev_context->atlb_entry[0 ].dsp_va *DSPWORDSIZE ;DBC_ASSERT (ul_tlb_base_virt <= ul_shm_base_virt);if (symbols_reloaded) {
drivers/staging/tidspbridge/gen/uuidutil.c +2 -2
@@ -45,7 +45,7 @@ void uuid_uuid_to_string(struct dsp_uuid *uuid_obj, char *sz_uuid, i = snprintf(sz_uuid, size, "%.8X_%.4X_%.4X_%.2X%.2X_%.2X%.2X%.2X%.2X%.2X%.2X", - uuid_obj->ul_data1, uuid_obj->us_data2, uuid_obj->us_data3, + uuid_obj->data1, uuid_obj->us_data2, uuid_obj->us_data3, uuid_obj->uc_data4, uuid_obj->uc_data5, uuid_obj->uc_data6[0], uuid_obj->uc_data6[1], uuid_obj->uc_data6[2], uuid_obj->uc_data6[3],
@@ -79,7 +79,7 @@ void uuid_uuid_from_string(char *sz_uuid, struct dsp_uuid *uuid_obj) {s32 j; - uuid_obj->ul_data1 =uuid_hex_to_bin (sz_uuid,8 ); + uuid_obj->data1 =uuid_hex_to_bin (sz_uuid,8 ); sz_uuid +=8 ;/* Step over underscore */
drivers/staging/tidspbridge/include/dspbridge/cmmdefs.h +2 -2
@@ -29,7 +29,7 @@ struct cmm_mgrattrs {/* Attributes for CMM_AllocBuf() & CMM_AllocDesc() */ struct cmm_attrs {u32 ul_seg_id;/* 1,2... are SM segments. 0 is not. */ -u32 ul_alignment;/* 0,1,2,4....ul_min_block_size */ +u32 alignment;/* 0,1,2,4....ul_min_block_size */ };/*
@@ -57,7 +57,7 @@ struct cmm_seginfo {u32 gpp_base_pa;/* Start Phys addr of Gpp SM seg */ u32 ul_gpp_size;/* Size of Gpp SM seg in bytes */ u32 dsp_base_va;/* DSP virt base byte address */ -u32 ul_dsp_size;/* DSP seg size in bytes */ +u32 dsp_size;/* DSP seg size in bytes */ /* # of current GPP allocations from this segment */ u32 ul_in_use_cnt;u32 seg_base_va;/* Start Virt address of SM seg */
drivers/staging/tidspbridge/include/dspbridge/dbdcddef.h +2 -2
@@ -55,8 +55,8 @@ struct dcd_nodeprops {/* Dynamic load properties */ u16 us_load_type;/* Static, dynamic, overlay */ -u32 ul_data_mem_seg_mask;/* Data memory requirements */ -u32 ul_code_mem_seg_mask;/* Code memory requirements */ +u32 data_mem_seg_mask;/* Data memory requirements */ +u32 code_mem_seg_mask;/* Code memory requirements */ };/* DCD Generic Object Type */
drivers/staging/tidspbridge/include/dspbridge/dbdefs.h +2 -2
@@ -118,7 +118,7 @@ static inline bool is_valid_proc_event(u32 x)/* The Node UUID structure */ struct dsp_uuid { -u32 ul_data1; +u32 data1;u16 us_data2;u16 us_data3;u8 uc_data4;
@@ -378,7 +378,7 @@ struct dsp_processorinfo {int processor_type;u32 clock_rate;u32 ul_internal_mem_size; -u32 ul_external_mem_size; +u32 external_mem_size;u32 processor_id;int ty_running_rtos;s32 node_min_priority;
drivers/staging/tidspbridge/include/dspbridge/dispdefs.h +2 -2
@@ -23,9 +23,9 @@ struct disp_object;/* Node Dispatcher attributes */ struct disp_attr { -u32 ul_chnl_offset;/* Offset of channel ids reserved for RMS */ +u32 chnl_offset;/* Offset of channel ids reserved for RMS */ /* Size of buffer for sending data to RMS */ -u32 ul_chnl_buf_size; +u32 chnl_buf_size;int proc_family;/* eg, 5000 */ int proc_type;/* eg, 5510 */ void *reserved1;/* Reserved for future use. */
drivers/staging/tidspbridge/include/dspbridge/drv.h +2 -2
@@ -115,8 +115,8 @@ struct dmm_rsv_object {struct dspheap_res_object {s32 heap_allocated;/* DMM status */ u32 ul_mpu_addr; -u32 ul_dsp_addr; -u32 ul_dsp_res_addr; +u32 dsp_addr; +u32 dsp_res_addr;u32 heap_size;void *hprocessor;struct dspheap_res_object *next;
drivers/staging/tidspbridge/include/dspbridge/dspioctl.h +2 -2
@@ -60,8 +60,8 @@#define BRDIOCTL_NUMOFMMUTLB 32struct bridge_ioctl_extproc { -u32 ul_dsp_va;/* DSP virtual address */ -u32 ul_gpp_pa;/* GPP physical address */ +u32 dsp_va;/* DSP virtual address */ +u32 gpp_pa;/* GPP physical address */ /* GPP virtual address. __va does not work for ioremapped addresses */ u32 ul_gpp_va;u32 ul_size;/* Size of the mapped memory in bytes */
drivers/staging/tidspbridge/include/dspbridge/mgrpriv.h +1 -1
@@ -28,7 +28,7 @@struct mgr_object ;struct mgr_tlbentry { -u32 ul_dsp_virt;/* DSP virtual address */ +u32 dsp_virt;/* DSP virtual address */ u32 ul_gpp_phys;/* GPP physical address */ };
drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h +1 -1
@@ -83,7 +83,7 @@ typedef u32(*nldr_writefxn) (void *priv_ref,*/ struct nldr_attrs {nldr_ovlyfxn ovly; -nldr_writefxn pfn_write; +nldr_writefxn write;u16 us_dsp_word_size;u16 us_dsp_mau_size; };
drivers/staging/tidspbridge/include/dspbridge/nodepriv.h +1 -1
@@ -62,7 +62,7 @@ struct node_taskargs {u32 profile_id;/* Profile ID */ u32 num_inputs;u32 num_outputs; -u32 ul_dais_arg;/* Address of iAlg object */ +u32 dais_arg;/* Address of iAlg object */ struct node_strmdef *strm_in_def;struct node_strmdef *strm_out_def; };
drivers/staging/tidspbridge/pmgr/cmm.c +11 -11
@@ -70,7 +70,7 @@ struct cmm_allocator { /* sma */* SM space */ s8 c_factor;/* DSPPa to GPPPa Conversion Factor */ unsigned int dsp_base;/* DSP virt base byte address */ -u32 ul_dsp_size;/* DSP seg size in bytes */ +u32 dsp_size;/* DSP seg size in bytes */ struct cmm_object *hcmm_mgr;/* back ref to parent mgr */ /* node list of available memory */ struct list_head free_list;
@@ -439,19 +439,19 @@ int cmm_get_info(struct cmm_object *hcmm_mgr,continue ; cmm_info_obj->ul_num_gppsm_segs++; cmm_info_obj->seg_info[ul_seg -1 ].seg_base_pa = - altr->shm_base - altr->ul_dsp_size; + altr->shm_base - altr->dsp_size; cmm_info_obj->seg_info[ul_seg -1 ].ul_total_seg_size = - altr->ul_dsp_size + altr->ul_sm_size; + altr->dsp_size + altr->ul_sm_size; cmm_info_obj->seg_info[ul_seg -1 ].gpp_base_pa = altr->shm_base; cmm_info_obj->seg_info[ul_seg -1 ].ul_gpp_size = altr->ul_sm_size; cmm_info_obj->seg_info[ul_seg -1 ].dsp_base_va = altr->dsp_base; - cmm_info_obj->seg_info[ul_seg -1 ].ul_dsp_size = - altr->ul_dsp_size; + cmm_info_obj->seg_info[ul_seg -1 ].dsp_size = + altr->dsp_size; cmm_info_obj->seg_info[ul_seg -1 ].seg_base_va = - altr->vm_base - altr->ul_dsp_size; + altr->vm_base - altr->dsp_size; cmm_info_obj->seg_info[ul_seg -1 ].ul_in_use_cnt =0 ;list_for_each_entry (curr, &altr->in_use_list, link) {
@@ -543,7 +543,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr, psma->dsp_phys_addr_offset = dsp_addr_offset; psma->c_factor = c_factor; psma->dsp_base = dw_dsp_base; - psma->ul_dsp_size = ul_dsp_size; + psma->dsp_size = ul_dsp_size;if (psma->vm_base ==0 ) { status = -EPERM ; goto func_end;
@@ -968,7 +968,7 @@ void *cmm_xlator_translate(struct cmm_xlatorobject *xlator, void *paddr,/* Gpp Va = Va Base + offset */ dw_offset = (u8 *) paddr - (u8 *) (allocator->shm_base - allocator-> - ul_dsp_size); + dsp_size); dw_addr_xlate = xlator_obj->virt_base + dw_offset;/* Check if translated Va base is in range */ if ((dw_addr_xlate < xlator_obj->virt_base) ||
@@ -982,7 +982,7 @@ void *cmm_xlator_translate(struct cmm_xlatorobject *xlator, void *paddr, dw_offset = (u8 *) paddr - (u8 *) xlator_obj->virt_base; dw_addr_xlate = - allocator->shm_base - allocator->ul_dsp_size + + allocator->shm_base - allocator->dsp_size + dw_offset; } }else {
@@ -992,14 +992,14 @@ void *cmm_xlator_translate(struct cmm_xlatorobject *xlator, void *paddr,if ((xtype ==CMM_VA2DSPPA ) || (xtype ==CMM_PA2DSPPA )) {/* Got Gpp Pa now, convert to DSP Pa */ dw_addr_xlate = -GPPPA2DSPPA ((allocator->shm_base - allocator->ul_dsp_size), +GPPPA2DSPPA ((allocator->shm_base - allocator->dsp_size), dw_addr_xlate, allocator->dsp_phys_addr_offset * allocator->c_factor); }else if (xtype ==CMM_DSPPA2PA ) {/* Got DSP Pa, convert to GPP Pa */ dw_addr_xlate = -DSPPA2GPPPA (allocator->shm_base - allocator->ul_dsp_size, +DSPPA2GPPPA (allocator->shm_base - allocator->dsp_size, dw_addr_xlate, allocator->dsp_phys_addr_offset * allocator->c_factor);
drivers/staging/tidspbridge/pmgr/cod.c +3 -3
@@ -50,7 +50,7 @@ struct cod_manager {struct dbll_tar_obj *target;struct dbll_library_obj *base_lib;bool loaded;/* Base library loaded? */ -u32 ul_entry; +u32 entry;struct ldr_module *dll_obj;struct dbll_fxns fxns;struct dbll_attrs attrs;
@@ -358,7 +358,7 @@ int cod_get_entry(struct cod_manager *cod_mgr_obj, u32 *entry_pt)DBC_REQUIRE (cod_mgr_obj);DBC_REQUIRE (entry_pt !=NULL ); - *entry_pt = cod_mgr_obj->ul_entry; + *entry_pt = cod_mgr_obj->entry;return 0 ; }
@@ -528,7 +528,7 @@ int cod_load_base(struct cod_manager *cod_mgr_obj, u32 num_argc, char *args[], flags =DBLL_CODE |DBLL_DATA |DBLL_SYMB ; status = cod_mgr_obj->fxns.load_fxn (cod_mgr_obj->base_lib, flags, &new_attrs, - &cod_mgr_obj->ul_entry); + &cod_mgr_obj->entry);if (status) cod_mgr_obj->fxns.close_fxn (cod_mgr_obj->base_lib);
drivers/staging/tidspbridge/rmgr/dbdcd.c +4 -4
@@ -1231,14 +1231,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); }
@@ -1292,7 +1292,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);
@@ -1316,7 +1316,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
drivers/staging/tidspbridge/rmgr/disp.c +9 -9
@@ -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 +=
drivers/staging/tidspbridge/rmgr/nldr.c +26 -26
160 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/node.c +20 -20
@@ -143,13 +143,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 */
@@ -369,7 +369,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 ;
@@ -815,7 +815,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); }
@@ -1255,14 +1255,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),
@@ -1363,8 +1363,8 @@ int node_create_mgr(struct node_mgr **node_man, }/* Create NODE Dispatcher */ if (!status) { - 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; status =
@@ -1381,12 +1381,12 @@ int node_create_mgr(struct node_mgr **node_man,dev_get_msg_mgr (hdev_obj, &node_mgr_obj->msg_mgr_obj);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 , +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); }if (!status) {
@@ -1403,7 +1403,7 @@ int node_create_mgr(struct node_mgr **node_man,if (!status) { 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 ();
@@ -1528,7 +1528,7 @@ func_cont1: status =disp_node_delete (disp_obj, pnode, hnode_mgr-> - ul_fxn_addrs + fxn_addrs [RMSDELETENODE ], ul_delete_fxn, pnode->node_env);
@@ -2054,7 +2054,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 */
@@ -2316,14 +2316,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));
@@ -2944,8 +2944,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;/*
@@ -3066,7 +3066,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 ) {/*
Signature · 1 line
1.6.3.3
PATCH 7/12 staging:tidspbridge - set7 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: ul_gpp_phys gpp_phys ul_gpp_read_pointer gpp_read_pointer ul_gpp_size gpp_size ul_gpp_va gpp_va ul_heap_size heap_size ul_internal_mem_size internal_mem_size ul_in_use_cnt in_use_cnt ul_len_max_free_block len_max_free_block ul_max max ul_min_block_size min_block_size ul_min min ul_mpu_addr mpu_addr ul_n_bytes bytes ul_num_alloc_blocks num_alloc_blocks ul_number_bytes number_bytes ul_num_chnls num_chnls ul_num_free_blocks num_free_blocks ul_num_gppsm_segs num_gppsm_segs ul_pos pos ul_reserved reserved
--- drivers/staging/tidspbridge/core/io_sm.c | 62 ++++++++++---------- drivers/staging/tidspbridge/core/tiomap3430.c | 2 +- drivers/staging/tidspbridge/core/tiomap_io.c | 4 +- .../tidspbridge/include/dspbridge/cfgdefs.h | 4 +- .../staging/tidspbridge/include/dspbridge/cmm.h | 2 +- .../tidspbridge/include/dspbridge/cmmdefs.h | 12 ++-- .../staging/tidspbridge/include/dspbridge/cod.h | 2 +- .../staging/tidspbridge/include/dspbridge/dbdefs.h | 12 ++-- .../staging/tidspbridge/include/dspbridge/drv.h | 2 +- .../tidspbridge/include/dspbridge/dspioctl.h | 2 +- .../tidspbridge/include/dspbridge/mgrpriv.h | 2 +- drivers/staging/tidspbridge/pmgr/cmm.c | 30 +++++----- drivers/staging/tidspbridge/pmgr/dbll.c | 12 ++-- drivers/staging/tidspbridge/rmgr/dbdcd.c | 6 +- drivers/staging/tidspbridge/rmgr/node.c | 22 ++++---- drivers/staging/tidspbridge/rmgr/rmm.c | 12 ++-- drivers/staging/tidspbridge/rmgr/strm.c | 4 +- 17 files changed, 96 insertions(+), 96 deletions(-)
drivers/staging/tidspbridge/core/io_sm.c +31 -31
@@ -118,9 +118,9 @@ struct io_mgr {u32 ul_trace_buffer_begin;/* Trace message start address */ u32 ul_trace_buffer_end;/* Trace message end address */ u32 ul_trace_buffer_current;/* Trace message current address */ -u32 ul_gpp_read_pointer;/* GPP Read pointer to Trace buffer */ +u32 gpp_read_pointer;/* GPP Read pointer to Trace buffer */ u8 *pmsg; -u32 ul_gpp_va; +u32 gpp_va;u32 dsp_va;#endif /* IO Dpc */
@@ -532,7 +532,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)* This is the virtual uncached ioremapped * address!!! */ - ae_proc[ndx].ul_gpp_va = gpp_va_curr; + ae_proc[ndx].gpp_va = gpp_va_curr; ae_proc[ndx].dsp_va = va_curr / hio_mgr->word_size; ae_proc[ndx].ul_size = page_size[i];
@@ -542,7 +542,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)dev_dbg (bridge,"shm MMU TLB entry PA %x" " VA %x DSP_VA %x Size %x\n" , ae_proc[ndx].gpp_pa, - ae_proc[ndx].ul_gpp_va, + ae_proc[ndx].gpp_va, ae_proc[ndx].dsp_va * hio_mgr->word_size, page_size[i]); ndx++;
@@ -557,7 +557,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)"shm MMU PTE entry PA %x" " VA %x DSP_VA %x Size %x\n" , ae_proc[ndx].gpp_pa, - ae_proc[ndx].ul_gpp_va, + ae_proc[ndx].gpp_va, ae_proc[ndx].dsp_va * hio_mgr->word_size, page_size[i]);if (status)
@@ -580,12 +580,12 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)* should not conflict with shm entries on MPU or DSP side. */ for (i =3 ; i <7 && ndx <BRDIOCTL_NUMOFMMUTLB ; i++) { -if (hio_mgr->ext_proc_info.ty_tlb[i].ul_gpp_phys ==0 ) +if (hio_mgr->ext_proc_info.ty_tlb[i].gpp_phys ==0 )continue ; - if ((hio_mgr->ext_proc_info.ty_tlb[i].ul_gpp_phys > + if ((hio_mgr->ext_proc_info.ty_tlb[i].gpp_phys > ul_gpp_pa - 0x100000 - && hio_mgr->ext_proc_info.ty_tlb[i].ul_gpp_phys <= + && hio_mgr->ext_proc_info.ty_tlb[i].gpp_phys <= ul_gpp_pa + ul_seg_size) || (hio_mgr->ext_proc_info.ty_tlb[i].dsp_virt > ul_dsp_va - 0x100000 / hio_mgr->word_size
@@ -595,7 +595,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)"CDB MMU entry %d conflicts with " "shm.\n\tCDB: GppPa %x, DspVa %x.\n\tSHM: " "GppPa %x, DspVa %x, Bytes %x.\n" , i, - hio_mgr->ext_proc_info.ty_tlb[i].ul_gpp_phys, + hio_mgr->ext_proc_info.ty_tlb[i].gpp_phys, hio_mgr->ext_proc_info.ty_tlb[i].dsp_virt, ul_gpp_pa, ul_dsp_va, ul_seg_size); status = -EPERM ;
@@ -606,8 +606,8 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) dsp_virt; ae_proc[ndx].gpp_pa = hio_mgr->ext_proc_info.ty_tlb[i]. - ul_gpp_phys; - ae_proc[ndx].ul_gpp_va =0 ; + gpp_phys; + ae_proc[ndx].gpp_va =0 ;/* 1 MB */ ae_proc[ndx].ul_size =0x100000 ; dev_dbg(bridge, "shm MMU entry PA %x "
@@ -618,7 +618,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) status = hio_mgr->intf_fxns->brd_mem_map (hio_mgr->hbridge_context, hio_mgr->ext_proc_info.ty_tlb[i]. - ul_gpp_phys, + gpp_phys, hio_mgr->ext_proc_info.ty_tlb[i]. dsp_virt,0x100000 , map_attrs,NULL );
@@ -649,7 +649,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)for (i = ndx; i <BRDIOCTL_NUMOFMMUTLB ; i++) { ae_proc[i].dsp_va =0 ; ae_proc[i].gpp_pa =0 ; - ae_proc[i].ul_gpp_va =0 ; + ae_proc[i].gpp_va =0 ; ae_proc[i].ul_size =0 ; }/*
@@ -657,14 +657,14 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)* to the virtual uncached ioremapped address of shm reserved * on MPU. */ - hio_mgr->ext_proc_info.ty_tlb[0 ].ul_gpp_phys = + hio_mgr->ext_proc_info.ty_tlb[0 ].gpp_phys = (ul_gpp_va + ul_seg1_size + ul_pad_size);/* * Need shm Phys addr. IO supports only one DSP for now: * num_procs = 1. */ -if (!hio_mgr->ext_proc_info.ty_tlb[0 ].ul_gpp_phys || num_procs !=1 ) { +if (!hio_mgr->ext_proc_info.ty_tlb[0 ].gpp_phys || num_procs !=1 ) { status = -EFAULT ; goto func_end; }else {
@@ -688,7 +688,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) ae_proc);if (status) goto func_end; - ul_shm_base = hio_mgr->ext_proc_info.ty_tlb[0 ].ul_gpp_phys; + ul_shm_base = hio_mgr->ext_proc_info.ty_tlb[0 ].gpp_phys; ul_shm_base += ul_shm_base_offset; ul_shm_base = (u32 )MEM_LINEAR_ADDRESS ((void *)ul_shm_base, ul_mem_length);
@@ -740,7 +740,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) goto func_end; } - hio_mgr->ul_gpp_read_pointer = hio_mgr->ul_trace_buffer_begin = + hio_mgr->gpp_read_pointer = hio_mgr->ul_trace_buffer_begin = (ul_gpp_va + ul_seg1_size + ul_pad_size) + (hio_mgr->ul_trace_buffer_begin - ul_dsp_va);/* Get the end address of trace buffer */
@@ -772,7 +772,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) status = -ENOMEM ; hio_mgr->dsp_va = ul_dsp_va; - hio_mgr->ul_gpp_va = (ul_gpp_va + ul_seg1_size + ul_pad_size); + hio_mgr->gpp_va = (ul_gpp_va + ul_seg1_size + ul_pad_size);#endif func_end:
@@ -1541,7 +1541,7 @@ static int register_shm_segs(struct io_mgr *hio_mgr, goto func_end; }/* First TLB entry reserved for Bridge SM use. */ - ul_gpp_phys = hio_mgr->ext_proc_info.ty_tlb[0 ].ul_gpp_phys; + ul_gpp_phys = hio_mgr->ext_proc_info.ty_tlb[0 ].gpp_phys;/* Get size in bytes */ ul_dsp_virt = hio_mgr->ext_proc_info.ty_tlb[0].dsp_virt *
@@ -1697,48 +1697,48 @@ void print_dsp_debug_trace(struct io_mgr *hio_mgr) ul_gpp_cur_pointer = *(u32 *) (hio_mgr->ul_trace_buffer_current); ul_gpp_cur_pointer = - hio_mgr->ul_gpp_va + (ul_gpp_cur_pointer - + hio_mgr->gpp_va + (ul_gpp_cur_pointer - hio_mgr->dsp_va);/* No new debug messages available yet */ -if (ul_gpp_cur_pointer == hio_mgr->ul_gpp_read_pointer) { +if (ul_gpp_cur_pointer == hio_mgr->gpp_read_pointer) {break ; - }else if (ul_gpp_cur_pointer > hio_mgr->ul_gpp_read_pointer) { + }else if (ul_gpp_cur_pointer > hio_mgr->gpp_read_pointer) {/* Continuous data */ ul_new_message_length = - ul_gpp_cur_pointer - hio_mgr->ul_gpp_read_pointer; + ul_gpp_cur_pointer - hio_mgr->gpp_read_pointer;memcpy (hio_mgr->pmsg, - (char *)hio_mgr->ul_gpp_read_pointer, + (char *)hio_mgr->gpp_read_pointer, ul_new_message_length); hio_mgr->pmsg[ul_new_message_length] ='\0' ;/* * Advance the GPP trace pointer to DSP current * pointer. */ - hio_mgr->ul_gpp_read_pointer += ul_new_message_length; + hio_mgr->gpp_read_pointer += ul_new_message_length;/* Print the trace messages */ pr_info ("DSPTrace: %s\n" , hio_mgr->pmsg); - }else if (ul_gpp_cur_pointer < hio_mgr->ul_gpp_read_pointer) { + }else if (ul_gpp_cur_pointer < hio_mgr->gpp_read_pointer) {/* Handle trace buffer wraparound */ memcpy (hio_mgr->pmsg, - (char *)hio_mgr->ul_gpp_read_pointer, + (char *)hio_mgr->gpp_read_pointer, hio_mgr->ul_trace_buffer_end - - hio_mgr->ul_gpp_read_pointer); + hio_mgr->gpp_read_pointer); ul_new_message_length = ul_gpp_cur_pointer - hio_mgr->ul_trace_buffer_begin;memcpy (&hio_mgr->pmsg[hio_mgr->ul_trace_buffer_end - - hio_mgr->ul_gpp_read_pointer], + hio_mgr->gpp_read_pointer], (char *)hio_mgr->ul_trace_buffer_begin, ul_new_message_length); hio_mgr->pmsg[hio_mgr->ul_trace_buffer_end - - hio_mgr->ul_gpp_read_pointer + + hio_mgr->gpp_read_pointer + ul_new_message_length] ='\0' ;/* * Advance the GPP trace pointer to DSP current * pointer. */ - hio_mgr->ul_gpp_read_pointer = + hio_mgr->gpp_read_pointer = hio_mgr->ul_trace_buffer_begin + ul_new_message_length;/* Print the trace messages */
drivers/staging/tidspbridge/core/tiomap3430.c +1 -1
@@ -404,7 +404,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, ul_shm_offset_virt = ul_shm_base_virt - (ul_tlb_base_virt *DSPWORDSIZE );/* Kernel logical address */ - ul_shm_base = dev_context->atlb_entry[0 ].ul_gpp_va + ul_shm_offset_virt; + ul_shm_base = dev_context->atlb_entry[0 ].gpp_va + ul_shm_offset_virt;DBC_ASSERT (ul_shm_base !=0 );/* 2nd wd is used as sync field */
drivers/staging/tidspbridge/core/tiomap_io.c +2 -2
@@ -137,7 +137,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt, dev_context->atlb_entry[0 ].dsp_va *DSPWORDSIZE ;DBC_ASSERT (ul_tlb_base_virt <= ul_shm_base_virt); dw_ext_prog_virt_mem = - dev_context->atlb_entry[0 ].ul_gpp_va; + dev_context->atlb_entry[0 ].gpp_va;if (!trace_read) { ul_shm_offset_virt =
@@ -337,7 +337,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context, ul_shm_base_virt - ul_tlb_base_virt;if (trace_load) { dw_ext_prog_virt_mem = - dev_context->atlb_entry[0 ].ul_gpp_va; + dev_context->atlb_entry[0 ].gpp_va; }else { dw_ext_prog_virt_mem = host_res->mem_base[1 ]; dw_ext_prog_virt_mem +=
drivers/staging/tidspbridge/include/dspbridge/cfgdefs.h +2 -2
@@ -73,8 +73,8 @@ struct cfg_hostres {struct cfg_dspmemdesc {u32 mem_type;/* Type of memory. */ -u32 ul_min;/* Minimum amount of memory of this type. */ -u32 ul_max;/* Maximum amount of memory of this type. */ +u32 min;/* Minimum amount of memory of this type. */ +u32 max;/* Maximum amount of memory of this type. */ };#endif /* CFGDEFS_ */
drivers/staging/tidspbridge/include/dspbridge/cmm.h +1 -1
@@ -81,7 +81,7 @@ extern void *cmm_calloc_buf(struct cmm_object *hcmm_mgr,* Requires: * cmm_init(void) called. * ph_cmm_mgr != NULL. -* mgr_attrts->ul_min_block_size >= 4 bytes. +* mgr_attrts->min_block_size >= 4 bytes. * Ensures: * */
drivers/staging/tidspbridge/include/dspbridge/cmmdefs.h +6 -6
@@ -23,13 +23,13 @@/* Cmm attributes used in cmm_create() */ struct cmm_mgrattrs {/* Minimum SM allocation; default 32 bytes. */ -u32 ul_min_block_size; +u32 min_block_size; };/* Attributes for CMM_AllocBuf() & CMM_AllocDesc() */ struct cmm_attrs {u32 ul_seg_id;/* 1,2... are SM segments. 0 is not. */ -u32 alignment;/* 0,1,2,4....ul_min_block_size */ +u32 alignment;/* 0,1,2,4....min_block_size */ };/*
@@ -55,11 +55,11 @@ struct cmm_seginfo {/* Total size in bytes of segment: DSP+GPP */ u32 ul_total_seg_size;u32 gpp_base_pa;/* Start Phys addr of Gpp SM seg */ -u32 ul_gpp_size;/* Size of Gpp SM seg in bytes */ +u32 gpp_size;/* Size of Gpp SM seg in bytes */ u32 dsp_base_va;/* DSP virt base byte address */ u32 dsp_size;/* DSP seg size in bytes */ /* # of current GPP allocations from this segment */ -u32 ul_in_use_cnt; +u32 in_use_cnt;u32 seg_base_va;/* Start Virt address of SM seg */ };
@@ -67,11 +67,11 @@ struct cmm_seginfo {/* CMM useful information */ struct cmm_info {/* # of SM segments registered with this Cmm. */ -u32 ul_num_gppsm_segs; +u32 num_gppsm_segs;/* Total # of allocations outstanding for CMM */ u32 ul_total_in_use_cnt;/* Min SM block size allocation from cmm_create() */ -u32 ul_min_block_size; +u32 min_block_size;/* Info per registered SM segment. */ struct cmm_seginfo seg_info[CMM_MAXGPPSEGS ]; };
drivers/staging/tidspbridge/include/dspbridge/cod.h +1 -1
@@ -42,7 +42,7 @@ struct cod_libraryobj;/* COD attributes */ struct cod_attrs { -u32 ul_reserved; +u32 reserved; };/*
drivers/staging/tidspbridge/include/dspbridge/dbdefs.h +6 -6
@@ -229,9 +229,9 @@ enum dsp_flushtype {struct dsp_memstat {u32 ul_size;u32 ul_total_free_size; -u32 ul_len_max_free_block; -u32 ul_num_free_blocks; -u32 ul_num_alloc_blocks; +u32 len_max_free_block; +u32 num_free_blocks; +u32 num_alloc_blocks; };/* Processor Load information Values */
@@ -295,7 +295,7 @@ struct dsp_streamconnect { };struct dsp_nodeprofs { -u32 ul_heap_size; +u32 heap_size; };/* The dsp_ndbprops structure reports the attributes of a node */
@@ -377,7 +377,7 @@ struct dsp_processorinfo {int processor_family;int processor_type;u32 clock_rate; -u32 ul_internal_mem_size; +u32 internal_mem_size;u32 external_mem_size;u32 processor_id;int ty_running_rtos;
@@ -444,7 +444,7 @@ struct dsp_streaminfo {u32 cb_struct;u32 number_bufs_allowed;u32 number_bufs_in_stream; -u32 ul_number_bytes; +u32 number_bytes;void *sync_object_handle;enum dsp_streamstate ss_stream_state; };
drivers/staging/tidspbridge/include/dspbridge/drv.h +1 -1
@@ -114,7 +114,7 @@ struct dmm_rsv_object {/* New structure (member of process context) abstracts DMM resource info */ struct dspheap_res_object {s32 heap_allocated;/* DMM status */ -u32 ul_mpu_addr; +u32 mpu_addr;u32 dsp_addr;u32 dsp_res_addr;u32 heap_size;
drivers/staging/tidspbridge/include/dspbridge/dspioctl.h +1 -1
@@ -63,7 +63,7 @@ struct bridge_ioctl_extproc {u32 dsp_va;/* DSP virtual address */ u32 gpp_pa;/* GPP physical address */ /* GPP virtual address. __va does not work for ioremapped addresses */ -u32 ul_gpp_va; +u32 gpp_va;u32 ul_size;/* Size of the mapped memory in bytes */ enum hw_endianism_t endianism;enum hw_mmu_mixed_size_t mixed_mode;
drivers/staging/tidspbridge/include/dspbridge/mgrpriv.h +1 -1
@@ -29,7 +29,7 @@ struct mgr_object;struct mgr_tlbentry {u32 dsp_virt;/* DSP virtual address */ -u32 ul_gpp_phys;/* GPP physical address */ +u32 gpp_phys;/* GPP physical address */ };/*
drivers/staging/tidspbridge/pmgr/cmm.c +15 -15
@@ -98,7 +98,7 @@ struct cmm_object {*/ struct mutex cmm_lock;/* Lock to access cmm mgr */ struct list_head node_free_list;/* Free list of memory nodes */ -u32 ul_min_block_size;/* Min SM block; default 16 bytes */ +u32 min_block_size;/* Min SM block; default 16 bytes */ u32 page_size;/* Memory Page size (1k/4k) */ /* GPP SM segment ptrs */ struct cmm_allocator *pa_gppsm_seg_tab[CMM_MAXGPPSEGS ];
@@ -106,7 +106,7 @@ struct cmm_object {/* Default CMM Mgr attributes */ static struct cmm_mgrattrs cmm_dfltmgrattrs = { -/* ul_min_block_size, min block size(bytes) allocated by cmm mgr */ +/* min_block_size, min block size(bytes) allocated by cmm mgr */ 16 };
@@ -185,17 +185,17 @@ void *cmm_calloc_buf(struct cmm_object *hcmm_mgr, u32 usize,/* get the allocator object for this segment id */ allocator =get_allocator (cmm_mgr_obj, pattrs->ul_seg_id); -/* keep block size a multiple of ul_min_block_size */ +/* keep block size a multiple of min_block_size */ usize = - ((usize -1 ) & ~(cmm_mgr_obj->ul_min_block_size - + ((usize -1 ) & ~(cmm_mgr_obj->min_block_size -1 )) - + cmm_mgr_obj->ul_min_block_size; + + cmm_mgr_obj->min_block_size;mutex_lock (&cmm_mgr_obj->cmm_lock); pnode =get_free_block (allocator, usize); }if (pnode) { delta_size = (pnode->ul_size - usize); -if (delta_size >= cmm_mgr_obj->ul_min_block_size) { +if (delta_size >= cmm_mgr_obj->min_block_size) {/* create a new block with the leftovers and * add to freelist */ new_node =
@@ -257,9 +257,9 @@ int cmm_create(struct cmm_object **ph_cmm_mgr, mgr_attrts = &cmm_dfltmgrattrs;/* set defaults */ /* 4 bytes minimum */ -DBC_ASSERT (mgr_attrts->ul_min_block_size >=4 ); +DBC_ASSERT (mgr_attrts->min_block_size >=4 );/* save away smallest block allocation for this cmm mgr */ - cmm_obj->ul_min_block_size = mgr_attrts->ul_min_block_size; + cmm_obj->min_block_size = mgr_attrts->min_block_size; cmm_obj->page_size =PAGE_SIZE ;/* create node free list */
@@ -426,25 +426,25 @@ int cmm_get_info(struct cmm_object *hcmm_mgr,return status; }mutex_lock (&cmm_mgr_obj->cmm_lock); - cmm_info_obj->ul_num_gppsm_segs =0 ;/* # of SM segments */ + cmm_info_obj->num_gppsm_segs =0 ;/* # of SM segments */ /* Total # of outstanding alloc */ cmm_info_obj->ul_total_in_use_cnt =0 ;/* min block size */ - cmm_info_obj->ul_min_block_size = cmm_mgr_obj->ul_min_block_size; + cmm_info_obj->min_block_size = cmm_mgr_obj->min_block_size;/* check SM memory segments */ for (ul_seg =1 ; ul_seg <=CMM_MAXGPPSEGS ; ul_seg++) {/* get the allocator object for this segment id */ altr =get_allocator (cmm_mgr_obj, ul_seg);if (!altr)continue ; - cmm_info_obj->ul_num_gppsm_segs++; + cmm_info_obj->num_gppsm_segs++; cmm_info_obj->seg_info[ul_seg -1 ].seg_base_pa = altr->shm_base - altr->dsp_size; cmm_info_obj->seg_info[ul_seg -1 ].ul_total_seg_size = altr->dsp_size + altr->ul_sm_size; cmm_info_obj->seg_info[ul_seg -1 ].gpp_base_pa = altr->shm_base; - cmm_info_obj->seg_info[ul_seg -1 ].ul_gpp_size = + cmm_info_obj->seg_info[ul_seg -1 ].gpp_size = altr->ul_sm_size; cmm_info_obj->seg_info[ul_seg -1 ].dsp_base_va = altr->dsp_base;
@@ -452,11 +452,11 @@ int cmm_get_info(struct cmm_object *hcmm_mgr, altr->dsp_size; cmm_info_obj->seg_info[ul_seg -1 ].seg_base_va = altr->vm_base - altr->dsp_size; - cmm_info_obj->seg_info[ul_seg -1 ].ul_in_use_cnt =0 ; + cmm_info_obj->seg_info[ul_seg -1 ].in_use_cnt =0 ;list_for_each_entry (curr, &altr->in_use_list, link) { cmm_info_obj->ul_total_in_use_cnt++; - cmm_info_obj->seg_info[ul_seg -1 ].ul_in_use_cnt++; + cmm_info_obj->seg_info[ul_seg -1 ].in_use_cnt++; } }mutex_unlock (&cmm_mgr_obj->cmm_lock);
@@ -524,7 +524,7 @@ int cmm_register_gppsm_seg(struct cmm_object *hcmm_mgr, }/* Check if input ul_size is big enough to alloc at least one block */ -if (ul_size < cmm_mgr_obj->ul_min_block_size) { +if (ul_size < cmm_mgr_obj->min_block_size) { status = -EINVAL ; goto func_end; }
drivers/staging/tidspbridge/pmgr/dbll.c +6 -6
@@ -123,7 +123,7 @@ struct dbll_library_obj {u32 open_ref;/* Number of times opened */ u32 load_ref;/* Number of times loaded */ struct gh_t_hash_tab *sym_tab;/* Hash table of symbols */ -u32 ul_pos; +u32 pos; };/*
@@ -398,7 +398,7 @@ int dbll_get_sect(struct dbll_library_obj *lib, char *name, u32 *paddr, }else { (*(zl_lib->target_obj->attrs.fseek)) (zl_lib->fp, - zl_lib->ul_pos, + zl_lib->pos,SEEK_SET ); } }else {
@@ -522,7 +522,7 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags, }if (!status) { - zl_lib->ul_pos = (*(zl_lib->target_obj->attrs.ftell)) + zl_lib->pos = (*(zl_lib->target_obj->attrs.ftell)) (zl_lib->fp);/* Reset file cursor */ (*(zl_lib->target_obj->attrs.fseek)) (zl_lib->fp,
@@ -611,7 +611,7 @@ int dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags,if (zl_lib ==NULL ) { status = -ENOMEM ; }else { - zl_lib->ul_pos =0 ; + zl_lib->pos =0 ;/* Increment ref count to allow close on failure * later on */ zl_lib->open_ref++;
@@ -661,7 +661,7 @@ int dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags,if (!status && zl_lib->fp ==NULL ) status =dof_open (zl_lib); - zl_lib->ul_pos = (*(zl_lib->target_obj->attrs.ftell)) (zl_lib->fp); + zl_lib->pos = (*(zl_lib->target_obj->attrs.ftell)) (zl_lib->fp); (*(zl_lib->target_obj->attrs.fseek)) (zl_lib->fp, (long )0 ,SEEK_SET );/* Create a hash table for symbols if flag is set */ if (zl_lib->sym_tab !=NULL || !(flags &DBLL_SYMB ))
@@ -750,7 +750,7 @@ int dbll_read_sect(struct dbll_library_obj *lib, char *name, }else { (*(zl_lib->target_obj->attrs.fseek)) (zl_lib->fp, - zl_lib->ul_pos, + zl_lib->pos,SEEK_SET ); } }else {
drivers/staging/tidspbridge/rmgr/dbdcd.c +3 -3
@@ -1257,7 +1257,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,/* Heap Size for the node */ gen_obj->obj_data.node_obj. ndb_props.node_profiles[i]. - ul_heap_size =atoi (token); + heap_size =atoi (token); } } }
@@ -1289,7 +1289,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size, gen_obj->obj_data.proc_info.clock_rate =atoi (token); token =strsep (&psz_cur, seps); - gen_obj->obj_data.proc_info.ul_internal_mem_size =atoi (token); + gen_obj->obj_data.proc_info.internal_mem_size =atoi (token); token =strsep (&psz_cur, seps); gen_obj->obj_data.proc_info.external_mem_size =atoi (token);
@@ -1312,7 +1312,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,for (entry_id =0 ; entry_id <7 ; entry_id++) { token =strsep (&psz_cur, seps); gen_obj->obj_data.ext_proc_obj.ty_tlb[entry_id]. - ul_gpp_phys =atoi (token); + gpp_phys =atoi (token); token =strsep (&psz_cur, seps); gen_obj->obj_data.ext_proc_obj.ty_tlb[entry_id].
drivers/staging/tidspbridge/rmgr/node.c +11 -11
@@ -147,7 +147,7 @@ struct node_mgr {struct msg_mgr *msg_mgr_obj;/* Processor properties needed by Node Dispatcher */ -u32 ul_num_chnls;/* Total number of channels */ +u32 num_chnls;/* Total number of channels */ 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 */
@@ -1009,7 +1009,7 @@ int node_connect(struct node_object *node1, u32 stream1,set_bit (chnl_id, hnode_mgr->dma_chnl_map); chnl_id = chnl_id + - hnode_mgr->ul_num_chnls; + hnode_mgr->num_chnls; } }else if (pattrs->strm_mode ==STRMMODE_ZEROCOPY ) { chnl_id = find_first_zero_bit(
@@ -1021,7 +1021,7 @@ int node_connect(struct node_object *node1, u32 stream1,set_bit (chnl_id, hnode_mgr->zc_chnl_map); chnl_id = chnl_id + - (2 * hnode_mgr->ul_num_chnls); + (2 * hnode_mgr->num_chnls); } }else {/* must be PROCCOPY */ DBC_ASSERT(pattrs->strm_mode ==
@@ -1050,11 +1050,11 @@ int node_connect(struct node_object *node1, u32 stream1,if (pattrs) {if (pattrs->strm_mode ==STRMMODE_RDMA ) { -clear_bit (chnl_id - hnode_mgr->ul_num_chnls, +clear_bit (chnl_id - hnode_mgr->num_chnls, hnode_mgr->dma_chnl_map); }else if (pattrs->strm_mode ==STRMMODE_ZEROCOPY ) {clear_bit (chnl_id - - (2 * hnode_mgr->ul_num_chnls), + (2 * hnode_mgr->num_chnls), hnode_mgr->zc_chnl_map); }else { DBC_ASSERT(pattrs->strm_mode ==
@@ -2765,15 +2765,15 @@ static void free_stream(struct node_mgr *hnode_mgr, struct stream_chnl stream)set_bit (stream.dev_id, hnode_mgr->pipe_done_map); } }else if (stream.type ==HOSTCONNECT ) { -if (stream.dev_id < hnode_mgr->ul_num_chnls) { +if (stream.dev_id < hnode_mgr->num_chnls) {clear_bit (stream.dev_id, hnode_mgr->chnl_map); - }else if (stream.dev_id < (2 * hnode_mgr->ul_num_chnls)) { + }else if (stream.dev_id < (2 * hnode_mgr->num_chnls)) {/* dsp-dma */ -clear_bit (stream.dev_id - (1 * hnode_mgr->ul_num_chnls), +clear_bit (stream.dev_id - (1 * hnode_mgr->num_chnls), hnode_mgr->dma_chnl_map); - }else if (stream.dev_id < (3 * hnode_mgr->ul_num_chnls)) { + }else if (stream.dev_id < (3 * hnode_mgr->num_chnls)) {/* zero-copy */ -clear_bit (stream.dev_id - (2 * hnode_mgr->ul_num_chnls), +clear_bit (stream.dev_id - (2 * hnode_mgr->num_chnls), hnode_mgr->zc_chnl_map); } }
@@ -2946,7 +2946,7 @@ static int get_proc_props(struct node_mgr *hnode_mgr,return -EPERM ; 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; + hnode_mgr->num_chnls = host_res->num_chnls;/* * PROC will add an API to get dsp_processorinfo.
drivers/staging/tidspbridge/rmgr/rmm.c +6 -6
@@ -371,17 +371,17 @@ bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid,/* ul_size */ mem_stat_buf->ul_size = target->seg_tab[segid].length; -/* ul_num_free_blocks */ - mem_stat_buf->ul_num_free_blocks = free_blocks; +/* num_free_blocks */ + mem_stat_buf->num_free_blocks = free_blocks;/* ul_total_free_size */ mem_stat_buf->ul_total_free_size = total_free_size; -/* ul_len_max_free_block */ - mem_stat_buf->ul_len_max_free_block = max_free_size; +/* len_max_free_block */ + mem_stat_buf->len_max_free_block = max_free_size; -/* ul_num_alloc_blocks */ - mem_stat_buf->ul_num_alloc_blocks = +/* num_alloc_blocks */ + mem_stat_buf->num_alloc_blocks = target->seg_tab[segid].number; ret = true;
drivers/staging/tidspbridge/rmgr/strm.c +2 -2
@@ -71,7 +71,7 @@ struct strm_object {u32 utimeout;u32 num_bufs;/* Max # of bufs allowed in stream */ u32 un_bufs_in_strm;/* Current # of bufs in stream */ -u32 ul_n_bytes;/* bytes transferred since idled */ +u32 bytes;/* bytes transferred since idled */ /* STREAM_IDLE, STREAM_READY, ... */ enum dsp_streamstate strm_state;void *user_event;/* Saved for strm_get_info() */
@@ -341,7 +341,7 @@ int strm_get_info(struct strm_object *stream_obj, stream_info->user_strm->number_bufs_in_stream = chnl_info_obj.cio_cs + chnl_info_obj.cio_reqs;/* # of bytes transferred since last call to DSPStream_Idle() */ - stream_info->user_strm->ul_number_bytes = chnl_info_obj.bytes_tx; + stream_info->user_strm->number_bytes = chnl_info_obj.bytes_tx; stream_info->user_strm->sync_object_handle = chnl_info_obj.event_obj;/* Determine stream state based on channel state and info */ if (chnl_info_obj.state &CHNL_STATEEOS ) {
Signature · 1 line
1.6.3.3
PATCH 8/12 staging:tidspbridge - set8 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: hbridge_context bridge_context hchnl_mgr chnl_mgr hcmm_mgr cmm_mgr hdcd_mgr dcd_mgr hdeh_mgr deh_mgr hdev_obj dev_obj hdrv_obj drv_obj hmgr_obj mgr_obj hmsg_mgr msg_mgr hnode_mgr node_mgr psz_last_coff last_coff ul_resource resource ul_seg_id seg_id ul_size size ul_sm_size sm_size ul_total_free_size total_free_size ul_total_in_use_cnt total_in_use_cnt ul_total_seg_size total_seg_size ul_trace_buffer_begin trace_buffer_begin ul_trace_buffer_current trace_buffer_current ul_trace_buffer_end trace_buffer_end ul_unit unit ul_virt_size virt_size us_dsp_mau_size dsp_mau_size us_dsp_word_size dsp_word_size
--- drivers/staging/tidspbridge/core/_deh.h | 2 +- drivers/staging/tidspbridge/core/_msg_sm.h | 2 +- drivers/staging/tidspbridge/core/_tiomap.h | 2 +- drivers/staging/tidspbridge/core/chnl_sm.c | 6 +- drivers/staging/tidspbridge/core/io_sm.c | 138 ++++++++++---------- drivers/staging/tidspbridge/core/msg_sm.c | 16 +- drivers/staging/tidspbridge/core/tiomap3430.c | 16 +- drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 6 +- drivers/staging/tidspbridge/core/tiomap_io.c | 30 ++-- drivers/staging/tidspbridge/core/ue_deh.c | 6 +- .../tidspbridge/include/dspbridge/_chnl_sm.h | 2 +- .../tidspbridge/include/dspbridge/chnlpriv.h | 2 +- .../tidspbridge/include/dspbridge/cmmdefs.h | 8 +- .../staging/tidspbridge/include/dspbridge/dbdefs.h | 6 +- .../staging/tidspbridge/include/dspbridge/dev.h | 6 +- .../tidspbridge/include/dspbridge/dspapi-ioctl.h | 20 ++-- .../tidspbridge/include/dspbridge/dspioctl.h | 2 +- .../tidspbridge/include/dspbridge/nldrdefs.h | 4 +- .../tidspbridge/include/dspbridge/strmdefs.h | 2 +- drivers/staging/tidspbridge/pmgr/cmm.c | 88 ++++++------ drivers/staging/tidspbridge/pmgr/dev.c | 110 ++++++++-------- drivers/staging/tidspbridge/pmgr/dspapi.c | 20 ++-- drivers/staging/tidspbridge/pmgr/io.c | 2 +- drivers/staging/tidspbridge/pmgr/ioobj.h | 4 +- drivers/staging/tidspbridge/rmgr/disp.c | 18 ++-- drivers/staging/tidspbridge/rmgr/mgr.c | 16 +- drivers/staging/tidspbridge/rmgr/nldr.c | 44 +++--- drivers/staging/tidspbridge/rmgr/node.c | 88 ++++++------ drivers/staging/tidspbridge/rmgr/proc.c | 126 +++++++++--------- drivers/staging/tidspbridge/rmgr/rmm.c | 6 +- drivers/staging/tidspbridge/rmgr/strm.c | 12 +- 31 files changed, 405 insertions(+), 405 deletions(-)
drivers/staging/tidspbridge/core/_deh.h +1 -1
@@ -25,7 +25,7 @@/* DEH Manager: only one created per board: */ struct deh_mgr { -struct bridge_dev_context *hbridge_context;/* Bridge context. */ +struct bridge_dev_context *bridge_context;/* Bridge context. */ struct ntfy_object *ntfy_obj;/* NTFY object */ /* MMU Fault DPC */
drivers/staging/tidspbridge/core/_msg_sm.h +1 -1
@@ -108,7 +108,7 @@ struct msg_mgr {*/ struct msg_queue {struct list_head list_elem; -struct msg_mgr *hmsg_mgr; +struct msg_mgr *msg_mgr;u32 max_msgs;/* Node message depth */ u32 msgq_id;/* Node environment pointer */ struct list_head msg_free_list;/* Free MsgFrames ready to be filled */
drivers/staging/tidspbridge/core/_tiomap.h +1 -1
@@ -308,7 +308,7 @@ static const struct bpwr_clk_t bpwr_clks[] = {/* This Bridge driver's device context: */ struct bridge_dev_context { -struct dev_object *hdev_obj;/* Handle to Bridge device object. */ +struct dev_object *dev_obj;/* Handle to Bridge device object. */ u32 dsp_base_addr;/* Arm's API to DSP virt base addr */ /* * DSP External memory prog address as seen virtually by the OS on
drivers/staging/tidspbridge/core/chnl_sm.c +3 -3
@@ -388,7 +388,7 @@ int bridge_chnl_create(struct chnl_mgr **channel_mgr, chnl_mgr_obj->open_channels =0 ; chnl_mgr_obj->output_mask =0 ; chnl_mgr_obj->last_output =0 ; - chnl_mgr_obj->hdev_obj = hdev_obj; + chnl_mgr_obj->dev_obj = hdev_obj;spin_lock_init (&chnl_mgr_obj->chnl_mgr_lock); }else { status = -ENOMEM ;
@@ -434,7 +434,7 @@ int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr)kfree (chnl_mgr_obj->ap_channel);/* Set hchnl_mgr to NULL in device object. */ -dev_set_chnl_mgr (chnl_mgr_obj->hdev_obj,NULL ); +dev_set_chnl_mgr (chnl_mgr_obj->dev_obj,NULL );/* Free this Chnl Mgr object: */ kfree (hchnl_mgr); }else {
@@ -508,7 +508,7 @@ int bridge_chnl_get_info(struct chnl_object *chnl_obj,if (channel_info !=NULL ) {if (pchnl) {/* Return the requested information: */ - channel_info->hchnl_mgr = pchnl->chnl_mgr_obj; + channel_info->chnl_mgr = pchnl->chnl_mgr_obj; channel_info->event_obj = pchnl->user_event; channel_info->cnhl_id = pchnl->chnl_id; channel_info->mode = pchnl->chnl_mode;
drivers/staging/tidspbridge/core/io_sm.c +69 -69
416 lines not on this page · raw message
drivers/staging/tidspbridge/core/msg_sm.c +8 -8
@@ -121,7 +121,7 @@ int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr, struct msg_queue **msgq,return -ENOMEM ; msg_q->max_msgs = max_msgs; - msg_q->hmsg_mgr = hmsg_mgr; + msg_q->msg_mgr = hmsg_mgr; msg_q->arg = arg;/* Node handle */ msg_q->msgq_id = msgq_id;/* Node env (not valid yet) */ /* Queues of Message frames for messages from the DSP */
@@ -214,10 +214,10 @@ void bridge_msg_delete_queue(struct msg_queue *msg_queue_obj)struct msg_mgr *hmsg_mgr;u32 io_msg_pend; -if (!msg_queue_obj || !msg_queue_obj->hmsg_mgr) +if (!msg_queue_obj || !msg_queue_obj->msg_mgr)return ; - hmsg_mgr = msg_queue_obj->hmsg_mgr; + hmsg_mgr = msg_queue_obj->msg_mgr; msg_queue_obj->done = true;/* Unblock all threads blocked in MSG_Get() or MSG_Put(). */ io_msg_pend = msg_queue_obj->io_msg_pend;
@@ -254,7 +254,7 @@ int bridge_msg_get(struct msg_queue *msg_queue_obj,if (!msg_queue_obj || pmsg ==NULL )return -ENOMEM ; - hmsg_mgr = msg_queue_obj->hmsg_mgr; + hmsg_mgr = msg_queue_obj->msg_mgr;spin_lock_bh (&hmsg_mgr->msg_mgr_lock);/* If a message is already there, get it */
@@ -331,10 +331,10 @@ int bridge_msg_put(struct msg_queue *msg_queue_obj,u32 index;int status; -if (!msg_queue_obj || !pmsg || !msg_queue_obj->hmsg_mgr) +if (!msg_queue_obj || !pmsg || !msg_queue_obj->msg_mgr)return -EFAULT ; - hmsg_mgr = msg_queue_obj->hmsg_mgr; + hmsg_mgr = msg_queue_obj->msg_mgr;spin_lock_bh (&hmsg_mgr->msg_mgr_lock);
@@ -521,10 +521,10 @@ static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 num_to_dsp)struct msg_frame *pmsg, *tmp;u32 i; -if (!msg_queue_obj || !msg_queue_obj->hmsg_mgr) +if (!msg_queue_obj || !msg_queue_obj->msg_mgr)return ; - hmsg_mgr = msg_queue_obj->hmsg_mgr; + hmsg_mgr = msg_queue_obj->msg_mgr;/* Pull off num_to_dsp message frames from Msg manager and free */ i =0 ;
drivers/staging/tidspbridge/core/tiomap3430.c +8 -8
@@ -394,7 +394,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,* last dsp base image was loaded. The first entry is always * SHMMEM base. */ /* Get SHM_BEG - convert to byte address */ - (void )dev_get_symbol (dev_context->hdev_obj,SHMBASENAME , + (void )dev_get_symbol (dev_context->dev_obj,SHMBASENAME , &ul_shm_base_virt); ul_shm_base_virt *=DSPWORDSIZE ;DBC_ASSERT (ul_shm_base_virt !=0 );
@@ -472,12 +472,12 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, itmp_entry_ndx, e->gpp_pa, e->dsp_va, - e->ul_size); + e->size);hw_mmu_tlb_add (dev_context->dsp_mmu_base, e->gpp_pa, e->dsp_va, - e->ul_size, + e->size, itmp_entry_ndx, &map_attrs,1 ,1 );
@@ -503,9 +503,9 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,hw_mmu_enable (resources->dmmu_base);/* Enable the BIOS clock */ - (void )dev_get_symbol (dev_context->hdev_obj, + (void )dev_get_symbol (dev_context->dev_obj,BRIDGEINIT_BIOSGPTIMER , &ul_bios_gp_timer); - (void )dev_get_symbol (dev_context->hdev_obj, + (void )dev_get_symbol (dev_context->dev_obj,BRIDGEINIT_LOADMON_GPTIMER , &ul_load_monitor_timer); }
@@ -534,7 +534,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,if (!status) {/* Set the DSP clock rate */ - (void )dev_get_symbol (dev_context->hdev_obj, + (void )dev_get_symbol (dev_context->dev_obj,"_BRIDGEINIT_DSP_FREQ" , &ul_dsp_clk_addr);/*Set Autoidle Mode for IVA2 PLL */ (*pdata->dsp_cm_write)(1 << OMAP3430_AUTO_IVA2_DPLL_SHIFT,
@@ -607,7 +607,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,dsp_wdt_sm_set ((void *)ul_shm_base);dsp_wdt_enable (true); - status =dev_get_io_mgr (dev_context->hdev_obj, &hio_mgr); + status =dev_get_io_mgr (dev_context->dev_obj, &hio_mgr);if (hio_mgr) {io_sh_msetting (hio_mgr,SHM_OPPINFO ,NULL );/* Write the synchronization bit to indicate the
@@ -875,7 +875,7 @@ static int bridge_dev_create(struct bridge_dev_context dev_context->dsp_mmu_base = resources->dmmu_base; }if (!status) { - dev_context->hdev_obj = hdev_obj; + dev_context->dev_obj = hdev_obj;/* Store current board state. */ dev_context->brd_state =BRD_UNKNOWN ; dev_context->resources = resources;
drivers/staging/tidspbridge/core/tiomap3430_pwr.c +3 -3
@@ -121,7 +121,7 @@ int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context) dev_context->brd_state =BRD_DSP_HIBERNATION ;#ifdef CONFIG_TIDSPBRIDGE_DVFS status = -dev_get_io_mgr (dev_context->hdev_obj, &hio_mgr); +dev_get_io_mgr (dev_context->dev_obj, &hio_mgr);if (!hio_mgr) { status =DSP_EHANDLE ;return status;
@@ -216,7 +216,7 @@ int sleep_dsp(struct bridge_dev_context *dev_context, u32 dw_cmd,pr_err ("%s: Timed out waiting for DSP off mode, state %x\n" , __func__, pwr_state);#ifdef CONFIG_TIDSPBRIDGE_NTFY_PWRERR -dev_get_deh_mgr (dev_context->hdev_obj, &hdeh_mgr); +dev_get_deh_mgr (dev_context->dev_obj, &hdeh_mgr);bridge_deh_notify (hdeh_mgr,DSP_PWRERROR ,0 );#endif /* CONFIG_TIDSPBRIDGE_NTFY_PWRERR */ return -ETIMEDOUT ;
@@ -382,7 +382,7 @@ int post_scale_dsp(struct bridge_dev_context *dev_context,u32 voltage_domain;struct io_mgr *hio_mgr; - status =dev_get_io_mgr (dev_context->hdev_obj, &hio_mgr); + status =dev_get_io_mgr (dev_context->dev_obj, &hio_mgr);if (!hio_mgr)return -EFAULT ;
drivers/staging/tidspbridge/core/tiomap_io.c +15 -15
@@ -65,20 +65,20 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,bool trace_read = false;if (!ul_shm_base_virt) { - status =dev_get_symbol (dev_context->hdev_obj, + status =dev_get_symbol (dev_context->dev_obj,SHMBASENAME , &ul_shm_base_virt); }DBC_ASSERT (ul_shm_base_virt !=0 );/* Check if it is a read of Trace section */ if (!status && !ul_trace_sec_beg) { - status =dev_get_symbol (dev_context->hdev_obj, + status =dev_get_symbol (dev_context->dev_obj,DSP_TRACESEC_BEG , &ul_trace_sec_beg); }DBC_ASSERT (ul_trace_sec_beg !=0 );if (!status && !ul_trace_sec_end) { - status =dev_get_symbol (dev_context->hdev_obj, + status =dev_get_symbol (dev_context->dev_obj,DSP_TRACESEC_END , &ul_trace_sec_end); }DBC_ASSERT (ul_trace_sec_end !=0 );
@@ -102,19 +102,19 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,/* Get DYNEXT_BEG, EXT_BEG and EXT_END. */ if (!status && !ul_dyn_ext_base) { - status =dev_get_symbol (dev_context->hdev_obj, + status =dev_get_symbol (dev_context->dev_obj,DYNEXTBASE , &ul_dyn_ext_base); }DBC_ASSERT (ul_dyn_ext_base !=0 );if (!status) { - status =dev_get_symbol (dev_context->hdev_obj, + status =dev_get_symbol (dev_context->dev_obj,EXTBASE , &ul_ext_base); }DBC_ASSERT (ul_ext_base !=0 );if (!status) { - status =dev_get_symbol (dev_context->hdev_obj, + status =dev_get_symbol (dev_context->dev_obj,EXTEND , &ul_ext_end); }DBC_ASSERT (ul_ext_end !=0 );
@@ -246,10 +246,10 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,if (symbols_reloaded) {/* Check if it is a load to Trace section */ - ret =dev_get_symbol (dev_context->hdev_obj, + ret =dev_get_symbol (dev_context->dev_obj,DSP_TRACESEC_BEG , &ul_trace_sec_beg);if (!ret) - ret =dev_get_symbol (dev_context->hdev_obj, + ret =dev_get_symbol (dev_context->dev_obj,DSP_TRACESEC_END , &ul_trace_sec_end); }
@@ -269,7 +269,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,if (!dw_base_addr) {if (symbols_reloaded)/* Get SHM_BEG EXT_BEG and EXT_END. */ - ret =dev_get_symbol (dev_context->hdev_obj, + ret =dev_get_symbol (dev_context->dev_obj,SHMBASENAME , &ul_shm_base_virt);DBC_ASSERT (ul_shm_base_virt !=0 );if (dynamic_load) {
@@ -277,7 +277,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,if (symbols_reloaded) ret =dev_get_symbol - (dev_context->hdev_obj,DYNEXTBASE , + (dev_context->dev_obj,DYNEXTBASE , &ul_ext_base); }DBC_ASSERT (ul_ext_base !=0 );
@@ -289,7 +289,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,if (symbols_reloaded) ret =dev_get_symbol - (dev_context->hdev_obj,EXTEND , + (dev_context->dev_obj,EXTEND , &ul_ext_end); } }else {
@@ -297,13 +297,13 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,if (!ret) ret =dev_get_symbol - (dev_context->hdev_obj,EXTBASE , + (dev_context->dev_obj,EXTBASE , &ul_ext_base);DBC_ASSERT (ul_ext_base !=0 );if (!ret) ret =dev_get_symbol - (dev_context->hdev_obj,EXTEND , + (dev_context->dev_obj,EXTEND , &ul_ext_end); } }
@@ -324,12 +324,12 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,if (symbols_reloaded) { ret =dev_get_symbol - (dev_context->hdev_obj, + (dev_context->dev_obj,DSP_TRACESEC_END , &shm0_end);if (!ret) { ret =dev_get_symbol - (dev_context->hdev_obj,DYNEXTBASE , + (dev_context->dev_obj,DYNEXTBASE , &ul_dyn_ext_base); } }
drivers/staging/tidspbridge/core/ue_deh.c +3 -3
@@ -52,7 +52,7 @@ static irqreturn_t mmu_fault_isr(int irq, void *data)if (!deh)return IRQ_HANDLED ; - resources = deh->hbridge_context->resources; + resources = deh->bridge_context->resources;if (!resources) {dev_dbg (bridge,"%s: Failed to get Host Resources\n" , __func__);
@@ -113,7 +113,7 @@ int bridge_deh_create(struct deh_mgr **ret_deh,tasklet_init (&deh->dpc_tasklet, mmu_fault_dpc, (u32 ) deh);/* Fill in context structure */ - deh->hbridge_context = hbridge_context; + deh->bridge_context = hbridge_context;/* Install ISR function for DSP MMU fault */ status = request_irq(INT_DSP_MMU_IRQ, mmu_fault_isr, 0,
@@ -228,7 +228,7 @@ void bridge_deh_notify(struct deh_mgr *deh, int event, int info)return ;dev_dbg (bridge,"%s: device exception" , __func__); - dev_context = deh->hbridge_context; + dev_context = deh->bridge_context;switch (event) {case DSP_SYSERROR :
drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h +1 -1
@@ -116,7 +116,7 @@ struct chnl_mgr {struct bridge_drv_interface *intf_fxns;struct io_mgr *hio_mgr;/* IO manager */ /* Device this board represents */ -struct dev_object *hdev_obj; +struct dev_object *dev_obj;/* These fields initialized in bridge_chnl_create(): */ u32 output_mask;/* Host output channels w/ full buffers */
drivers/staging/tidspbridge/include/dspbridge/chnlpriv.h +1 -1
@@ -66,7 +66,7 @@/* Channel info. */ struct chnl_info { -struct chnl_mgr *hchnl_mgr;/* Owning channel manager. */ +struct chnl_mgr *chnl_mgr;/* Owning channel manager. */ u32 cnhl_id;/* Channel ID. */ void *event_obj;/* Channel I/O completion event. */ /*Abstraction of I/O completion event. */
drivers/staging/tidspbridge/include/dspbridge/cmmdefs.h +4 -4
@@ -28,7 +28,7 @@ struct cmm_mgrattrs {/* Attributes for CMM_AllocBuf() & CMM_AllocDesc() */ struct cmm_attrs { -u32 ul_seg_id;/* 1,2... are SM segments. 0 is not. */ +u32 seg_id;/* 1,2... are SM segments. 0 is not. */ u32 alignment;/* 0,1,2,4....min_block_size */ };
@@ -53,7 +53,7 @@ struct cmm_attrs {struct cmm_seginfo {u32 seg_base_pa;/* Start Phys address of SM segment */ /* Total size in bytes of segment: DSP+GPP */ -u32 ul_total_seg_size; +u32 total_seg_size;u32 gpp_base_pa;/* Start Phys addr of Gpp SM seg */ u32 gpp_size;/* Size of Gpp SM seg in bytes */ u32 dsp_base_va;/* DSP virt base byte address */
@@ -69,7 +69,7 @@ struct cmm_info {/* # of SM segments registered with this Cmm. */ u32 num_gppsm_segs;/* Total # of allocations outstanding for CMM */ -u32 ul_total_in_use_cnt; +u32 total_in_use_cnt;/* Min SM block size allocation from cmm_create() */ u32 min_block_size;/* Info per registered SM segment. */
@@ -78,7 +78,7 @@ struct cmm_info {/* XlatorCreate attributes */ struct cmm_xlatorattrs { -u32 ul_seg_id;/* segment Id used for SM allocations */ +u32 seg_id;/* segment Id used for SM allocations */ u32 dsp_bufs;/* # of DSP-side bufs */ u32 dsp_buf_size;/* size of DSP-side bufs in GPP bytes */ /* Vm base address alloc'd in client process context */
drivers/staging/tidspbridge/include/dspbridge/dbdefs.h +3 -3
@@ -227,8 +227,8 @@ enum dsp_flushtype {/* Memory Segment Status Values */ struct dsp_memstat { -u32 ul_size; -u32 ul_total_free_size; +u32 size; +u32 total_free_size;u32 len_max_free_block;u32 num_free_blocks;u32 num_alloc_blocks;
@@ -407,7 +407,7 @@ struct dsp_resourceinfo {u32 cb_struct;enum dsp_resourceinfotype resource_type;union { -u32 ul_resource; +u32 resource;struct dsp_memstat mem_stat;struct dsp_procloadstat proc_load_stat; } result;
drivers/staging/tidspbridge/include/dspbridge/dev.h +3 -3
@@ -146,8 +146,8 @@ extern int dev_create_iva_device(struct dev_object* DEV Initialized * Valid hdev_obj * Ensures: -* 0 and hdev_obj->hnode_mgr != NULL -* else hdev_obj->hnode_mgr == NULL +* 0 and hdev_obj->node_mgr != NULL +* else hdev_obj->node_mgr == NULL */ extern int dev_create2 (struct dev_object *hdev_obj);
@@ -164,7 +164,7 @@ extern int dev_create2(struct dev_object *hdev_obj);* DEV Initialized * Valid hdev_obj * Ensures: -* 0 and hdev_obj->hnode_mgr == NULL +* 0 and hdev_obj->node_mgr == NULL * else -EPERM. */ extern int dev_destroy2 (struct dev_object *hdev_obj);
drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h +10 -10
@@ -124,20 +124,20 @@ union trapped_args {struct {void *hprocessor; -u32 ul_size; +u32 size;void *__user *pp_rsv_addr; } args_proc_rsvmem;struct {void *hprocessor; -u32 ul_size; +u32 size;void *prsv_addr; } args_proc_unrsvmem;struct {void *hprocessor;void *pmpu_addr; -u32 ul_size; +u32 size;void *req_addr;void *__user *pp_map_addr;u32 ul_map_attr;
@@ -145,21 +145,21 @@ union trapped_args {struct {void *hprocessor; -u32 ul_size; +u32 size;void *map_addr; } args_proc_unmapmem;struct {void *hprocessor;void *pmpu_addr; -u32 ul_size; +u32 size;u32 dir; } args_proc_dma;struct {void *hprocessor;void *pmpu_addr; -u32 ul_size; +u32 size;u32 ul_flags; } args_proc_flushmemory;
@@ -170,7 +170,7 @@ union trapped_args {struct {void *hprocessor;void *pmpu_addr; -u32 ul_size; +u32 size; } args_proc_invalidatememory;/* NODE Module */
@@ -336,14 +336,14 @@ union trapped_args {/* CMM Module */ struct { -struct cmm_object *hcmm_mgr; +struct cmm_object *cmm_mgr;u32 usize;struct cmm_attrs *pattrs;void **pp_buf_va; } args_cmm_allocbuf;struct { -struct cmm_object *hcmm_mgr; +struct cmm_object *cmm_mgr;void *buf_pa;u32 ul_seg_id; } args_cmm_freebuf;
@@ -354,7 +354,7 @@ union trapped_args { } args_cmm_gethandle;struct { -struct cmm_object *hcmm_mgr; +struct cmm_object *cmm_mgr;struct cmm_info __user *cmm_info_obj; } args_cmm_getinfo;
drivers/staging/tidspbridge/include/dspbridge/dspioctl.h +1 -1
@@ -64,7 +64,7 @@ struct bridge_ioctl_extproc {u32 gpp_pa;/* GPP physical address */ /* GPP virtual address. __va does not work for ioremapped addresses */ u32 gpp_va; -u32 ul_size;/* Size of the mapped memory in bytes */ +u32 size;/* Size of the mapped memory in bytes */ enum hw_endianism_t endianism;enum hw_mmu_mixed_size_t mixed_mode;enum hw_element_size_t elem_size;
drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h +2 -2
@@ -84,8 +84,8 @@ typedef u32(*nldr_writefxn) (void *priv_ref,struct nldr_attrs {nldr_ovlyfxn ovly;nldr_writefxn write; -u16 us_dsp_word_size; -u16 us_dsp_mau_size; +u16 dsp_word_size; +u16 dsp_mau_size; };/*
drivers/staging/tidspbridge/include/dspbridge/strmdefs.h +1 -1
@@ -30,7 +30,7 @@ struct strm_attr {char *pstr_event_name;void *virt_base;/* Process virtual base address of * mapped SM */ -u32 ul_virt_size;/* Size of virtual space in bytes */ +u32 virt_size;/* Size of virtual space in bytes */ struct dsp_streamattrin *stream_attr_in; };
drivers/staging/tidspbridge/pmgr/cmm.c +44 -44
271 lines not on this page · raw message
drivers/staging/tidspbridge/pmgr/dev.c +55 -55
268 lines not on this page · raw message
drivers/staging/tidspbridge/pmgr/dspapi.c +10 -10
@@ -695,7 +695,7 @@ u32 procwrap_end_dma(union trapped_args *args, void *pr_ctxt) status =proc_end_dma (pr_ctxt, args->args_proc_dma.pmpu_addr, - args->args_proc_dma.ul_size, + args->args_proc_dma.size, args->args_proc_dma.dir);return status; }
@@ -709,7 +709,7 @@ u32 procwrap_begin_dma(union trapped_args *args, void *pr_ctxt) status =proc_begin_dma (pr_ctxt, args->args_proc_dma.pmpu_addr, - args->args_proc_dma.ul_size, + args->args_proc_dma.size, args->args_proc_dma.dir);return status; }
@@ -727,7 +727,7 @@ u32 procwrap_flush_memory(union trapped_args *args, void *pr_ctxt) status =proc_flush_memory (pr_ctxt, args->args_proc_flushmemory.pmpu_addr, - args->args_proc_flushmemory.ul_size, + args->args_proc_flushmemory.size, args->args_proc_flushmemory.ul_flags);return status; }
@@ -742,7 +742,7 @@ u32 procwrap_invalidate_memory(union trapped_args *args, void *pr_ctxt) status =proc_invalidate_memory (pr_ctxt, args->args_proc_invalidatememory.pmpu_addr, - args->args_proc_invalidatememory.ul_size); + args->args_proc_invalidatememory.size);return status; }
@@ -950,12 +950,12 @@ u32 procwrap_map(union trapped_args *args, void *pr_ctxt)void *map_addr;void *hprocessor = ((struct process_context *)pr_ctxt)->hprocessor; -if (!args->args_proc_mapmem.ul_size) +if (!args->args_proc_mapmem.size)return -EINVAL ; status =proc_map (args->args_proc_mapmem.hprocessor, args->args_proc_mapmem.pmpu_addr, - args->args_proc_mapmem.ul_size, + args->args_proc_mapmem.size, args->args_proc_mapmem.req_addr, &map_addr, args->args_proc_mapmem.ul_map_attr, pr_ctxt);if (!status) {
@@ -999,12 +999,12 @@ u32 procwrap_reserve_memory(union trapped_args *args, void *pr_ctxt)void *prsv_addr;void *hprocessor = ((struct process_context *)pr_ctxt)->hprocessor; -if ((args->args_proc_rsvmem.ul_size <=0 ) || - (args->args_proc_rsvmem.ul_size & (PG_SIZE4K -1 )) !=0 ) +if ((args->args_proc_rsvmem.size <=0 ) || + (args->args_proc_rsvmem.size & (PG_SIZE4K -1 )) !=0 )return -EINVAL ; status =proc_reserve_memory (hprocessor, - args->args_proc_rsvmem.ul_size, &prsv_addr, + args->args_proc_rsvmem.size, &prsv_addr, pr_ctxt);if (!status) {if (put_user (prsv_addr, args->args_proc_rsvmem.pp_rsv_addr)) {
@@ -1905,7 +1905,7 @@ u32 cmmwrap_get_info(union trapped_args *args, void *pr_ctxt)int status =0 ;struct cmm_info cmm_info_obj; - status =cmm_get_info (args->args_cmm_getinfo.hcmm_mgr, &cmm_info_obj); + status =cmm_get_info (args->args_cmm_getinfo.cmm_mgr, &cmm_info_obj);CP_TO_USR (args->args_cmm_getinfo.cmm_info_obj, &cmm_info_obj, status,1 );
drivers/staging/tidspbridge/pmgr/io.c +1 -1
@@ -74,7 +74,7 @@ int io_create(struct io_mgr **io_man, struct dev_object *hdev_obj,if (!status) { pio_mgr = (struct io_mgr_ *)hio_mgr; pio_mgr->intf_fxns = intf_fxns; - pio_mgr->hdev_obj = hdev_obj; + pio_mgr->dev_obj = hdev_obj;/* Return the new channel manager handle: */ *io_man = hio_mgr;
drivers/staging/tidspbridge/pmgr/ioobj.h +2 -2
@@ -29,10 +29,10 @@*/ struct io_mgr_ {/* These must be the first fields in a io_mgr struct: */ -struct bridge_dev_context *hbridge_context;/* Bridge context. */ +struct bridge_dev_context *bridge_context;/* Bridge context. */ /* Function interface to Bridge driver. */ struct bridge_drv_interface *intf_fxns; -struct dev_object *hdev_obj;/* Device this board represents. */ +struct dev_object *dev_obj;/* Device this board represents. */ };#endif /* IOOBJ_ */
drivers/staging/tidspbridge/rmgr/disp.c +9 -9
@@ -58,10 +58,10 @@* ======== disp_object ======== */ struct disp_object { -struct dev_object *hdev_obj;/* Device for this processor */ +struct dev_object *dev_obj;/* Device for this processor */ /* Function interface to Bridge driver */ struct bridge_drv_interface *intf_fxns; -struct chnl_mgr *hchnl_mgr;/* Channel manager */ +struct chnl_mgr *chnl_mgr;/* Channel manager */ 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 */
@@ -108,11 +108,11 @@ int disp_create(struct disp_object **dispatch_obj,if (disp_obj ==NULL ) status = -ENOMEM ;else - disp_obj->hdev_obj = hdev_obj; + disp_obj->dev_obj = hdev_obj;/* Get Channel manager and Bridge function interface */ if (!status) { - status =dev_get_chnl_mgr (hdev_obj, &(disp_obj->hchnl_mgr)); + status =dev_get_chnl_mgr (hdev_obj, &(disp_obj->chnl_mgr));if (!status) { (void )dev_get_intf_fxns (hdev_obj, &intf_fxns); disp_obj->intf_fxns = intf_fxns;
@@ -142,7 +142,7 @@ int disp_create(struct disp_object **dispatch_obj, chnl_attr_obj.event_obj =NULL ; ul_chnl_id = disp_attrs->chnl_offset +CHNLTORMSOFFSET ; status = (*intf_fxns->chnl_open) (&(disp_obj->chnl_to_dsp), - disp_obj->hchnl_mgr, + disp_obj->chnl_mgr,CHNL_MODETODSP , ul_chnl_id, &chnl_attr_obj);
@@ -150,7 +150,7 @@ int disp_create(struct disp_object **dispatch_obj, ul_chnl_id = disp_attrs->chnl_offset +CHNLFROMRMSOFFSET ; status = (*intf_fxns->chnl_open) (&(disp_obj->chnl_from_dsp), - disp_obj->hchnl_mgr, + disp_obj->chnl_mgr,CHNL_MODEFROMDSP , ul_chnl_id, &chnl_attr_obj); }
@@ -282,7 +282,7 @@ int disp_node_create(struct disp_object *disp_obj,DBC_REQUIRE (node_get_type (hnode) !=NODE_DEVICE );DBC_REQUIRE (node_env !=NULL ); - status =dev_get_dev_type (disp_obj->hdev_obj, &dev_type); + status =dev_get_dev_type (disp_obj->dev_obj, &dev_type);if (status) goto func_end;
@@ -484,7 +484,7 @@ int disp_node_delete(struct disp_object *disp_obj,DBC_REQUIRE (disp_obj);DBC_REQUIRE (hnode !=NULL ); - status =dev_get_dev_type (disp_obj->hdev_obj, &dev_type); + status =dev_get_dev_type (disp_obj->dev_obj, &dev_type);if (!status) {
@@ -525,7 +525,7 @@ int disp_node_run(struct disp_object *disp_obj,DBC_REQUIRE (disp_obj);DBC_REQUIRE (hnode !=NULL ); - status =dev_get_dev_type (disp_obj->hdev_obj, &dev_type); + status =dev_get_dev_type (disp_obj->dev_obj, &dev_type);if (!status) {
drivers/staging/tidspbridge/rmgr/mgr.c +8 -8
@@ -44,7 +44,7 @@#define ZLDLLNAME ""struct mgr_object { -struct dcd_manager *hdcd_mgr;/* Proc/Node data manager */ +struct dcd_manager *dcd_mgr;/* Proc/Node data manager */ };/* ----------------------------------- Globals */
@@ -67,7 +67,7 @@ int mgr_create(struct mgr_object **mgr_obj, pmgr_obj =kzalloc (sizeof (struct mgr_object ),GFP_KERNEL );if (pmgr_obj) { - status =dcd_create_manager (ZLDLLNAME , &pmgr_obj->hdcd_mgr); + status =dcd_create_manager (ZLDLLNAME , &pmgr_obj->dcd_mgr);if (!status) {/* If succeeded store the handle in the MGR Object */ if (drv_datap) {
@@ -81,7 +81,7 @@ int mgr_create(struct mgr_object **mgr_obj,if (!status) { *mgr_obj = pmgr_obj; }else { -dcd_destroy_manager (pmgr_obj->hdcd_mgr); +dcd_destroy_manager (pmgr_obj->dcd_mgr);kfree (pmgr_obj); } }else {
@@ -110,8 +110,8 @@ int mgr_destroy(struct mgr_object *hmgr_obj)DBC_REQUIRE (hmgr_obj);/* Free resources */ -if (hmgr_obj->hdcd_mgr) -dcd_destroy_manager (hmgr_obj->hdcd_mgr); +if (hmgr_obj->dcd_mgr) +dcd_destroy_manager (hmgr_obj->dcd_mgr);kfree (pmgr_obj);/* Update the driver data with NULL for MGR Object */
@@ -163,7 +163,7 @@ int mgr_enum_node_info(u32 node_id, struct dsp_ndbprops *pndb_props,break ; *pu_num_nodes = node_index;if (node_id == (node_index -1 )) { - status =dcd_get_object_def (pmgr_obj->hdcd_mgr, + status =dcd_get_object_def (pmgr_obj->dcd_mgr, &node_uuid,DSP_DCDNODETYPE , &gen_obj);if (status)break ;
@@ -258,7 +258,7 @@ int mgr_enum_processor_info(u32 processor_id,if (proc_detect != false)continue ; - status2 =dcd_get_object_def (pmgr_obj->hdcd_mgr, + status2 =dcd_get_object_def (pmgr_obj->dcd_mgr, (struct dsp_uuid *)&temp_uuid,DSP_DCDPROCESSORTYPE , &gen_obj);if (!status2) {
@@ -333,7 +333,7 @@ int mgr_get_dcd_handle(struct mgr_object *mgr_handle, *dcd_handle = (u32 )NULL ;if (pmgr_obj) { - *dcd_handle = (u32 ) pmgr_obj->hdcd_mgr; + *dcd_handle = (u32 ) pmgr_obj->dcd_mgr; status =0 ; } DBC_ENSURE((!status && *dcd_handle != (u32) NULL) ||
drivers/staging/tidspbridge/rmgr/nldr.c +22 -22
140 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/node.c +44 -44
317 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/proc.c +63 -63
393 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/rmm.c +3 -3
@@ -369,13 +369,13 @@ bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid, }/* ul_size */ - mem_stat_buf->ul_size = target->seg_tab[segid].length; + mem_stat_buf->size = target->seg_tab[segid].length;/* num_free_blocks */ mem_stat_buf->num_free_blocks = free_blocks; -/* ul_total_free_size */ - mem_stat_buf->ul_total_free_size = total_free_size; +/* total_free_size */ + mem_stat_buf->total_free_size = total_free_size;/* len_max_free_block */ mem_stat_buf->len_max_free_block = max_free_size;
drivers/staging/tidspbridge/rmgr/strm.c +6 -6
@@ -55,7 +55,7 @@*/ struct strm_mgr {struct dev_object *dev_obj;/* Device for this processor */ -struct chnl_mgr *hchnl_mgr;/* Channel manager */ +struct chnl_mgr *chnl_mgr;/* Channel manager */ /* Function interface to Bridge driver */ struct bridge_drv_interface *intf_fxns; };
@@ -213,7 +213,7 @@ int strm_create(struct strm_mgr **strm_man,/* Get Channel manager and Bridge function interface */ if (!status) { - status =dev_get_chnl_mgr (dev_obj, &(strm_mgr_obj->hchnl_mgr)); + status =dev_get_chnl_mgr (dev_obj, &(strm_mgr_obj->chnl_mgr));if (!status) { (void )dev_get_intf_fxns (dev_obj, &(strm_mgr_obj->intf_fxns));
@@ -532,7 +532,7 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index,if (status) goto func_cont; -if ((pattr->virt_base ==NULL ) || !(pattr->ul_virt_size >0 )) +if ((pattr->virt_base ==NULL ) || !(pattr->virt_size >0 )) goto func_cont;/* No System DMA */
@@ -547,7 +547,7 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index,/* Set translators Virt Addr attributes */ status =cmm_xlator_info (strm_obj->xlator, (u8 **) &pattr->virt_base, - pattr->ul_virt_size, + pattr->virt_size, strm_obj->segment_id, true); } }
@@ -558,7 +558,7 @@ func_cont: CHNL_MODETODSP :CHNL_MODEFROMDSP ; intf_fxns = strm_mgr_obj->intf_fxns; status = (*intf_fxns->chnl_open) (&(strm_obj->chnl_obj), - strm_mgr_obj->hchnl_mgr, + strm_mgr_obj->chnl_mgr, chnl_mode, ul_chnl_id, &chnl_attr_obj);if (status) {
@@ -572,7 +572,7 @@ func_cont:* We got a status that's not return-able. * Assert that we got something we were * expecting (-EFAULT isn't acceptable, -* strm_mgr_obj->hchnl_mgr better be valid or we +* strm_mgr_obj->chnl_mgr better be valid or we * assert here), and then return -EPERM. */ DBC_ASSERT(status == -ENOSR ||
Signature · 1 line
1.6.3.3
PATCH 9/12 staging:tidspbridge - set9 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: hprocessor processor udma_priority dma_priority udsp_data_mau_size dsp_data_mau_size udsp_heap_addr dsp_heap_addr udsp_heap_res_addr dsp_heap_res_addr udsp_heap_virt_addr dsp_heap_virt_addr udsp_mau_size dsp_mau_size udsp_word_size dsp_word_size ugpp_heap_addr gpp_heap_addr ugpp_heap_virt_addr gpp_heap_virt_addr us_data2 data2 us_data3 data3 uc_data4 data4 uc_data5 data5 uc_data6 data6 us_load_type load_type usm_length sm_length utimeout timeout uwc_deadline wc_deadline uwc_execution_time wc_execution_time uwc_period wc_period
--- drivers/staging/tidspbridge/gen/uuidutil.c | 20 ++-- .../tidspbridge/include/dspbridge/dbdcddef.h | 2 +- .../staging/tidspbridge/include/dspbridge/dbdefs.h | 30 ++-- .../staging/tidspbridge/include/dspbridge/drv.h | 4 +- .../tidspbridge/include/dspbridge/dspapi-ioctl.h | 48 ++++---- .../tidspbridge/include/dspbridge/dspdefs.h | 2 +- .../staging/tidspbridge/include/dspbridge/iodefs.h | 2 +- .../tidspbridge/include/dspbridge/nodepriv.h | 8 +- drivers/staging/tidspbridge/pmgr/dev.c | 4 +- drivers/staging/tidspbridge/pmgr/dspapi.c | 44 +++--- drivers/staging/tidspbridge/pmgr/io.c | 2 +- drivers/staging/tidspbridge/rmgr/dbdcd.c | 12 +- drivers/staging/tidspbridge/rmgr/disp.c | 8 +- drivers/staging/tidspbridge/rmgr/drv.c | 4 +- drivers/staging/tidspbridge/rmgr/nldr.c | 6 +- drivers/staging/tidspbridge/rmgr/node.c | 138 ++++++++++---------- drivers/staging/tidspbridge/rmgr/proc.c | 16 +- drivers/staging/tidspbridge/rmgr/strm.c | 22 ++-- 18 files changed, 186 insertions(+), 186 deletions(-)
drivers/staging/tidspbridge/gen/uuidutil.c +10 -10
@@ -45,11 +45,11 @@ void uuid_uuid_to_string(struct dsp_uuid *uuid_obj, char *sz_uuid, i =snprintf (sz_uuid, size,"%.8X_%.4X_%.4X_%.2X%.2X_%.2X%.2X%.2X%.2X%.2X%.2X" , - uuid_obj->data1, uuid_obj->us_data2, uuid_obj->us_data3, - uuid_obj->uc_data4, uuid_obj->uc_data5, - uuid_obj->uc_data6[0 ], uuid_obj->uc_data6[1 ], - uuid_obj->uc_data6[2 ], uuid_obj->uc_data6[3 ], - uuid_obj->uc_data6[4 ], uuid_obj->uc_data6[5 ]); + uuid_obj->data1, uuid_obj->data2, uuid_obj->data3, + uuid_obj->data4, uuid_obj->data5, + uuid_obj->data6[0 ], uuid_obj->data6[1 ], + uuid_obj->data6[2 ], uuid_obj->data6[3 ], + uuid_obj->data6[4 ], uuid_obj->data6[5 ]);DBC_ENSURE (i !=-1 ); }
@@ -85,29 +85,29 @@ void uuid_uuid_from_string(char *sz_uuid, struct dsp_uuid *uuid_obj)/* Step over underscore */ sz_uuid++; - uuid_obj->us_data2 = (u16 )uuid_hex_to_bin (sz_uuid,4 ); + uuid_obj->data2 = (u16 )uuid_hex_to_bin (sz_uuid,4 ); sz_uuid +=4 ;/* Step over underscore */ sz_uuid++; - uuid_obj->us_data3 = (u16 )uuid_hex_to_bin (sz_uuid,4 ); + uuid_obj->data3 = (u16 )uuid_hex_to_bin (sz_uuid,4 ); sz_uuid +=4 ;/* Step over underscore */ sz_uuid++; - uuid_obj->uc_data4 = (u8 )uuid_hex_to_bin (sz_uuid,2 ); + uuid_obj->data4 = (u8 )uuid_hex_to_bin (sz_uuid,2 ); sz_uuid +=2 ; - uuid_obj->uc_data5 = (u8 )uuid_hex_to_bin (sz_uuid,2 ); + uuid_obj->data5 = (u8 )uuid_hex_to_bin (sz_uuid,2 ); sz_uuid +=2 ;/* Step over underscore */ sz_uuid++;for (j =0 ; j <6 ; j++) { - uuid_obj->uc_data6[j] = (u8 )uuid_hex_to_bin (sz_uuid,2 ); + uuid_obj->data6[j] = (u8 )uuid_hex_to_bin (sz_uuid,2 ); sz_uuid +=2 ; } }
drivers/staging/tidspbridge/include/dspbridge/dbdcddef.h +1 -1
@@ -54,7 +54,7 @@ struct dcd_nodeprops {char *pstr_i_alg_name;/* Dynamic load properties */ -u16 us_load_type;/* Static, dynamic, overlay */ +u16 load_type;/* Static, dynamic, overlay */ u32 data_mem_seg_mask;/* Data memory requirements */ u32 code_mem_seg_mask;/* Code memory requirements */ };
drivers/staging/tidspbridge/include/dspbridge/dbdefs.h +15 -15
@@ -119,11 +119,11 @@ static inline bool is_valid_proc_event(u32 x)/* The Node UUID structure */ struct dsp_uuid {u32 data1; -u16 us_data2; -u16 us_data3; -u8 uc_data4; -u8 uc_data5; -u8 uc_data6[6 ]; +u16 data2; +u16 data3; +u8 data4; +u8 data5; +u8 data6[6 ]; };/* DCD types */
@@ -248,11 +248,11 @@ struct dsp_strmattr {u32 buf_size;/* Buffer size (DSP words) */ u32 num_bufs;/* Number of buffers */ u32 buf_alignment;/* Buffer alignment */ -u32 utimeout;/* Timeout for blocking STRM calls */ +u32 timeout;/* Timeout for blocking STRM calls */ enum dsp_strmmode strm_mode;/* mode of stream when opened */ /* DMA chnl id if dsp_strmmode is LDMA or RDMA */ u32 udma_chnl_id; -u32 udma_priority;/* DMA channel priority 0=lowest, >0=high */ +u32 dma_priority;/* DMA channel priority 0=lowest, >0=high */ };/* The dsp_cbdata structure */
@@ -274,9 +274,9 @@ struct dsp_resourcereqmts {u32 static_data_size;u32 global_data_size;u32 program_mem_size; -u32 uwc_execution_time; -u32 uwc_period; -u32 uwc_deadline; +u32 wc_execution_time; +u32 wc_period; +u32 wc_deadline;u32 avg_exection_time;u32 minimum_period; };
@@ -313,7 +313,7 @@ struct dsp_ndbprops {u32 message_depth;u32 num_input_streams;u32 num_output_streams; -u32 utimeout; +u32 timeout;u32 count_profiles;/* Number of supported profiles */ /* Array of profiles */ struct dsp_nodeprofs node_profiles[MAX_PROFILES ];
@@ -325,7 +325,7 @@ struct dsp_ndbprops {struct dsp_nodeattrin {u32 cb_struct;s32 prio; -u32 utimeout; +u32 timeout;u32 profile_id;/* Reserved, for Bridge Internal use only */ u32 heap_size;
@@ -366,7 +366,7 @@ struct dsp_notification {/* The dsp_processorattrin structure describes the attributes of a processor */ struct dsp_processorattrin {u32 cb_struct; -u32 utimeout; +u32 timeout; };/* * The dsp_processorinfo structure describes basic capabilities of a
@@ -420,13 +420,13 @@ struct dsp_resourceinfo {*/ struct dsp_streamattrin {u32 cb_struct; -u32 utimeout; +u32 timeout;u32 segment_id;u32 buf_alignment;u32 num_bufs;enum dsp_strmmode strm_mode;u32 udma_chnl_id; -u32 udma_priority; +u32 dma_priority; };/* The dsp_bufferattr structure describes the attributes of a data buffer */
drivers/staging/tidspbridge/include/dspbridge/drv.h +2 -2
@@ -118,7 +118,7 @@ struct dspheap_res_object {u32 dsp_addr;u32 dsp_res_addr;u32 heap_size; -void *hprocessor; +void *processor;struct dspheap_res_object *next; };
@@ -153,7 +153,7 @@ struct process_context {enum gpp_proc_res_state res_state;/* Handle to Processor */ -void *hprocessor; +void *processor;/* DSP Node resources */ struct idr *node_id;
drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h +24 -24
178 lines not on this page · raw message
drivers/staging/tidspbridge/include/dspbridge/dspdefs.h +1 -1
@@ -306,7 +306,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,* mgr_attrts->irq_shared: TRUE if the IRQ is shareable. * mgr_attrts->word_size: DSP Word size in equivalent PC bytes.. * mgr_attrts->shm_base: Base physical address of shared memory, if any. -* mgr_attrts->usm_length: Bytes of shared memory block. +* mgr_attrts->sm_length: Bytes of shared memory block. * Returns: * 0: Success; * -ENOMEM: Insufficient memory for requested resources.
drivers/staging/tidspbridge/include/dspbridge/iodefs.h +1 -1
@@ -30,7 +30,7 @@ struct io_attrs {bool irq_shared;/* TRUE if the IRQ is shareable. */ u32 word_size;/* DSP Word size. */ u32 shm_base;/* Physical base address of shared memory. */ - u32 usm_length; /* Size (in bytes) of shared memory. */ + u32 sm_length; /* Size (in bytes) of shared memory. */ };#endif /* IODEFS_ */
drivers/staging/tidspbridge/include/dspbridge/nodepriv.h +4 -4
@@ -43,7 +43,7 @@ struct node_strmdef {u32 buf_size;/* Size of buffers for SIO stream */ u32 num_bufs;/* max # of buffers in SIO stream at once */ u32 seg_id;/* Memory segment id to allocate buffers */ -u32 utimeout;/* Timeout for blocking SIO calls */ +u32 timeout;/* Timeout for blocking SIO calls */ u32 buf_alignment;/* Buffer alignment */ char *sz_device;/* Device name for stream */ };
@@ -55,10 +55,10 @@ struct node_taskargs {u32 stack_size;u32 sys_stack_size;u32 stack_seg; -u32 udsp_heap_res_addr;/* DSP virtual heap address */ -u32 udsp_heap_addr;/* DSP virtual heap address */ +u32 dsp_heap_res_addr;/* DSP virtual heap address */ +u32 dsp_heap_addr;/* DSP virtual heap address */ u32 heap_size;/* Heap size */ -u32 ugpp_heap_addr;/* GPP virtual heap address */ +u32 gpp_heap_addr;/* GPP virtual heap address */ u32 profile_id;/* Profile ID */ u32 num_inputs;u32 num_outputs;
drivers/staging/tidspbridge/pmgr/dev.c +2 -2
@@ -221,12 +221,12 @@ int dev_create_device(struct dev_object **device_obj,/* Assume last memory window is for CHNL */ io_mgr_attrs.shm_base = host_res->mem_base[1 ] + host_res->offset_for_monitor; - io_mgr_attrs.usm_length = + io_mgr_attrs.sm_length = host_res->mem_length[1 ] - host_res->offset_for_monitor; }else { io_mgr_attrs.shm_base =0 ; - io_mgr_attrs.usm_length =0 ; + io_mgr_attrs.sm_length =0 ;pr_err ("%s: No memory reserved for shared structures\n" , __func__); }
drivers/staging/tidspbridge/pmgr/dspapi.c +22 -22
174 lines not on this page · raw message
drivers/staging/tidspbridge/pmgr/io.c +1 -1
@@ -58,7 +58,7 @@ int io_create(struct io_mgr **io_man, struct dev_object *hdev_obj, *io_man =NULL ;/* A memory base of 0 implies no memory base: */ -if ((mgr_attrts->shm_base !=0 ) && (mgr_attrts->usm_length ==0 )) +if ((mgr_attrts->shm_base !=0 ) && (mgr_attrts->sm_length ==0 )) status = -EINVAL ;if (mgr_attrts->word_size ==0 )
drivers/staging/tidspbridge/rmgr/dbdcd.c +6 -6
@@ -1116,14 +1116,14 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size, dsp_resource_reqmts.program_mem_size =atoi (token); token =strsep (&psz_cur, seps); gen_obj->obj_data.node_obj.ndb_props. - dsp_resource_reqmts.uwc_execution_time =atoi (token); + dsp_resource_reqmts.wc_execution_time =atoi (token); token =strsep (&psz_cur, seps); gen_obj->obj_data.node_obj.ndb_props. - dsp_resource_reqmts.uwc_period =atoi (token); + dsp_resource_reqmts.wc_period =atoi (token); token =strsep (&psz_cur, seps); gen_obj->obj_data.node_obj.ndb_props. - dsp_resource_reqmts.uwc_deadline =atoi (token); + dsp_resource_reqmts.wc_deadline =atoi (token); token =strsep (&psz_cur, seps); gen_obj->obj_data.node_obj.ndb_props.
@@ -1166,8 +1166,8 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,atoi (token); token =strsep (&psz_cur, seps); -/* u32 utimeout */ - gen_obj->obj_data.node_obj.ndb_props.utimeout =atoi (token); +/* u32 timeout */ + gen_obj->obj_data.node_obj.ndb_props.timeout =atoi (token); token =strsep (&psz_cur, seps);/* char *pstr_create_phase_fxn */
@@ -1225,7 +1225,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,/* Load type (static, dynamic, or overlay) */ if (token) { - gen_obj->obj_data.node_obj.us_load_type =atoi (token); + gen_obj->obj_data.node_obj.load_type =atoi (token); token =strsep (&psz_cur, seps); }
drivers/staging/tidspbridge/rmgr/disp.c +4 -4
@@ -402,7 +402,7 @@ int disp_node_create(struct disp_object *disp_obj, more_task_args->sysstack_size = task_arg_obj.sys_stack_size; 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_addr = task_arg_obj.dsp_heap_addr; more_task_args->heap_size = task_arg_obj.heap_size; more_task_args->misc = task_arg_obj.dais_arg; more_task_args->num_input_streams =
@@ -410,8 +410,8 @@ int disp_node_create(struct disp_object *disp_obj, total +=sizeof (struct rms_more_task_args ) /sizeof (rms_word); -dev_dbg (bridge,"%s: udsp_heap_addr %x, heap_size %x\n" , - __func__, task_arg_obj.udsp_heap_addr, +dev_dbg (bridge,"%s: dsp_heap_addr %x, heap_size %x\n" , + __func__, task_arg_obj.dsp_heap_addr, task_arg_obj.heap_size);/* Keep track of pSIOInDef[] and pSIOOutDef[] * positions in the buffer, since this needs to be
@@ -611,7 +611,7 @@ static int fill_stream_def(rms_word *pdw_buf, u32 *ptotal, u32 offset, strm_def_obj->nbufs = strm_def.num_bufs; strm_def_obj->segid = strm_def.seg_id; strm_def_obj->align = strm_def.buf_alignment; - strm_def_obj->timeout = strm_def.utimeout; + strm_def_obj->timeout = strm_def.timeout; }if (!status) {
drivers/staging/tidspbridge/rmgr/drv.c +2 -2
@@ -148,7 +148,7 @@ int drv_remove_all_dmm_res_elements(void *process_ctxt)/* Free DMM mapped memory resources */ list_for_each_entry_safe (map_obj, temp_map, &ctxt->dmm_map_list, link) { - status =proc_un_map (ctxt->hprocessor, + status =proc_un_map (ctxt->processor, (void *)map_obj->dsp_addr, ctxt);if (status) pr_err("%s: proc_un_map failed!"
@@ -157,7 +157,7 @@ int drv_remove_all_dmm_res_elements(void *process_ctxt)/* Free DMM reserved memory resources */ list_for_each_entry_safe (rsv_obj, temp_rsv, &ctxt->dmm_rsv_list, link) { - status =proc_un_reserve_memory (ctxt->hprocessor, (void *) + status =proc_un_reserve_memory (ctxt->processor, (void *) rsv_obj->dsp_reserved_addr, ctxt);if (status)
drivers/staging/tidspbridge/rmgr/nldr.c +3 -3
@@ -339,7 +339,7 @@ int nldr_allocate(struct nldr_object *nldr_obj, void *priv_ref,* Determine if node is a dynamically loaded node from * ndb_props. */ -if (node_props->us_load_type ==NLDR_DYNAMICLOAD ) { +if (node_props->load_type ==NLDR_DYNAMICLOAD ) {/* Dynamic node */ nldr_node_obj->dynamic = true;/*
@@ -391,7 +391,7 @@ int nldr_allocate(struct nldr_object *nldr_obj, void *priv_ref,* base image */ nldr_node_obj->root.lib = nldr_obj->base_lib;/* Check for overlay node */ -if (node_props->us_load_type ==NLDR_OVLYLOAD ) +if (node_props->load_type ==NLDR_OVLYLOAD ) nldr_node_obj->overlay = true; }
@@ -1014,7 +1014,7 @@ static int add_ovly_node(struct dsp_uuid *uuid_obj, goto func_end;/* If overlay node, add to the list */ -if (obj_def.obj_data.node_obj.us_load_type ==NLDR_OVLYLOAD ) { +if (obj_def.obj_data.node_obj.load_type ==NLDR_OVLYLOAD ) {if (nldr_obj->ovly_table ==NULL ) { nldr_obj->ovly_nodes++; }else {
drivers/staging/tidspbridge/rmgr/node.c +69 -69
424 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/proc.c +8 -8
@@ -85,7 +85,7 @@ struct proc_object {struct mgr_object *mgr_obj;/* Manager Object Handle */ u32 attach_count;/* Processor attach count */ u32 processor_id;/* Processor number */ -u32 utimeout;/* Time out count */ +u32 timeout;/* Time out count */ enum dsp_procstate proc_state;/* Processor state */ u32 unit;/* DDSP unit number */ bool is_already_attached;/*
@@ -284,8 +284,8 @@ proc_attach(u32 processor_id,DBC_REQUIRE (refs >0 );DBC_REQUIRE (ph_processor !=NULL ); -if (pr_ctxt->hprocessor) { - *ph_processor = pr_ctxt->hprocessor; +if (pr_ctxt->processor) { + *ph_processor = pr_ctxt->processor;return status; }
@@ -324,9 +324,9 @@ proc_attach(u32 processor_id,INIT_LIST_HEAD (&p_proc_object->proc_list);if (attr_in) - p_proc_object->utimeout = attr_in->utimeout; + p_proc_object->timeout = attr_in->timeout;else - p_proc_object->utimeout =PROC_DFLT_TIMEOUT ; + p_proc_object->timeout =PROC_DFLT_TIMEOUT ; status =dev_get_intf_fxns (hdev_obj, &p_proc_object->intf_fxns);if (!status) {
@@ -373,7 +373,7 @@ proc_attach(u32 processor_id, }if (!status) { *ph_processor = (void *)p_proc_object; - pr_ctxt->hprocessor = *ph_processor; + pr_ctxt->processor = *ph_processor; (void )proc_notify_clients (p_proc_object,DSP_PROCESSORATTACH ); }
@@ -567,7 +567,7 @@ int proc_detach(struct process_context *pr_ctxt)DBC_REQUIRE (refs >0 ); - p_proc_object = (struct proc_object *)pr_ctxt->hprocessor; + p_proc_object = (struct proc_object *)pr_ctxt->processor;if (p_proc_object) {/* Notify the Client */
@@ -585,7 +585,7 @@ int proc_detach(struct process_context *pr_ctxt) (u32) p_proc_object);/* Free the Processor Object */ kfree (p_proc_object); - pr_ctxt->hprocessor =NULL ; + pr_ctxt->processor =NULL ; }else { status = -EFAULT ; }
drivers/staging/tidspbridge/rmgr/strm.c +11 -11
@@ -68,7 +68,7 @@ struct strm_object {struct strm_mgr *strm_mgr_obj;struct chnl_object *chnl_obj;u32 dir;/* DSP_TONODE or DSP_FROMNODE */ -u32 utimeout; +u32 timeout;u32 num_bufs;/* Max # of bufs allowed in stream */ u32 un_bufs_in_strm;/* Current # of bufs in stream */ u32 bytes;/* bytes transferred since idled */
@@ -77,7 +77,7 @@ struct strm_object {void *user_event;/* Saved for strm_get_info() */ enum dsp_strmmode strm_mode;/* STRMMODE_[PROCCOPY][ZEROCOPY]... */ u32 udma_chnl_id;/* DMA chnl id */ -u32 udma_priority;/* DMA priority:DMAPRI_[LOW][HIGH] */ +u32 dma_priority;/* DMA priority:DMAPRI_[LOW][HIGH] */ u32 segment_id;/* >0 is SM segment.=0 is local heap */ u32 buf_alignment;/* Alignment for stream bufs */ /* Stream's SM address translator */
@@ -378,7 +378,7 @@ int strm_idle(struct strm_object *stream_obj, bool flush_data) intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; status = (*intf_fxns->chnl_idle) (stream_obj->chnl_obj, - stream_obj->utimeout, + stream_obj->timeout, flush_data); }
@@ -494,8 +494,8 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index, strm_obj->strm_state =STREAM_IDLE ; strm_obj->user_event = pattr->user_event;if (pattr->stream_attr_in !=NULL ) { - strm_obj->utimeout = - pattr->stream_attr_in->utimeout; + strm_obj->timeout = + pattr->stream_attr_in->timeout; strm_obj->num_bufs = pattr->stream_attr_in->num_bufs; strm_obj->strm_mode =
@@ -506,23 +506,23 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index, pattr->stream_attr_in->buf_alignment; strm_obj->udma_chnl_id = pattr->stream_attr_in->udma_chnl_id; - strm_obj->udma_priority = - pattr->stream_attr_in->udma_priority; + strm_obj->dma_priority = + pattr->stream_attr_in->dma_priority; chnl_attr_obj.uio_reqs = pattr->stream_attr_in->num_bufs; }else { - strm_obj->utimeout =DEFAULTTIMEOUT ; + strm_obj->timeout =DEFAULTTIMEOUT ; strm_obj->num_bufs =DEFAULTNUMBUFS ; strm_obj->strm_mode =STRMMODE_PROCCOPY ; strm_obj->segment_id =0 ;/* local mem */ strm_obj->buf_alignment =0 ; strm_obj->udma_chnl_id =0 ; - strm_obj->udma_priority =0 ; + strm_obj->dma_priority =0 ; chnl_attr_obj.uio_reqs =DEFAULTNUMBUFS ; } chnl_attr_obj.reserved1 =NULL ;/* DMA chnl flush timeout */ - chnl_attr_obj.reserved2 = strm_obj->utimeout; + chnl_attr_obj.reserved2 = strm_obj->timeout; chnl_attr_obj.event_obj =NULL ;if (pattr->user_event !=NULL ) chnl_attr_obj.event_obj = pattr->user_event;
@@ -632,7 +632,7 @@ int strm_reclaim(struct strm_object *stream_obj, u8 ** buf_ptr, status = (*intf_fxns->chnl_get_ioc) (stream_obj->chnl_obj, - stream_obj->utimeout, + stream_obj->timeout, &chnl_ioc_obj);if (!status) { *nbytes = chnl_ioc_obj.byte_size;
Signature · 1 line
1.6.3.3
PATCH 10/12 staging:tidspbridge - set10 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: hnext next hnode node hprev prev hroot root hstream stream pbuf buf pcb_arg cb_arg pdspheap_list dspheap_list pmsg msg ps_name name pstr_create_phase_fxn str_create_phase_fxn pstr_delete_phase_fxn str_delete_phase_fxn pstr_dev_name str_dev_name pstr_event_name str_event_name pstr_execute_phase_fxn str_execute_phase_fxn pstr_i_alg_name str_i_alg_name udma_chnl_id dma_chnl_id un_bufs_in_strm bufs_in_strm usm_buf_size sm_buf_size
--- drivers/staging/tidspbridge/core/chnl_sm.c | 12 +- drivers/staging/tidspbridge/core/io_sm.c | 32 +++--- drivers/staging/tidspbridge/dynload/cload.c | 42 ++++---- .../staging/tidspbridge/dynload/dload_internal.h | 6 +- .../tidspbridge/include/dspbridge/_chnl_sm.h | 2 +- .../tidspbridge/include/dspbridge/chnldefs.h | 6 +- .../tidspbridge/include/dspbridge/dbdcddef.h | 8 +- .../staging/tidspbridge/include/dspbridge/dbdefs.h | 6 +- .../staging/tidspbridge/include/dspbridge/drv.h | 6 +- .../tidspbridge/include/dspbridge/dspapi-ioctl.h | 54 +++++----- .../tidspbridge/include/dspbridge/strmdefs.h | 2 +- drivers/staging/tidspbridge/pmgr/dspapi.c | 108 ++++++++++---------- drivers/staging/tidspbridge/rmgr/dbdcd.c | 32 +++--- drivers/staging/tidspbridge/rmgr/disp.c | 24 ++-- drivers/staging/tidspbridge/rmgr/drv.c | 12 +- drivers/staging/tidspbridge/rmgr/nldr.c | 8 +- drivers/staging/tidspbridge/rmgr/node.c | 58 +++++----- drivers/staging/tidspbridge/rmgr/strm.c | 24 ++-- 18 files changed, 221 insertions(+), 221 deletions(-)
drivers/staging/tidspbridge/core/chnl_sm.c +6 -6
@@ -604,7 +604,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,* translated to user's virtual addr later. */ host_sys_buf = chnl_packet_obj->host_sys_buf; - ioc.pbuf = chnl_packet_obj->host_user_buf; + ioc.buf = chnl_packet_obj->host_user_buf; ioc.byte_size = chnl_packet_obj->byte_size; ioc.buf_size = chnl_packet_obj->buf_size; ioc.arg = chnl_packet_obj->arg;
@@ -613,7 +613,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,list_add_tail (&chnl_packet_obj->link, &pchnl->free_packets_list); }else { - ioc.pbuf =NULL ; + ioc.buf =NULL ; ioc.byte_size =0 ; ioc.arg =0 ; ioc.buf_size =0 ;
@@ -640,11 +640,11 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout,spin_unlock_bh (&pchnl->chnl_mgr_obj->chnl_mgr_lock);if (dequeue_ioc && (pchnl->chnl_type ==CHNL_PCPY && pchnl->chnl_id >1 )) { -if (!(ioc.pbuf < (void *)USERMODE_ADDR )) +if (!(ioc.buf < (void *)USERMODE_ADDR )) goto func_cont;/* If the addr is in user mode, then copy it */ -if (!host_sys_buf || !ioc.pbuf) { +if (!host_sys_buf || !ioc.buf) { status = -EFAULT ; goto func_cont; }
@@ -652,7 +652,7 @@ int bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 timeout, goto func_cont1;/*host_user_buf */ - status =copy_to_user (ioc.pbuf, host_sys_buf, ioc.byte_size); + status =copy_to_user (ioc.buf, host_sys_buf, ioc.byte_size);if (status) {if (current->flags &PF_EXITING ) status =0 ;
@@ -806,7 +806,7 @@ int bridge_chnl_open(struct chnl_object **chnl, pchnl->sync_event = sync_event;/* Get the process handle */ pchnl->process = current->tgid; - pchnl->pcb_arg =0 ; + pchnl->cb_arg =0 ; pchnl->bytes_moved =0 ;/* Default to proc-copy */ pchnl->chnl_type =CHNL_PCPY ;
drivers/staging/tidspbridge/core/io_sm.c +16 -16
@@ -106,7 +106,7 @@ struct io_mgr {struct msg_ctrl *msg_output_ctrl;u8 *msg_input;/* Address of input messages */ u8 *msg_output;/* Address of output messages */ -u32 usm_buf_size;/* Size of a shared memory I/O channel */ +u32 sm_buf_size;/* Size of a shared memory I/O channel */ bool shared_irq;/* Is this IRQ shared? */ u32 word_size;/* Size in bytes of DSP word */ u16 intr_val;/* Interrupt value */
@@ -119,7 +119,7 @@ struct io_mgr {u32 trace_buffer_end;/* Trace message end address */ u32 trace_buffer_current;/* Trace message current address */ u32 gpp_read_pointer;/* GPP Read pointer to Trace buffer */ -u8 *pmsg; +u8 *msg;u32 gpp_va;u32 dsp_va;#endif
@@ -247,7 +247,7 @@ int bridge_io_destroy(struct io_mgr *hio_mgr)tasklet_kill (&hio_mgr->dpc_tasklet);#if defined(CONFIG_TIDSPBRIDGE_BACKTRACE ) || defined(CONFIG_TIDSPBRIDGE_DEBUG ) -kfree (hio_mgr->pmsg); +kfree (hio_mgr->msg);#endif dsp_wdt_exit ();/* Free this IO manager object */
@@ -705,7 +705,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) hio_mgr->input = (u8 *) hio_mgr->shared_mem +sizeof (struct shm ); hio_mgr->output = hio_mgr->input + (ul_shm_length -sizeof (struct shm )) /2 ; - hio_mgr->usm_buf_size = hio_mgr->output - hio_mgr->input; + hio_mgr->sm_buf_size = hio_mgr->output - hio_mgr->input;/* Set up Shared memory addresses for messaging. */ hio_mgr->msg_input_ctrl = (struct msg_ctrl *)((u8 *) hio_mgr->shared_mem
@@ -764,11 +764,11 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) (ul_gpp_va + ul_seg1_size + ul_pad_size) + (hio_mgr->trace_buffer_current - ul_dsp_va);/* Calculate the size of trace buffer */ -kfree (hio_mgr->pmsg); - hio_mgr->pmsg =kmalloc (((hio_mgr->trace_buffer_end - +kfree (hio_mgr->msg); + hio_mgr->msg =kmalloc (((hio_mgr->trace_buffer_end - hio_mgr->trace_buffer_begin) * hio_mgr->word_size) +2 ,GFP_KERNEL ); -if (!hio_mgr->pmsg) +if (!hio_mgr->msg) status = -ENOMEM ; hio_mgr->dsp_va = ul_dsp_va;
@@ -786,7 +786,7 @@ func_end:u32 io_buf_size (struct io_mgr *hio_mgr) {if (hio_mgr) -return hio_mgr->usm_buf_size; +return hio_mgr->sm_buf_size;else return 0 ; }
@@ -1361,7 +1361,7 @@ static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl, chnl_mgr_obj->output_mask &= ~(1 << chnl_id);/* Transfer buffer to DSP side */ - chnl_packet_obj->byte_size =min (pio_mgr->usm_buf_size, + chnl_packet_obj->byte_size =min (pio_mgr->sm_buf_size, chnl_packet_obj->byte_size);memcpy (pio_mgr->output, chnl_packet_obj->host_sys_buf, chnl_packet_obj->byte_size);
@@ -1708,30 +1708,30 @@ void print_dsp_debug_trace(struct io_mgr *hio_mgr) ul_new_message_length = ul_gpp_cur_pointer - hio_mgr->gpp_read_pointer; -memcpy (hio_mgr->pmsg, +memcpy (hio_mgr->msg, (char *)hio_mgr->gpp_read_pointer, ul_new_message_length); - hio_mgr->pmsg[ul_new_message_length] ='\0' ; + hio_mgr->msg[ul_new_message_length] ='\0' ;/* * Advance the GPP trace pointer to DSP current * pointer. */ hio_mgr->gpp_read_pointer += ul_new_message_length;/* Print the trace messages */ -pr_info ("DSPTrace: %s\n" , hio_mgr->pmsg); +pr_info ("DSPTrace: %s\n" , hio_mgr->msg); }else if (ul_gpp_cur_pointer < hio_mgr->gpp_read_pointer) {/* Handle trace buffer wraparound */ -memcpy (hio_mgr->pmsg, +memcpy (hio_mgr->msg, (char *)hio_mgr->gpp_read_pointer, hio_mgr->trace_buffer_end - hio_mgr->gpp_read_pointer); ul_new_message_length = ul_gpp_cur_pointer - hio_mgr->trace_buffer_begin; -memcpy (&hio_mgr->pmsg[hio_mgr->trace_buffer_end - +memcpy (&hio_mgr->msg[hio_mgr->trace_buffer_end - hio_mgr->gpp_read_pointer], (char *)hio_mgr->trace_buffer_begin, ul_new_message_length); - hio_mgr->pmsg[hio_mgr->trace_buffer_end - + hio_mgr->msg[hio_mgr->trace_buffer_end - hio_mgr->gpp_read_pointer + ul_new_message_length] ='\0' ;/*
@@ -1742,7 +1742,7 @@ void print_dsp_debug_trace(struct io_mgr *hio_mgr) hio_mgr->trace_buffer_begin + ul_new_message_length;/* Print the trace messages */ -pr_info ("DSPTrace: %s\n" , hio_mgr->pmsg); +pr_info ("DSPTrace: %s\n" , hio_mgr->msg); } } }
drivers/staging/tidspbridge/dynload/cload.c +21 -21
97 lines not on this page · raw message
drivers/staging/tidspbridge/dynload/dload_internal.h +3 -3
@@ -78,15 +78,15 @@ struct my_handle;struct dbg_mirror_root {/* must be same as dbg_mirror_list; __DLModules address on target */ u32 dbthis; -struct my_handle *hnext;/* must be same as dbg_mirror_list */ +struct my_handle *next;/* must be same as dbg_mirror_list */ u16 changes;/* change counter */ u16 refcount;/* number of modules referencing this root */ };struct dbg_mirror_list {u32 dbthis; -struct my_handle *hnext, *hprev; -struct dbg_mirror_root *hroot; +struct my_handle *next, *prev; +struct dbg_mirror_root *root;u16 dbsiz;u32 context;/* Save context for .dllview memory allocation */ };
drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h +1 -1
@@ -147,7 +147,7 @@ struct chnl_object {/* Abstract syncronization object */ struct sync_object *sync_event;u32 process;/* Process which created this channel */ -u32 pcb_arg;/* Argument to use with callback */ +u32 cb_arg;/* Argument to use with callback */ struct list_head pio_requests;/* List of IOR's to driver */ s32 cio_cs;/* Number of IOC's in queue */ s32 cio_reqs;/* Number of IORequests in queue */
drivers/staging/tidspbridge/include/dspbridge/chnldefs.h +3 -3
@@ -48,7 +48,7 @@struct chnl_attr {u32 uio_reqs;/* Max # of preallocated I/O requests. */ void *event_obj;/* User supplied auto-reset event object. */ -char *pstr_event_name;/* Ptr to name of user event object. */ +char *str_event_name;/* Ptr to name of user event object. */ void *reserved1;/* Reserved for future use. */ u32 reserved2;/* Reserved for future use. */
@@ -56,11 +56,11 @@ struct chnl_attr {/* I/O completion record: */ struct chnl_ioc { -void *pbuf;/* Buffer to be filled/emptied. */ +void *buf;/* Buffer to be filled/emptied. */ u32 byte_size;/* Bytes transferred. */ u32 buf_size;/* Actual buffer size in bytes */ u32 status;/* Status of IO completion. */ -u32 arg;/* User argument associated with pbuf. */ +u32 arg;/* User argument associated with buf. */ };#endif /* CHNLDEFS_ */
drivers/staging/tidspbridge/include/dspbridge/dbdcddef.h +4 -4
@@ -48,10 +48,10 @@ struct dcd_nodeprops {struct dsp_ndbprops ndb_props;u32 msg_segid;u32 msg_notify_type; -char *pstr_create_phase_fxn; -char *pstr_delete_phase_fxn; -char *pstr_execute_phase_fxn; -char *pstr_i_alg_name; +char *str_create_phase_fxn; +char *str_delete_phase_fxn; +char *str_execute_phase_fxn; +char *str_i_alg_name;/* Dynamic load properties */ u16 load_type;/* Static, dynamic, overlay */
drivers/staging/tidspbridge/include/dspbridge/dbdefs.h +3 -3
@@ -251,7 +251,7 @@ struct dsp_strmattr {u32 timeout;/* Timeout for blocking STRM calls */ enum dsp_strmmode strm_mode;/* mode of stream when opened */ /* DMA chnl id if dsp_strmmode is LDMA or RDMA */ -u32 udma_chnl_id; +u32 dma_chnl_id;u32 dma_priority;/* DMA channel priority 0=lowest, >0=high */ };
@@ -359,7 +359,7 @@ struct dsp_nodeattr {* window handle. */ struct dsp_notification { -char *ps_name; +char *name;void *handle; };
@@ -425,7 +425,7 @@ struct dsp_streamattrin {u32 buf_alignment;u32 num_bufs;enum dsp_strmmode strm_mode; -u32 udma_chnl_id; +u32 dma_chnl_id;u32 dma_priority; };
drivers/staging/tidspbridge/include/dspbridge/drv.h +3 -3
@@ -75,7 +75,7 @@/* New structure (member of process context) abstracts NODE resource info */ struct node_res_object { -void *hnode; +void *node;s32 node_allocated;/* Node status */ s32 heap_allocated;/* Heap status */ s32 streams_allocated;/* Streams status */
@@ -125,7 +125,7 @@ struct dspheap_res_object {/* New structure (member of process context) abstracts stream resource info */ struct strm_res_object {s32 stream_allocated;/* Stream status */ -void *hstream; +void *stream;u32 num_bufs;u32 dir;int id;
@@ -167,7 +167,7 @@ struct process_context {spinlock_t dmm_rsv_lock;/* DSP Heap resources */ -struct dspheap_res_object *pdspheap_list; +struct dspheap_res_object *dspheap_list;/* Stream resources */ struct idr *stream_id;
drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h +27 -27
169 lines not on this page · raw message
drivers/staging/tidspbridge/include/dspbridge/strmdefs.h +1 -1
@@ -27,7 +27,7 @@ struct strm_object;struct strm_attr {void *user_event; -char *pstr_event_name; +char *str_event_name;void *virt_base;/* Process virtual base address of * mapped SM */ u32 virt_size;/* Size of virtual space in bytes */
drivers/staging/tidspbridge/pmgr/dspapi.c +54 -54
367 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/dbdcd.c +16 -16
@@ -1170,36 +1170,36 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size, gen_obj->obj_data.node_obj.ndb_props.timeout =atoi (token); token =strsep (&psz_cur, seps); -/* char *pstr_create_phase_fxn */ +/* char *str_create_phase_fxn */ DBC_REQUIRE (token); token_len =strlen (token); - gen_obj->obj_data.node_obj.pstr_create_phase_fxn = + gen_obj->obj_data.node_obj.str_create_phase_fxn =kzalloc (token_len +1 ,GFP_KERNEL ); -strncpy (gen_obj->obj_data.node_obj.pstr_create_phase_fxn, +strncpy (gen_obj->obj_data.node_obj.str_create_phase_fxn, token, token_len); - gen_obj->obj_data.node_obj.pstr_create_phase_fxn[token_len] = + gen_obj->obj_data.node_obj.str_create_phase_fxn[token_len] ='\0' ; token =strsep (&psz_cur, seps); -/* char *pstr_execute_phase_fxn */ +/* char *str_execute_phase_fxn */ DBC_REQUIRE (token); token_len =strlen (token); - gen_obj->obj_data.node_obj.pstr_execute_phase_fxn = + gen_obj->obj_data.node_obj.str_execute_phase_fxn =kzalloc (token_len +1 ,GFP_KERNEL ); -strncpy (gen_obj->obj_data.node_obj.pstr_execute_phase_fxn, +strncpy (gen_obj->obj_data.node_obj.str_execute_phase_fxn, token, token_len); - gen_obj->obj_data.node_obj.pstr_execute_phase_fxn[token_len] = + gen_obj->obj_data.node_obj.str_execute_phase_fxn[token_len] ='\0' ; token =strsep (&psz_cur, seps); -/* char *pstr_delete_phase_fxn */ +/* char *str_delete_phase_fxn */ DBC_REQUIRE (token); token_len =strlen (token); - gen_obj->obj_data.node_obj.pstr_delete_phase_fxn = + gen_obj->obj_data.node_obj.str_delete_phase_fxn =kzalloc (token_len +1 ,GFP_KERNEL ); -strncpy (gen_obj->obj_data.node_obj.pstr_delete_phase_fxn, +strncpy (gen_obj->obj_data.node_obj.str_delete_phase_fxn, token, token_len); - gen_obj->obj_data.node_obj.pstr_delete_phase_fxn[token_len] = + gen_obj->obj_data.node_obj.str_delete_phase_fxn[token_len] ='\0' ; token =strsep (&psz_cur, seps);
@@ -1211,14 +1211,14 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size, gen_obj->obj_data.node_obj.msg_notify_type =atoi (token); token =strsep (&psz_cur, seps); -/* char *pstr_i_alg_name */ +/* char *str_i_alg_name */ if (token) { token_len =strlen (token); - gen_obj->obj_data.node_obj.pstr_i_alg_name = + gen_obj->obj_data.node_obj.str_i_alg_name =kzalloc (token_len +1 ,GFP_KERNEL ); -strncpy (gen_obj->obj_data.node_obj.pstr_i_alg_name, +strncpy (gen_obj->obj_data.node_obj.str_i_alg_name, token, token_len); - gen_obj->obj_data.node_obj.pstr_i_alg_name[token_len] = + gen_obj->obj_data.node_obj.str_i_alg_name[token_len] ='\0' ; token =strsep (&psz_cur, seps); }
drivers/staging/tidspbridge/rmgr/disp.c +12 -12
@@ -64,7 +64,7 @@ struct disp_object {struct chnl_mgr *chnl_mgr;/* Channel manager */ 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 */ +u8 *buf;/* Buffer for commands, replies */ u32 bufsize;/* buf size in bytes */ u32 bufsize_rms;/* buf size in RMS words */ u32 char_size;/* Size of DSP character */
@@ -158,8 +158,8 @@ int disp_create(struct disp_object **dispatch_obj,/* Allocate buffer for commands, replies */ 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 ) + disp_obj->buf =kzalloc (disp_obj->bufsize,GFP_KERNEL ); +if (disp_obj->buf ==NULL ) status = -ENOMEM ; } func_cont:
@@ -232,7 +232,7 @@ int disp_node_change_priority(struct disp_object *disp_obj,DBC_REQUIRE (hnode !=NULL );/* Send message to RMS to change priority */ - rms_cmd = (struct rms_command *)(disp_obj->pbuf); + rms_cmd = (struct rms_command *)(disp_obj->buf); rms_cmd->fxn = (rms_word) (rms_fxn); rms_cmd->arg1 = (rms_word ) node_env; rms_cmd->arg2 = prio;
@@ -347,7 +347,7 @@ int disp_node_create(struct disp_object *disp_obj,*/ if (!status) { total =0 ;/* Total number of words in buffer so far */ - pdw_buf = (rms_word *) disp_obj->pbuf; + pdw_buf = (rms_word *) disp_obj->buf; rms_cmd = (struct rms_command *)pdw_buf; rms_cmd->fxn = (rms_word) (rms_fxn); rms_cmd->arg1 = (rms_word) (ul_create_fxn);
@@ -493,7 +493,7 @@ int disp_node_delete(struct disp_object *disp_obj,/* * Fill in buffer to send to RMS */ - rms_cmd = (struct rms_command *)disp_obj->pbuf; + rms_cmd = (struct rms_command *)disp_obj->buf; rms_cmd->fxn = (rms_word) (rms_fxn); rms_cmd->arg1 = (rms_word ) node_env; rms_cmd->arg2 = (rms_word) (ul_delete_fxn);
@@ -534,7 +534,7 @@ int disp_node_run(struct disp_object *disp_obj,/* * Fill in buffer to send to RMS. */ - rms_cmd = (struct rms_command *)disp_obj->pbuf; + rms_cmd = (struct rms_command *)disp_obj->buf; rms_cmd->fxn = (rms_word) (rms_fxn); rms_cmd->arg1 = (rms_word ) node_env; rms_cmd->arg2 = (rms_word) (ul_execute_fxn);
@@ -582,7 +582,7 @@ static void delete_disp(struct disp_object *disp_obj) " RMS: 0x%x\n", __func__, status); } } -kfree (disp_obj->pbuf); +kfree (disp_obj->buf);kfree (disp_obj); }
@@ -664,7 +664,7 @@ static int send_message(struct disp_object *disp_obj, u32 timeout, *pdw_arg = (u32 )NULL ; intf_fxns = disp_obj->intf_fxns; chnl_obj = disp_obj->chnl_to_dsp; - pbuf = disp_obj->pbuf; + pbuf = disp_obj->buf;/* Send the command */ status = (*intf_fxns->chnl_add_io_req) (chnl_obj, pbuf, ul_bytes, 0,
@@ -703,8 +703,8 @@ static int send_message(struct disp_object *disp_obj, u32 timeout, status = -EPERM ; }else {if (CHNL_IS_IO_COMPLETE (chnl_ioc_obj)) { -DBC_ASSERT (chnl_ioc_obj.pbuf == pbuf); -if (*((int *)chnl_ioc_obj.pbuf) <0 ) { +DBC_ASSERT (chnl_ioc_obj.buf == pbuf); +if (*((int *)chnl_ioc_obj.buf) <0 ) {/* Translate DSP's to kernel error */ status = -EREMOTEIO ; dev_dbg(bridge, "%s: DSP-side failed:"
@@ -713,7 +713,7 @@ static int send_message(struct disp_object *disp_obj, u32 timeout, *(int *)pbuf, status); } *pdw_arg = - (((rms_word *) (chnl_ioc_obj.pbuf))[1 ]); + (((rms_word *) (chnl_ioc_obj.buf))[1 ]); }else { status = -EPERM ; }
drivers/staging/tidspbridge/rmgr/drv.c +6 -6
@@ -89,7 +89,7 @@ int drv_insert_node_res_element(void *hnode, void *node_resource, goto func_end; } - (*node_res_obj)->hnode = hnode; + (*node_res_obj)->node = hnode; retval =idr_get_new (ctxt->node_id, *node_res_obj, &(*node_res_obj)->id);if (retval == -EAGAIN ) {
@@ -123,13 +123,13 @@ static int drv_proc_free_node_res(int id, void *p, void *data)u32 node_state;if (node_res_obj->node_allocated) { - node_state =node_get_state (node_res_obj->hnode); + node_state =node_get_state (node_res_obj->node);if (node_state <=NODE_DELETING ) {if ((node_state ==NODE_RUNNING ) || (node_state ==NODE_PAUSED ) || (node_state ==NODE_TERMINATING ))node_terminate - (node_res_obj->hnode, &status); + (node_res_obj->node, &status);node_delete (node_res_obj, ctxt); }
@@ -216,7 +216,7 @@ int drv_proc_insert_strm_res_element(void *stream_obj, goto func_end; } - (*pstrm_res)->hstream = stream_obj; + (*pstrm_res)->stream = stream_obj; retval =idr_get_new (ctxt->stream_id, *pstrm_res, &(*pstrm_res)->id);if (retval == -EAGAIN ) {
@@ -263,9 +263,9 @@ static int drv_proc_free_strm_res(int id, void *p, void *process_ctxt) } strm_info.user_strm = &user; user.number_bufs_in_stream =0 ; -strm_get_info (strm_res->hstream, &strm_info,sizeof (strm_info)); +strm_get_info (strm_res->stream, &strm_info,sizeof (strm_info));while (user.number_bufs_in_stream--) -strm_reclaim (strm_res->hstream, &buf_ptr, &ul_bytes, +strm_reclaim (strm_res->stream, &buf_ptr, &ul_bytes, (u32 *) &ul_buf_size, &dw_arg);strm_close (strm_res, ctxt);return 0 ;
drivers/staging/tidspbridge/rmgr/nldr.c +4 -4
@@ -1038,13 +1038,13 @@ static int add_ovly_node(struct dsp_uuid *uuid_obj, } }/* These were allocated in dcd_get_object_def */ -kfree (obj_def.obj_data.node_obj.pstr_create_phase_fxn); +kfree (obj_def.obj_data.node_obj.str_create_phase_fxn); -kfree (obj_def.obj_data.node_obj.pstr_execute_phase_fxn); +kfree (obj_def.obj_data.node_obj.str_execute_phase_fxn); -kfree (obj_def.obj_data.node_obj.pstr_delete_phase_fxn); +kfree (obj_def.obj_data.node_obj.str_delete_phase_fxn); -kfree (obj_def.obj_data.node_obj.pstr_i_alg_name); +kfree (obj_def.obj_data.node_obj.str_i_alg_name); func_end:return status;
drivers/staging/tidspbridge/rmgr/node.c +29 -29
138 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/strm.c +12 -12
@@ -70,13 +70,13 @@ struct strm_object {u32 dir;/* DSP_TONODE or DSP_FROMNODE */ u32 timeout;u32 num_bufs;/* Max # of bufs allowed in stream */ -u32 un_bufs_in_strm;/* Current # of bufs in stream */ +u32 bufs_in_strm;/* Current # of bufs in stream */ u32 bytes;/* bytes transferred since idled */ /* STREAM_IDLE, STREAM_READY, ... */ enum dsp_streamstate strm_state;void *user_event;/* Saved for strm_get_info() */ enum dsp_strmmode strm_mode;/* STRMMODE_[PROCCOPY][ZEROCOPY]... */ -u32 udma_chnl_id;/* DMA chnl id */ +u32 dma_chnl_id;/* DMA chnl id */ u32 dma_priority;/* DMA priority:DMAPRI_[LOW][HIGH] */ u32 segment_id;/* >0 is SM segment.=0 is local heap */ u32 buf_alignment;/* Alignment for stream bufs */
@@ -102,7 +102,7 @@ int strm_allocate_buffer(struct strm_res_object *strmres, u32 usize,int status =0 ;u32 alloc_cnt =0 ;u32 i; -struct strm_object *stream_obj = strmres->hstream; +struct strm_object *stream_obj = strmres->stream;DBC_REQUIRE (refs >0 );DBC_REQUIRE (ap_buffer !=NULL );
@@ -154,7 +154,7 @@ int strm_close(struct strm_res_object *strmres,struct bridge_drv_interface *intf_fxns;struct chnl_info chnl_info_obj;int status =0 ; -struct strm_object *stream_obj = strmres->hstream; +struct strm_object *stream_obj = strmres->stream;DBC_REQUIRE (refs >0 );
@@ -268,7 +268,7 @@ int strm_free_buffer(struct strm_res_object *strmres, u8 ** ap_buffer, {int status =0 ;u32 i =0 ; -struct strm_object *stream_obj = strmres->hstream; +struct strm_object *stream_obj = strmres->stream;DBC_REQUIRE (refs >0 );DBC_REQUIRE (ap_buffer !=NULL );
@@ -504,8 +504,8 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index, pattr->stream_attr_in->segment_id; strm_obj->buf_alignment = pattr->stream_attr_in->buf_alignment; - strm_obj->udma_chnl_id = - pattr->stream_attr_in->udma_chnl_id; + strm_obj->dma_chnl_id = + pattr->stream_attr_in->dma_chnl_id; strm_obj->dma_priority = pattr->stream_attr_in->dma_priority; chnl_attr_obj.uio_reqs =
@@ -516,7 +516,7 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index, strm_obj->strm_mode =STRMMODE_PROCCOPY ; strm_obj->segment_id =0 ;/* local mem */ strm_obj->buf_alignment =0 ; - strm_obj->udma_chnl_id =0 ; + strm_obj->dma_chnl_id =0 ; strm_obj->dma_priority =0 ; chnl_attr_obj.uio_reqs =DEFAULTNUMBUFS ; }
@@ -655,14 +655,14 @@ int strm_reclaim(struct strm_object *stream_obj, u8 ** buf_ptr, && (!CHNL_IS_IO_CANCELLED(chnl_ioc_obj)) && (stream_obj->strm_mode == STRMMODE_ZEROCOPY)) {/* -* This is a zero-copy channel so chnl_ioc_obj.pbuf +* This is a zero-copy channel so chnl_ioc_obj.buf * contains the DSP address of SM. We need to * translate it to a virtual address for the user * thread to access. * Note: Could add CMM_DSPPA2VA to CMM in the future. */ tmp_buf =cmm_xlator_translate (stream_obj->xlator, - chnl_ioc_obj.pbuf, + chnl_ioc_obj.buf,CMM_DSPPA2PA );if (tmp_buf !=NULL ) {/* now convert this GPP Pa to Va */
@@ -674,9 +674,9 @@ int strm_reclaim(struct strm_object *stream_obj, u8 ** buf_ptr,if (tmp_buf ==NULL ) status = -ESRCH ; - chnl_ioc_obj.pbuf = tmp_buf; + chnl_ioc_obj.buf = tmp_buf; } - *buf_ptr = chnl_ioc_obj.pbuf; + *buf_ptr = chnl_ioc_obj.buf; } func_end:/* ensure we return a documented return code */
Signature · 1 line
1.6.3.3
PATCH 11/12 staging:tidspbridge - set11 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: hio_mgr io_mgr dw_api_reg_base api_reg_base dw_api_clk_base api_clk_base ap_channel channels pio_requests io_requests pio_completions io_completions pndb_props ndb_props pndb_props_size ndb_props_size pu_num_nodes num_nodes pu_num_procs num_procs psz_path_name sz_path_name pu_index index pargs args pu_allocated allocated psize size hnotification notification pp_rsv_addr rsv_addr prsv_addr rsv_addr pmpu_addr mpu_addr pp_map_addr map_addr ul_map_attr map_attr undb_props_size ndb_props_size
--- drivers/staging/tidspbridge/core/_msg_sm.h | 2 +- drivers/staging/tidspbridge/core/_tiomap.h | 4 +- drivers/staging/tidspbridge/core/chnl_sm.c | 66 ++++++++++---------- drivers/staging/tidspbridge/core/io_sm.c | 24 ++++---- drivers/staging/tidspbridge/core/msg_sm.c | 6 +- .../tidspbridge/include/dspbridge/_chnl_sm.h | 8 +- .../tidspbridge/include/dspbridge/dspapi-ioctl.h | 44 +++++++------- drivers/staging/tidspbridge/pmgr/dev.c | 12 ++-- drivers/staging/tidspbridge/pmgr/dspapi.c | 54 ++++++++-------- drivers/staging/tidspbridge/rmgr/node.c | 2 +- 10 files changed, 111 insertions(+), 111 deletions(-)
drivers/staging/tidspbridge/core/_msg_sm.h +1 -1
@@ -85,7 +85,7 @@ struct msg_mgr {/* Function interface to Bridge driver */ struct bridge_drv_interface *intf_fxns; -struct io_mgr *hio_mgr;/* IO manager */ +struct io_mgr *iomgr;/* IO manager */ struct list_head queue_list;/* List of MSG_QUEUEs */ spinlock_t msg_mgr_lock;/* For critical sections */ /* Signalled when MsgFrame is available */
drivers/staging/tidspbridge/core/_tiomap.h +2 -2
@@ -315,9 +315,9 @@ struct bridge_dev_context {* the host side. */ u32 dsp_ext_base_addr;/* See the comment above */ -u32 dw_api_reg_base;/* API mem map'd registers */ +u32 api_reg_base;/* API mem map'd registers */ void __iomem *dsp_mmu_base;/* DSP MMU Mapped registers */ -u32 dw_api_clk_base;/* CLK Registers */ +u32 api_clk_base;/* CLK Registers */ u32 dsp_clk_m2_base;/* DSP Clock Module m2 */ u32 public_rhea;/* Pub Rhea */ u32 int_addr;/* MB INTR reg */
drivers/staging/tidspbridge/core/chnl_sm.c +33 -33
229 lines not on this page · raw message
drivers/staging/tidspbridge/core/io_sm.c +12 -12
@@ -181,7 +181,7 @@ int bridge_io_create(struct io_mgr **io_man, *io_man =NULL ;dev_get_chnl_mgr (hdev_obj, &hchnl_mgr); -if (!hchnl_mgr || hchnl_mgr->hio_mgr) +if (!hchnl_mgr || hchnl_mgr->iomgr)return -EFAULT ;/*
@@ -228,7 +228,7 @@ int bridge_io_create(struct io_mgr **io_man, }/* Return IO manager object to caller... */ - hchnl_mgr->hio_mgr = pio_mgr; + hchnl_mgr->iomgr = pio_mgr; *io_man = pio_mgr;return 0 ;
@@ -1090,16 +1090,16 @@ static void input_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,DBC_ASSERT (chnl_id); goto func_end; } - pchnl = chnl_mgr_obj->ap_channel[chnl_id]; + pchnl = chnl_mgr_obj->channels[chnl_id];if ((pchnl !=NULL ) &&CHNL_IS_INPUT (pchnl->chnl_mode)) {if ((pchnl->state & ~CHNL_STATEEOS ) ==CHNL_STATEREADY ) {/* Get the I/O request, and attempt a transfer */ -if (!list_empty (&pchnl->pio_requests)) { +if (!list_empty (&pchnl->io_requests)) {if (!pchnl->cio_reqs) goto func_end; chnl_packet_obj =list_first_entry ( - &pchnl->pio_requests, + &pchnl->io_requests, struct chnl_irp, link);list_del (&chnl_packet_obj->link); pchnl->cio_reqs--;
@@ -1140,7 +1140,7 @@ static void input_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl, DSP_STREAMDONE); }/* Tell DSP if no more I/O buffers available */ -if (list_empty (&pchnl->pio_requests)) +if (list_empty (&pchnl->io_requests))set_chnl_free (sm, pchnl->chnl_id); clear_chnl = true; notify_client = true;
@@ -1292,9 +1292,9 @@ static void notify_chnl_complete(struct chnl_object *pchnl,* signalled by the only IO completion list consumer: * bridge_chnl_get_ioc(). */ - signal_event =list_empty (&pchnl->pio_completions); + signal_event =list_empty (&pchnl->io_completions);/* Enqueue the IO completion info for the client */ -list_add_tail (&chnl_packet_obj->link, &pchnl->pio_completions); +list_add_tail (&chnl_packet_obj->link, &pchnl->io_completions); pchnl->cio_cs++;if (pchnl->cio_cs > pchnl->chnl_packets)
@@ -1340,8 +1340,8 @@ static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl,if (chnl_id ==OUTPUTNOTREADY ) goto func_end; - pchnl = chnl_mgr_obj->ap_channel[chnl_id]; -if (!pchnl ||list_empty (&pchnl->pio_requests)) { + pchnl = chnl_mgr_obj->channels[chnl_id]; +if (!pchnl ||list_empty (&pchnl->io_requests)) {/* Shouldn't get here */ goto func_end; }
@@ -1350,14 +1350,14 @@ static void output_chnl(struct io_mgr *pio_mgr, struct chnl_object *pchnl, goto func_end;/* Get the I/O request, and attempt a transfer */ - chnl_packet_obj =list_first_entry (&pchnl->pio_requests, + chnl_packet_obj =list_first_entry (&pchnl->io_requests, struct chnl_irp, link);list_del (&chnl_packet_obj->link); pchnl->cio_reqs--;/* Record fact that no more I/O buffers available */ -if (list_empty (&pchnl->pio_requests)) +if (list_empty (&pchnl->io_requests)) chnl_mgr_obj->output_mask &= ~(1 << chnl_id);/* Transfer buffer to DSP side */
drivers/staging/tidspbridge/core/msg_sm.c +3 -3
@@ -69,7 +69,7 @@ int bridge_msg_create(struct msg_mgr **msg_man,return -ENOMEM ; msg_mgr_obj->on_exit = msg_callback; - msg_mgr_obj->hio_mgr = hio_mgr; + msg_mgr_obj->iomgr = hio_mgr;/* List of MSG_QUEUEs */ INIT_LIST_HEAD (&msg_mgr_obj->queue_list);/*
@@ -356,7 +356,7 @@ int bridge_msg_put(struct msg_queue *msg_queue_obj,/* Release critical section before scheduling DPC */ spin_unlock_bh (&hmsg_mgr->msg_mgr_lock);/* Schedule a DPC, to do the actual data transfer: */ -iosm_schedule (hmsg_mgr->hio_mgr); +iosm_schedule (hmsg_mgr->iomgr);return 0 ; }
@@ -410,7 +410,7 @@ int bridge_msg_put(struct msg_queue *msg_queue_obj,* Schedule a DPC, to do the actual * data transfer. */ -iosm_schedule (hmsg_mgr->hio_mgr); +iosm_schedule (hmsg_mgr->iomgr); msg_queue_obj->io_msg_pend--;/* Reset event if there are still frames available */
drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h +4 -4
@@ -114,7 +114,7 @@ struct shm {struct chnl_mgr {/* Function interface to Bridge driver */ struct bridge_drv_interface *intf_fxns; -struct io_mgr *hio_mgr;/* IO manager */ +struct io_mgr *iomgr;/* IO manager */ /* Device this board represents */ struct dev_object *dev_obj;
@@ -126,7 +126,7 @@ struct chnl_mgr {u32 word_size;/* Size in bytes of DSP word */ u8 max_channels;/* Total number of channels */ u8 open_channels;/* Total number of open channels */ -struct chnl_object **ap_channel;/* Array of channels */ +struct chnl_object **channels;/* Array of channels */ u8 type;/* Type of channel class library */ /* If no shm syms, return for CHNL_Open */ int chnl_open_status;
@@ -148,12 +148,12 @@ struct chnl_object {struct sync_object *sync_event;u32 process;/* Process which created this channel */ u32 cb_arg;/* Argument to use with callback */ -struct list_head pio_requests;/* List of IOR's to driver */ +struct list_head io_requests;/* List of IOR's to driver */ s32 cio_cs;/* Number of IOC's in queue */ s32 cio_reqs;/* Number of IORequests in queue */ s32 chnl_packets;/* Initial number of free Irps */ /* List of IOC's from driver */ -struct list_head pio_completions; +struct list_head io_completions;struct list_head free_packets_list;/* List of free Irps */ struct ntfy_object *ntfy_obj;u32 bytes_moved;/* Total number of bytes transfered */
drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h +22 -22
144 lines not on this page · raw message
drivers/staging/tidspbridge/pmgr/dev.c +6 -6
@@ -72,7 +72,7 @@ struct dev_object {struct chnl_mgr *chnl_mgr;/* Channel manager. */ struct deh_mgr *deh_mgr;/* DEH manager. */ struct msg_mgr *msg_mgr;/* Message manager. */ -struct io_mgr *hio_mgr;/* IO manager (CHNL, msg_ctrl) */ +struct io_mgr *iomgr;/* IO manager (CHNL, msg_ctrl) */ struct cmm_object *cmm_mgr;/* SM memory manager. */ struct dmm_object *dmm_mgr;/* Dynamic memory manager. */ struct ldr_module *module_obj;/* Bridge Module handle. */
@@ -241,7 +241,7 @@ int dev_create_device(struct dev_object **device_obj, (struct dev_object *)dev_obj, NULL);/* Only create IO manager if we have a channel manager */ if (!status && dev_obj->chnl_mgr) { - status =io_create (&dev_obj->hio_mgr, dev_obj, + status =io_create (&dev_obj->iomgr, dev_obj, &io_mgr_attrs); }/* Only create DEH manager if we have an IO manager */
@@ -357,9 +357,9 @@ int dev_destroy_device(struct dev_object *hdev_obj) }/* Free the io, channel, and message managers for this board: */ -if (dev_obj->hio_mgr) { -io_destroy (dev_obj->hio_mgr); - dev_obj->hio_mgr =NULL ; +if (dev_obj->iomgr) { +io_destroy (dev_obj->iomgr); + dev_obj->iomgr =NULL ; }if (dev_obj->chnl_mgr) {chnl_destroy (dev_obj->chnl_mgr);
@@ -611,7 +611,7 @@ int dev_get_io_mgr(struct dev_object *hdev_obj,DBC_REQUIRE (hdev_obj);if (hdev_obj) { - *io_man = hdev_obj->hio_mgr; + *io_man = hdev_obj->iomgr; }else { *io_man =NULL ; status = -EFAULT ;
drivers/staging/tidspbridge/pmgr/dspapi.c +27 -27
197 lines not on this page · raw message
drivers/staging/tidspbridge/rmgr/node.c +1 -1
@@ -208,7 +208,7 @@ struct node_object {struct node_createargs create_args;/* Args for node create func */ nodeenv node_env;/* Environment returned by RMS */ struct dcd_genericobj dcd_props;/* Node properties from DCD */ -struct dsp_cbdata *pargs;/* Optional args to pass to node */ +struct dsp_cbdata *args;/* Optional args to pass to node */ struct ntfy_object *ntfy_obj;/* Manages registered notifications */ char *str_dev_name;/* device name, if device node */ struct sync_object *sync_done;/* Synchronize node_terminate */
Signature · 1 line
1.6.3.3
PATCH 12/12 staging:tidspbridge - set12 remove hungarian from structs
hungarian notation will be removed from the elements inside structures, the next variables will be renamed:
Original: Replacement: dw_buf_size buf_size dw_bytes bytes pattr attr pdw_arg arg ph_cmm_mgr cmm_mgr ph_event event ph_node node ph_stream stream pmask mask pp_argv argv pp_buf_va buf_va pstatus status ul_flags flags ul_seg_id seg_id usize size
--- .../tidspbridge/include/dspbridge/dspapi-ioctl.h | 42 ++++++++++---------- drivers/staging/tidspbridge/pmgr/dspapi.c | 40 +++++++++--------- 2 files changed, 41 insertions(+), 41 deletions(-)
drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h +21 -21
@@ -160,7 +160,7 @@ union trapped_args {void *processor;void *mpu_addr;u32 size; -u32 ul_flags; +u32 flags; } args_proc_flushmemory;struct {
@@ -179,13 +179,13 @@ union trapped_args {struct dsp_uuid __user *node_id_ptr;struct dsp_cbdata __user *args;struct dsp_nodeattrin __user *attr_in; -void *__user *ph_node; +void *__user *node; } args_node_allocate;struct {void *node; -u32 usize; -struct dsp_bufferattr __user *pattr; +u32 size; +struct dsp_bufferattr __user *attr;u8 *__user *buffer; } args_node_allocmsgbuf;
@@ -199,7 +199,7 @@ union trapped_args {u32 stream_id;void *other_node;u32 other_stream; -struct dsp_strmattr __user *pattrs; +struct dsp_strmattr __user *attrs;struct dsp_cbdata __user *conn_param; } args_node_connect;
@@ -213,13 +213,13 @@ union trapped_args {struct {void *node; -struct dsp_bufferattr __user *pattr; +struct dsp_bufferattr __user *attr;u8 *buffer; } args_node_freemsgbuf;struct {void *node; -struct dsp_nodeattr __user *pattr; +struct dsp_nodeattr __user *attr;u32 attr_size; } args_node_getattr;
@@ -252,7 +252,7 @@ union trapped_args {struct {void *node; -int __user *pstatus; +int __user *status; } args_node_terminate;struct {
@@ -265,7 +265,7 @@ union trapped_args {struct {void *stream; -u32 usize; +u32 size;u8 *__user *ap_buffer;u32 num_bufs; } args_strm_allocatebuffer;
@@ -282,7 +282,7 @@ union trapped_args {struct {void *stream; -void **ph_event; +void **event; } args_strm_geteventhandle;struct {
@@ -299,8 +299,8 @@ union trapped_args {struct {void *stream;u8 *buffer; -u32 dw_bytes; -u32 dw_buf_size; +u32 bytes; +u32 buf_size;u32 arg; } args_strm_issue;
@@ -309,7 +309,7 @@ union trapped_args {u32 direction;u32 index;struct strm_attr __user *attr_in; -void *__user *ph_stream; +void *__user *stream; } args_strm_open;struct {
@@ -317,7 +317,7 @@ union trapped_args {u8 *__user *buf_ptr;u32 __user *bytes;u32 __user *buf_size_ptr; -u32 __user *pdw_arg; +u32 __user *arg; } args_strm_reclaim;struct {
@@ -330,27 +330,27 @@ union trapped_args {struct {void *__user *stream_tab;u32 strm_num; -u32 __user *pmask; +u32 __user *mask;u32 timeout; } args_strm_select;/* CMM Module */ struct {struct cmm_object *cmm_mgr; -u32 usize; -struct cmm_attrs *pattrs; -void **pp_buf_va; +u32 size; +struct cmm_attrs *attrs; +void **buf_va; } args_cmm_allocbuf;struct {struct cmm_object *cmm_mgr;void *buf_pa; -u32 ul_seg_id; +u32 seg_id; } args_cmm_freebuf;struct {void *processor; -struct cmm_object *__user *ph_cmm_mgr; +struct cmm_object *__user *cmm_mgr; } args_cmm_gethandle;struct {
@@ -361,7 +361,7 @@ union trapped_args {/* UTIL module */ struct {s32 util_argc; -char **pp_argv; +char **argv; } args_util_testdll; };
drivers/staging/tidspbridge/pmgr/dspapi.c +20 -20
@@ -721,14 +721,14 @@ u32 procwrap_flush_memory(union trapped_args *args, void *pr_ctxt) {int status; -if (args->args_proc_flushmemory.ul_flags > +if (args->args_proc_flushmemory.flags >PROC_WRITEBACK_INVALIDATE_MEM )return -EINVAL ; status =proc_flush_memory (pr_ctxt, args->args_proc_flushmemory.mpu_addr, args->args_proc_flushmemory.size, - args->args_proc_flushmemory.ul_flags); + args->args_proc_flushmemory.flags);return status; }
@@ -1129,7 +1129,7 @@ u32 nodewrap_allocate(union trapped_args *args, void *pr_ctxt) }if (!status) { nodeid = node_res->id +1 ; -CP_TO_USR (args->args_node_allocate.ph_node, &nodeid, +CP_TO_USR (args->args_node_allocate.node, &nodeid, status,1 );if (status) { status = -EFAULT ;
@@ -1159,11 +1159,11 @@ u32 nodewrap_alloc_msg_buf(union trapped_args *args, void *pr_ctxt)if (!node_res)return -EFAULT ; -if (!args->args_node_allocmsgbuf.usize) +if (!args->args_node_allocmsgbuf.size)return -EINVAL ; -if (args->args_node_allocmsgbuf.pattr) {/* Optional argument */ -CP_FM_USR (&attr, args->args_node_allocmsgbuf.pattr, status,1 ); +if (args->args_node_allocmsgbuf.attr) {/* Optional argument */ +CP_FM_USR (&attr, args->args_node_allocmsgbuf.attr, status,1 );if (!status) pattr = &attr;
@@ -1172,7 +1172,7 @@ u32 nodewrap_alloc_msg_buf(union trapped_args *args, void *pr_ctxt)CP_FM_USR (&pbuffer, args->args_node_allocmsgbuf.buffer, status,1 );if (!status) { status =node_alloc_msg_buf (node_res->node, - args->args_node_allocmsgbuf.usize, + args->args_node_allocmsgbuf.size, pattr, &pbuffer); }CP_TO_USR (args->args_node_allocmsgbuf.buffer, &pbuffer, status,1 );
@@ -1253,8 +1253,8 @@ u32 nodewrap_connect(union trapped_args *args, void *pr_ctxt)if (status) goto func_cont; } -if (args->args_node_connect.pattrs) {/* Optional argument */ -CP_FM_USR (&attrs, args->args_node_connect.pattrs, status,1 ); +if (args->args_node_connect.attrs) {/* Optional argument */ +CP_FM_USR (&attrs, args->args_node_connect.attrs, status,1 );if (!status) pattrs = &attrs;
@@ -1323,8 +1323,8 @@ u32 nodewrap_free_msg_buf(union trapped_args *args, void *pr_ctxt)if (!node_res)return -EFAULT ; -if (args->args_node_freemsgbuf.pattr) {/* Optional argument */ -CP_FM_USR (&attr, args->args_node_freemsgbuf.pattr, status,1 ); +if (args->args_node_freemsgbuf.attr) {/* Optional argument */ +CP_FM_USR (&attr, args->args_node_freemsgbuf.attr, status,1 );if (!status) pattr = &attr;
@@ -1358,7 +1358,7 @@ u32 nodewrap_get_attr(union trapped_args *args, void *pr_ctxt) status =node_get_attr (node_res->node, &attr, args->args_node_getattr.attr_size); -CP_TO_USR (args->args_node_getattr.pattr, &attr, status,1 ); +CP_TO_USR (args->args_node_getattr.attr, &attr, status,1 );return status; }
@@ -1495,7 +1495,7 @@ u32 nodewrap_terminate(union trapped_args *args, void *pr_ctxt) status =node_terminate (node_res->node, &tempstatus); -CP_TO_USR (args->args_node_terminate.pstatus, &tempstatus, status,1 ); +CP_TO_USR (args->args_node_terminate.status, &tempstatus, status,1 );return status; }
@@ -1564,7 +1564,7 @@ u32 strmwrap_allocate_buffer(union trapped_args *args, void *pr_ctxt)return -ENOMEM ; status =strm_allocate_buffer (strm_res, - args->args_strm_allocatebuffer.usize, + args->args_strm_allocatebuffer.size, ap_buffer, num_bufs, pr_ctxt);if (!status) { CP_TO_USR(args->args_strm_allocatebuffer.ap_buffer, ap_buffer,
@@ -1715,8 +1715,8 @@ u32 strmwrap_issue(union trapped_args *args, void *pr_ctxt)in chnl_sm.c */ status =strm_issue (strm_res->stream, args->args_strm_issue.buffer, - args->args_strm_issue.dw_bytes, - args->args_strm_issue.dw_buf_size, + args->args_strm_issue.bytes, + args->args_strm_issue.buf_size, args->args_strm_issue.arg);return status;
@@ -1756,7 +1756,7 @@ u32 strmwrap_open(union trapped_args *args, void *pr_ctxt) pr_ctxt);if (!status) { strmid = strm_res_obj->id +1 ; -CP_TO_USR (args->args_strm_open.ph_stream, &strmid, status,1 ); +CP_TO_USR (args->args_strm_open.stream, &strmid, status,1 ); }return status; }
@@ -1782,7 +1782,7 @@ u32 strmwrap_reclaim(union trapped_args *args, void *pr_ctxt) &ul_bytes, &ul_buf_size, &dw_arg);CP_TO_USR (args->args_strm_reclaim.buf_ptr, &buf_ptr, status,1 );CP_TO_USR (args->args_strm_reclaim.bytes, &ul_bytes, status,1 ); -CP_TO_USR (args->args_strm_reclaim.pdw_arg, &dw_arg, status,1 ); +CP_TO_USR (args->args_strm_reclaim.arg, &dw_arg, status,1 );if (args->args_strm_reclaim.buf_size_ptr !=NULL ) { CP_TO_USR(args->args_strm_reclaim.buf_size_ptr, &ul_buf_size,
@@ -1855,7 +1855,7 @@ u32 strmwrap_select(union trapped_args *args, void *pr_ctxt) status =strm_select (strm_tab, args->args_strm_select.strm_num, &mask, args->args_strm_select.timeout); } -CP_TO_USR (args->args_strm_select.pmask, &mask, status,1 ); +CP_TO_USR (args->args_strm_select.mask, &mask, status,1 );return status; }
@@ -1892,7 +1892,7 @@ u32 cmmwrap_get_handle(union trapped_args *args, void *pr_ctxt) status =cmm_get_handle (hprocessor, &hcmm_mgr); -CP_TO_USR (args->args_cmm_gethandle.ph_cmm_mgr, &hcmm_mgr, status,1 ); +CP_TO_USR (args->args_cmm_gethandle.cmm_mgr, &hcmm_mgr, status,1 );return status; }
Signature · 1 line
1.6.3.3
Re: [PATCH 05/12] staging:tidspbridge - set5 remove hungarian from structs
In reply to Rene Sapiensdrivers/staging/tidspbridge/rmgr/node.c int node_delete(struct node_res_object *noderes, · line 1493
Quoted 3 lines · Rene Sapiens
drivers/staging/tidspbridge/rmgr/node.c +1
-1-pfn_unload (pnode->nldr_node_obj, +load (pnode->nldr_node_obj,NLDR_EXECUTE );
Unload got swapped with load here.
This might have been easier to with Coccinelle instead of by hand...
regards,
dan carpenter
Re: [PATCH 05/12] staging:tidspbridge - set5 remove hungarian from structs
Hi Dan,
Quoted 9 lines · Dan Carpenter
Quoted 3 lines · Rene Sapiens
- pfn_unload(pnode->nldr_node_obj,
+load(pnode->nldr_node_obj, NLDR_EXECUTE);Unload got swapped with load here.
This might have been easier to with Coccinelle instead of by hand...
I'm sorry for the delay, i did use some scripts to identify/replace the words, this last one should be because of my lasts coding style fixes after changes, i will fix it and send the patch again. Indeed Coccinelle is a very good option too.
Signature · 6 lines
Regards, Rene Sapiens -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 05/12] staging:tidspbridge - set5 remove hungarian from structs
In reply to Dan CarpenterHi Dan,
Quoted 9 lines · Dan Carpenter
Quoted 3 lines · Rene Sapiens
- pfn_unload(pnode->nldr_node_obj,
+load(pnode->nldr_node_obj, NLDR_EXECUTE);Unload got swapped with load here.
This might have been easier to with Coccinelle instead of by hand...
I'm sorry for the delay, i did use some scripts to identify/replace the words, this last one should be because of my lasts coding style fixes after changes, i will fix it and send the patch again. Indeed Coccinelle is a very good option too.
Signature · 2 lines
Regards, Rene Sapiens