Commit e17ba7f2 authored by Rene Sapiens's avatar Rene Sapiens Committed by Omar Ramirez Luna

staging: tidspbridge: set4 remove hungarian from structs

hungarian notation will be removed from the elements inside
structures, the next varibles 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_notify
pfn_create		 create
pfn_delete		 delete
pfn_dev_cntrl		 dev_cntrl
Signed-off-by: default avatarRene Sapiens <rene.sapiens@ti.com>
Signed-off-by: default avatarArmando Uribe <x0095078@ti.com>
Signed-off-by: default avatarOmar Ramirez Luna <omar.ramirez@ti.com>
parent 3c882de5
...@@ -683,7 +683,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr) ...@@ -683,7 +683,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
*/ */
status = status =
hio_mgr->intf_fxns->pfn_dev_cntrl(hio_mgr->hbridge_context, hio_mgr->intf_fxns->dev_cntrl(hio_mgr->hbridge_context,
BRDIOCTL_SETMMUCONFIG, BRDIOCTL_SETMMUCONFIG,
ae_proc); ae_proc);
if (status) if (status)
...@@ -829,7 +829,7 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr) ...@@ -829,7 +829,7 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr)
if (parg[0] == MBX_PM_HIBERNATE_EN) { if (parg[0] == MBX_PM_HIBERNATE_EN) {
dev_dbg(bridge, "PM: Hibernate command\n"); dev_dbg(bridge, "PM: Hibernate command\n");
status = pio_mgr->intf_fxns-> status = pio_mgr->intf_fxns->
pfn_dev_cntrl(pio_mgr->hbridge_context, dev_cntrl(pio_mgr->hbridge_context,
BRDIOCTL_PWR_HIBERNATE, parg); BRDIOCTL_PWR_HIBERNATE, parg);
if (status) if (status)
pr_err("%s: hibernate cmd failed 0x%x\n", pr_err("%s: hibernate cmd failed 0x%x\n",
...@@ -838,7 +838,7 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr) ...@@ -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; parg[1] = pio_mgr->shared_mem->opp_request.rqst_opp_pt;
dev_dbg(bridge, "PM: Requested OPP = 0x%x\n", parg[1]); dev_dbg(bridge, "PM: Requested OPP = 0x%x\n", parg[1]);
status = pio_mgr->intf_fxns-> status = pio_mgr->intf_fxns->
pfn_dev_cntrl(pio_mgr->hbridge_context, dev_cntrl(pio_mgr->hbridge_context,
BRDIOCTL_CONSTRAINT_REQUEST, parg); BRDIOCTL_CONSTRAINT_REQUEST, parg);
if (status) if (status)
dev_dbg(bridge, "PM: Failed to set constraint " dev_dbg(bridge, "PM: Failed to set constraint "
...@@ -847,7 +847,7 @@ static void io_dispatch_pm(struct io_mgr *pio_mgr) ...@@ -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", dev_dbg(bridge, "PM: clk control value of msg = 0x%x\n",
parg[0]); parg[0]);
status = pio_mgr->intf_fxns-> status = pio_mgr->intf_fxns->
pfn_dev_cntrl(pio_mgr->hbridge_context, dev_cntrl(pio_mgr->hbridge_context,
BRDIOCTL_CLK_CTRL, parg); BRDIOCTL_CLK_CTRL, parg);
if (status) if (status)
dev_dbg(bridge, "PM: Failed to ctrl the DSP clk" dev_dbg(bridge, "PM: Failed to ctrl the DSP clk"
......
...@@ -977,32 +977,32 @@ struct bridge_drv_interface { ...@@ -977,32 +977,32 @@ struct bridge_drv_interface {
u32 brd_api_minor_version; /* Set to BRD_API_MINOR_VERSION. */ u32 brd_api_minor_version; /* Set to BRD_API_MINOR_VERSION. */
fxn_dev_create pfn_dev_create; /* Create device context */ fxn_dev_create pfn_dev_create; /* Create device context */
fxn_dev_destroy pfn_dev_destroy; /* Destroy 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_monitor brd_monitor; /* Load and/or start monitor */
fxn_brd_start pfn_brd_start; /* Start DSP program. */ fxn_brd_start brd_start; /* Start DSP program. */
fxn_brd_stop pfn_brd_stop; /* Stop/reset board. */ fxn_brd_stop brd_stop; /* Stop/reset board. */
fxn_brd_status pfn_brd_status; /* Get current board status. */ fxn_brd_status brd_status; /* Get current board status. */
fxn_brd_read brd_read; /* Read board memory */ fxn_brd_read brd_read; /* Read board memory */
fxn_brd_write pfn_brd_write; /* Write board memory. */ fxn_brd_write brd_write; /* Write board memory. */
fxn_brd_setstate pfn_brd_set_state; /* Sets the Board State */ fxn_brd_setstate brd_set_state; /* Sets the Board State */
fxn_brd_memcopy brd_mem_copy; /* Copies DSP Memory */ fxn_brd_memcopy brd_mem_copy; /* Copies DSP Memory */
fxn_brd_memwrite brd_mem_write; /* Write DSP Memory w/o halt */ 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_memmap brd_mem_map; /* Maps MPU mem to DSP mem */
fxn_brd_memunmap brd_mem_un_map; /* Unmaps 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_create chnl_create; /* Create channel manager. */
fxn_chnl_destroy pfn_chnl_destroy; /* Destroy channel manager. */ fxn_chnl_destroy chnl_destroy; /* Destroy channel manager. */
fxn_chnl_open pfn_chnl_open; /* Create a new channel. */ fxn_chnl_open chnl_open; /* Create a new channel. */
fxn_chnl_close pfn_chnl_close; /* Close a channel. */ fxn_chnl_close chnl_close; /* Close a channel. */
fxn_chnl_addioreq pfn_chnl_add_io_req; /* Req I/O on a channel. */ fxn_chnl_addioreq chnl_add_io_req; /* Req I/O on a channel. */
fxn_chnl_getioc pfn_chnl_get_ioc; /* Wait for I/O completion. */ fxn_chnl_getioc chnl_get_ioc; /* Wait for I/O completion. */
fxn_chnl_cancelio pfn_chnl_cancel_io; /* Cancl I/O on a channel. */ fxn_chnl_cancelio chnl_cancel_io; /* Cancl I/O on a channel. */
fxn_chnl_flushio pfn_chnl_flush_io; /* Flush I/O. */ fxn_chnl_flushio chnl_flush_io; /* Flush I/O. */
fxn_chnl_getinfo pfn_chnl_get_info; /* Get channel specific info */ fxn_chnl_getinfo chnl_get_info; /* Get channel specific info */
/* Get channel manager info. */ /* Get channel manager info. */
fxn_chnl_getmgrinfo pfn_chnl_get_mgr_info; fxn_chnl_getmgrinfo chnl_get_mgr_info;
fxn_chnl_idle pfn_chnl_idle; /* Idle the channel */ fxn_chnl_idle chnl_idle; /* Idle the channel */
/* Register for notif. */ /* 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_create pfn_io_create; /* Create IO manager */
fxn_io_destroy pfn_io_destroy; /* Destroy IO manager */ fxn_io_destroy pfn_io_destroy; /* Destroy IO manager */
fxn_io_onloaded pfn_io_on_loaded; /* Notify of program loaded */ fxn_io_onloaded pfn_io_on_loaded; /* Notify of program loaded */
......
...@@ -281,8 +281,8 @@ typedef int(*nldr_unloadfxn) (struct nldr_nodeobject *nldr_node_obj, ...@@ -281,8 +281,8 @@ typedef int(*nldr_unloadfxn) (struct nldr_nodeobject *nldr_node_obj,
*/ */
struct node_ldr_fxns { struct node_ldr_fxns {
nldr_allocatefxn allocate; nldr_allocatefxn allocate;
nldr_createfxn pfn_create; nldr_createfxn create;
nldr_deletefxn pfn_delete; nldr_deletefxn delete;
nldr_exitfxn pfn_exit; nldr_exitfxn pfn_exit;
nldr_getfxnaddrfxn pfn_get_fxn_addr; nldr_getfxnaddrfxn pfn_get_fxn_addr;
nldr_initfxn pfn_init; nldr_initfxn pfn_init;
......
...@@ -87,7 +87,7 @@ int chnl_create(struct chnl_mgr **channel_mgr, ...@@ -87,7 +87,7 @@ int chnl_create(struct chnl_mgr **channel_mgr,
struct bridge_drv_interface *intf_fxns; struct bridge_drv_interface *intf_fxns;
dev_get_intf_fxns(hdev_obj, &intf_fxns); dev_get_intf_fxns(hdev_obj, &intf_fxns);
/* Let Bridge channel module finish the create: */ /* 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); mgr_attrts);
if (!status) { if (!status) {
/* Fill in DSP API channel module's fields of the /* Fill in DSP API channel module's fields of the
...@@ -120,7 +120,7 @@ int chnl_destroy(struct chnl_mgr *hchnl_mgr) ...@@ -120,7 +120,7 @@ int chnl_destroy(struct chnl_mgr *hchnl_mgr)
if (chnl_mgr_obj) { if (chnl_mgr_obj) {
intf_fxns = chnl_mgr_obj->intf_fxns; intf_fxns = chnl_mgr_obj->intf_fxns;
/* Let Bridge channel module destroy the chnl_mgr: */ /* Let Bridge channel module destroy the chnl_mgr: */
status = (*intf_fxns->pfn_chnl_destroy) (hchnl_mgr); status = (*intf_fxns->chnl_destroy) (hchnl_mgr);
} else { } else {
status = -EFAULT; status = -EFAULT;
} }
......
...@@ -111,7 +111,7 @@ u32 dev_brd_write_fxn(void *arb, u32 dsp_add, void *host_buf, ...@@ -111,7 +111,7 @@ u32 dev_brd_write_fxn(void *arb, u32 dsp_add, void *host_buf,
if (dev_obj) { if (dev_obj) {
/* Require of BrdWrite() */ /* Require of BrdWrite() */
DBC_ASSERT(dev_obj->hbridge_context != NULL); DBC_ASSERT(dev_obj->hbridge_context != NULL);
status = (*dev_obj->bridge_interface.pfn_brd_write) ( status = (*dev_obj->bridge_interface.brd_write) (
dev_obj->hbridge_context, host_buf, dev_obj->hbridge_context, host_buf,
dsp_add, ul_num_bytes, mem_space); dsp_add, ul_num_bytes, mem_space);
/* Special case of getting the address only */ /* Special case of getting the address only */
...@@ -1081,30 +1081,30 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns, ...@@ -1081,30 +1081,30 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
if (bridge_version > 0) { if (bridge_version > 0) {
STORE_FXN(fxn_dev_create, pfn_dev_create); STORE_FXN(fxn_dev_create, pfn_dev_create);
STORE_FXN(fxn_dev_destroy, pfn_dev_destroy); STORE_FXN(fxn_dev_destroy, pfn_dev_destroy);
STORE_FXN(fxn_dev_ctrl, pfn_dev_cntrl); STORE_FXN(fxn_dev_ctrl, dev_cntrl);
STORE_FXN(fxn_brd_monitor, brd_monitor); STORE_FXN(fxn_brd_monitor, brd_monitor);
STORE_FXN(fxn_brd_start, pfn_brd_start); STORE_FXN(fxn_brd_start, brd_start);
STORE_FXN(fxn_brd_stop, pfn_brd_stop); STORE_FXN(fxn_brd_stop, brd_stop);
STORE_FXN(fxn_brd_status, pfn_brd_status); STORE_FXN(fxn_brd_status, brd_status);
STORE_FXN(fxn_brd_read, brd_read); STORE_FXN(fxn_brd_read, brd_read);
STORE_FXN(fxn_brd_write, pfn_brd_write); STORE_FXN(fxn_brd_write, brd_write);
STORE_FXN(fxn_brd_setstate, pfn_brd_set_state); STORE_FXN(fxn_brd_setstate, brd_set_state);
STORE_FXN(fxn_brd_memcopy, brd_mem_copy); STORE_FXN(fxn_brd_memcopy, brd_mem_copy);
STORE_FXN(fxn_brd_memwrite, brd_mem_write); STORE_FXN(fxn_brd_memwrite, brd_mem_write);
STORE_FXN(fxn_brd_memmap, brd_mem_map); STORE_FXN(fxn_brd_memmap, brd_mem_map);
STORE_FXN(fxn_brd_memunmap, brd_mem_un_map); STORE_FXN(fxn_brd_memunmap, brd_mem_un_map);
STORE_FXN(fxn_chnl_create, pfn_chnl_create); STORE_FXN(fxn_chnl_create, chnl_create);
STORE_FXN(fxn_chnl_destroy, pfn_chnl_destroy); STORE_FXN(fxn_chnl_destroy, chnl_destroy);
STORE_FXN(fxn_chnl_open, pfn_chnl_open); STORE_FXN(fxn_chnl_open, chnl_open);
STORE_FXN(fxn_chnl_close, pfn_chnl_close); STORE_FXN(fxn_chnl_close, chnl_close);
STORE_FXN(fxn_chnl_addioreq, pfn_chnl_add_io_req); STORE_FXN(fxn_chnl_addioreq, chnl_add_io_req);
STORE_FXN(fxn_chnl_getioc, pfn_chnl_get_ioc); STORE_FXN(fxn_chnl_getioc, chnl_get_ioc);
STORE_FXN(fxn_chnl_cancelio, pfn_chnl_cancel_io); STORE_FXN(fxn_chnl_cancelio, chnl_cancel_io);
STORE_FXN(fxn_chnl_flushio, pfn_chnl_flush_io); STORE_FXN(fxn_chnl_flushio, chnl_flush_io);
STORE_FXN(fxn_chnl_getinfo, pfn_chnl_get_info); STORE_FXN(fxn_chnl_getinfo, chnl_get_info);
STORE_FXN(fxn_chnl_getmgrinfo, pfn_chnl_get_mgr_info); STORE_FXN(fxn_chnl_getmgrinfo, chnl_get_mgr_info);
STORE_FXN(fxn_chnl_idle, pfn_chnl_idle); STORE_FXN(fxn_chnl_idle, chnl_idle);
STORE_FXN(fxn_chnl_registernotify, pfn_chnl_register_notify); STORE_FXN(fxn_chnl_registernotify, chnl_register_notify);
STORE_FXN(fxn_io_create, pfn_io_create); STORE_FXN(fxn_io_create, pfn_io_create);
STORE_FXN(fxn_io_destroy, pfn_io_destroy); STORE_FXN(fxn_io_destroy, pfn_io_destroy);
STORE_FXN(fxn_io_onloaded, pfn_io_on_loaded); STORE_FXN(fxn_io_onloaded, pfn_io_on_loaded);
...@@ -1122,25 +1122,25 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns, ...@@ -1122,25 +1122,25 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
/* Ensure postcondition: */ /* Ensure postcondition: */
DBC_ENSURE(intf_fxns->pfn_dev_create != NULL); DBC_ENSURE(intf_fxns->pfn_dev_create != NULL);
DBC_ENSURE(intf_fxns->pfn_dev_destroy != NULL); DBC_ENSURE(intf_fxns->pfn_dev_destroy != NULL);
DBC_ENSURE(intf_fxns->pfn_dev_cntrl != NULL); DBC_ENSURE(intf_fxns->dev_cntrl != NULL);
DBC_ENSURE(intf_fxns->brd_monitor != NULL); DBC_ENSURE(intf_fxns->brd_monitor != NULL);
DBC_ENSURE(intf_fxns->pfn_brd_start != NULL); DBC_ENSURE(intf_fxns->brd_start != NULL);
DBC_ENSURE(intf_fxns->pfn_brd_stop != NULL); DBC_ENSURE(intf_fxns->brd_stop != NULL);
DBC_ENSURE(intf_fxns->pfn_brd_status != NULL); DBC_ENSURE(intf_fxns->brd_status != NULL);
DBC_ENSURE(intf_fxns->brd_read != NULL); DBC_ENSURE(intf_fxns->brd_read != NULL);
DBC_ENSURE(intf_fxns->pfn_brd_write != NULL); DBC_ENSURE(intf_fxns->brd_write != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_create != NULL); DBC_ENSURE(intf_fxns->chnl_create != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_destroy != NULL); DBC_ENSURE(intf_fxns->chnl_destroy != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_open != NULL); DBC_ENSURE(intf_fxns->chnl_open != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_close != NULL); DBC_ENSURE(intf_fxns->chnl_close != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_add_io_req != NULL); DBC_ENSURE(intf_fxns->chnl_add_io_req != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_get_ioc != NULL); DBC_ENSURE(intf_fxns->chnl_get_ioc != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_cancel_io != NULL); DBC_ENSURE(intf_fxns->chnl_cancel_io != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_flush_io != NULL); DBC_ENSURE(intf_fxns->chnl_flush_io != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_get_info != NULL); DBC_ENSURE(intf_fxns->chnl_get_info != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_get_mgr_info != NULL); DBC_ENSURE(intf_fxns->chnl_get_mgr_info != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_idle != NULL); DBC_ENSURE(intf_fxns->chnl_idle != NULL);
DBC_ENSURE(intf_fxns->pfn_chnl_register_notify != NULL); DBC_ENSURE(intf_fxns->chnl_register_notify != NULL);
DBC_ENSURE(intf_fxns->pfn_io_create != NULL); DBC_ENSURE(intf_fxns->pfn_io_create != NULL);
DBC_ENSURE(intf_fxns->pfn_io_destroy != NULL); DBC_ENSURE(intf_fxns->pfn_io_destroy != NULL);
DBC_ENSURE(intf_fxns->pfn_io_on_loaded != NULL); DBC_ENSURE(intf_fxns->pfn_io_on_loaded != NULL);
......
...@@ -141,7 +141,7 @@ int disp_create(struct disp_object **dispatch_obj, ...@@ -141,7 +141,7 @@ int disp_create(struct disp_object **dispatch_obj,
chnl_attr_obj.uio_reqs = CHNLIOREQS; chnl_attr_obj.uio_reqs = CHNLIOREQS;
chnl_attr_obj.event_obj = NULL; chnl_attr_obj.event_obj = NULL;
ul_chnl_id = disp_attrs->ul_chnl_offset + CHNLTORMSOFFSET; 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, disp_obj->hchnl_mgr,
CHNL_MODETODSP, ul_chnl_id, CHNL_MODETODSP, ul_chnl_id,
&chnl_attr_obj); &chnl_attr_obj);
...@@ -149,7 +149,7 @@ int disp_create(struct disp_object **dispatch_obj, ...@@ -149,7 +149,7 @@ int disp_create(struct disp_object **dispatch_obj,
if (!status) { if (!status) {
ul_chnl_id = disp_attrs->ul_chnl_offset + CHNLFROMRMSOFFSET; ul_chnl_id = disp_attrs->ul_chnl_offset + CHNLFROMRMSOFFSET;
status = status =
(*intf_fxns->pfn_chnl_open) (&(disp_obj->chnl_from_dsp), (*intf_fxns->chnl_open) (&(disp_obj->chnl_from_dsp),
disp_obj->hchnl_mgr, disp_obj->hchnl_mgr,
CHNL_MODEFROMDSP, ul_chnl_id, CHNL_MODEFROMDSP, ul_chnl_id,
&chnl_attr_obj); &chnl_attr_obj);
...@@ -566,7 +566,7 @@ static void delete_disp(struct disp_object *disp_obj) ...@@ -566,7 +566,7 @@ static void delete_disp(struct disp_object *disp_obj)
if (disp_obj->chnl_from_dsp) { if (disp_obj->chnl_from_dsp) {
/* Channel close can fail only if the channel handle /* Channel close can fail only if the channel handle
* is invalid. */ * is invalid. */
status = (*intf_fxns->pfn_chnl_close) status = (*intf_fxns->chnl_close)
(disp_obj->chnl_from_dsp); (disp_obj->chnl_from_dsp);
if (status) { if (status) {
dev_dbg(bridge, "%s: Failed to close channel " dev_dbg(bridge, "%s: Failed to close channel "
...@@ -575,7 +575,7 @@ static void delete_disp(struct disp_object *disp_obj) ...@@ -575,7 +575,7 @@ static void delete_disp(struct disp_object *disp_obj)
} }
if (disp_obj->chnl_to_dsp) { if (disp_obj->chnl_to_dsp) {
status = status =
(*intf_fxns->pfn_chnl_close) (disp_obj-> (*intf_fxns->chnl_close) (disp_obj->
chnl_to_dsp); chnl_to_dsp);
if (status) { if (status) {
dev_dbg(bridge, "%s: Failed to close channel to" dev_dbg(bridge, "%s: Failed to close channel to"
...@@ -667,13 +667,13 @@ static int send_message(struct disp_object *disp_obj, u32 timeout, ...@@ -667,13 +667,13 @@ static int send_message(struct disp_object *disp_obj, u32 timeout,
pbuf = disp_obj->pbuf; pbuf = disp_obj->pbuf;
/* Send the command */ /* 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); 0L, dw_arg);
if (status) if (status)
goto func_end; goto func_end;
status = 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 (!status) {
if (!CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) { if (!CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) {
if (CHNL_IS_TIMED_OUT(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, ...@@ -688,13 +688,13 @@ static int send_message(struct disp_object *disp_obj, u32 timeout,
chnl_obj = disp_obj->chnl_from_dsp; chnl_obj = disp_obj->chnl_from_dsp;
ul_bytes = REPLYSIZE; 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); 0, 0L, dw_arg);
if (status) if (status)
goto func_end; goto func_end;
status = 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 (!status) {
if (CHNL_IS_TIMED_OUT(chnl_ioc_obj)) { if (CHNL_IS_TIMED_OUT(chnl_ioc_obj)) {
status = -ETIME; status = -ETIME;
......
...@@ -1367,7 +1367,7 @@ int node_create_mgr(struct node_mgr **node_man, ...@@ -1367,7 +1367,7 @@ int node_create_mgr(struct node_mgr **node_man,
nldr_attrs_obj.us_dsp_word_size = node_mgr_obj->udsp_word_size; 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; 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(); 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, status = node_mgr_obj->nldr_fxns.create(&node_mgr_obj->nldr_obj,
hdev_obj, hdev_obj,
&nldr_attrs_obj); &nldr_attrs_obj);
if (status) if (status)
...@@ -2608,7 +2608,7 @@ static void delete_node_mgr(struct node_mgr *hnode_mgr) ...@@ -2608,7 +2608,7 @@ static void delete_node_mgr(struct node_mgr *hnode_mgr)
/* Delete the loader */ /* Delete the loader */
if (hnode_mgr->nldr_obj) 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) if (hnode_mgr->loader_init)
hnode_mgr->nldr_fxns.pfn_exit(); hnode_mgr->nldr_fxns.pfn_exit();
......
...@@ -540,7 +540,7 @@ int proc_ctrl(void *hprocessor, u32 dw_cmd, struct dsp_cbdata * arg) ...@@ -540,7 +540,7 @@ int proc_ctrl(void *hprocessor, u32 dw_cmd, struct dsp_cbdata * arg)
/* timeout = arg->cb_data; */ /* timeout = arg->cb_data; */
status = pwr_wake_dsp(timeout); status = pwr_wake_dsp(timeout);
} else } 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, (p_proc_object->hbridge_context, dw_cmd,
arg))) { arg))) {
status = 0; status = 0;
...@@ -995,7 +995,7 @@ int proc_get_state(void *hprocessor, ...@@ -995,7 +995,7 @@ int proc_get_state(void *hprocessor,
if (p_proc_object) { if (p_proc_object) {
/* First, retrieve BRD state information */ /* 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); (p_proc_object->hbridge_context, &brd_status);
if (!status) { if (!status) {
switch (brd_status) { switch (brd_status) {
...@@ -1262,7 +1262,7 @@ int proc_load(void *hprocessor, const s32 argc_index, ...@@ -1262,7 +1262,7 @@ int proc_load(void *hprocessor, const s32 argc_index,
} }
if (!status) { if (!status) {
/* Update the Processor status to loaded */ /* 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); (p_proc_object->hbridge_context, BRD_LOADED);
if (!status) { if (!status) {
p_proc_object->proc_state = PROC_LOADED; p_proc_object->proc_state = PROC_LOADED;
...@@ -1304,7 +1304,7 @@ int proc_load(void *hprocessor, const s32 argc_index, ...@@ -1304,7 +1304,7 @@ int proc_load(void *hprocessor, const s32 argc_index,
kfree(new_envp); kfree(new_envp);
user_args[0] = pargv0; user_args[0] = pargv0;
if (!status) { 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))) { (p_proc_object->hbridge_context, &brd_state))) {
pr_info("%s: Processor Loaded %s\n", __func__, pargv0); pr_info("%s: Processor Loaded %s\n", __func__, pargv0);
kfree(drv_datap->base_img); kfree(drv_datap->base_img);
...@@ -1580,7 +1580,7 @@ int proc_start(void *hprocessor) ...@@ -1580,7 +1580,7 @@ int proc_start(void *hprocessor)
if (status) if (status)
goto func_cont; 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); (p_proc_object->hbridge_context, dw_dsp_addr);
if (status) if (status)
goto func_cont; goto func_cont;
...@@ -1601,12 +1601,12 @@ int proc_start(void *hprocessor) ...@@ -1601,12 +1601,12 @@ int proc_start(void *hprocessor)
/* Failed to Create Node Manager and DISP Object /* Failed to Create Node Manager and DISP Object
* Stop the Processor from running. Put it in STOPPED State */ * Stop the Processor from running. Put it in STOPPED State */
(void)(*p_proc_object->intf_fxns-> (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; p_proc_object->proc_state = PROC_STOPPED;
} }
func_cont: func_cont:
if (!status) { 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))) { (p_proc_object->hbridge_context, &brd_state))) {
pr_info("%s: dsp in running state\n", __func__); pr_info("%s: dsp in running state\n", __func__);
DBC_ASSERT(brd_state != BRD_HIBERNATION); DBC_ASSERT(brd_state != BRD_HIBERNATION);
...@@ -1659,7 +1659,7 @@ int proc_stop(void *hprocessor) ...@@ -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 */ /* It is OK to stop a device that does n't have nodes OR not started */
status = status =
(*p_proc_object->intf_fxns-> (*p_proc_object->intf_fxns->
pfn_brd_stop) (p_proc_object->hbridge_context); brd_stop) (p_proc_object->hbridge_context);
if (!status) { if (!status) {
dev_dbg(bridge, "%s: processor in standby mode\n", __func__); dev_dbg(bridge, "%s: processor in standby mode\n", __func__);
p_proc_object->proc_state = PROC_STOPPED; p_proc_object->proc_state = PROC_STOPPED;
...@@ -1672,7 +1672,7 @@ int proc_stop(void *hprocessor) ...@@ -1672,7 +1672,7 @@ int proc_stop(void *hprocessor)
dev_set_msg_mgr(p_proc_object->hdev_obj, NULL); dev_set_msg_mgr(p_proc_object->hdev_obj, NULL);
} }
if (!((*p_proc_object-> if (!((*p_proc_object->
intf_fxns->pfn_brd_status) (p_proc_object-> intf_fxns->brd_status) (p_proc_object->
hbridge_context, hbridge_context,
&brd_state))) &brd_state)))
DBC_ASSERT(brd_state == BRD_STOPPED); DBC_ASSERT(brd_state == BRD_STOPPED);
...@@ -1831,7 +1831,7 @@ static int proc_monitor(struct proc_object *proc_obj) ...@@ -1831,7 +1831,7 @@ static int proc_monitor(struct proc_object *proc_obj)
if (!((*proc_obj->intf_fxns->brd_monitor) if (!((*proc_obj->intf_fxns->brd_monitor)
(proc_obj->hbridge_context))) { (proc_obj->hbridge_context))) {
status = 0; status = 0;
if (!((*proc_obj->intf_fxns->pfn_brd_status) if (!((*proc_obj->intf_fxns->brd_status)
(proc_obj->hbridge_context, &brd_state))) (proc_obj->hbridge_context, &brd_state)))
DBC_ASSERT(brd_state == BRD_IDLE); DBC_ASSERT(brd_state == BRD_IDLE);
} }
......
...@@ -67,7 +67,7 @@ int pwr_sleep_dsp(const u32 sleep_code, const u32 timeout) ...@@ -67,7 +67,7 @@ int pwr_sleep_dsp(const u32 sleep_code, const u32 timeout)
status = -EINVAL; status = -EINVAL;
if (status != -EINVAL) { if (status != -EINVAL) {
status = (*intf_fxns->pfn_dev_cntrl) (dw_context, status = (*intf_fxns->dev_cntrl) (dw_context,
ioctlcode, ioctlcode,
(void *)&arg); (void *)&arg);
} }
...@@ -97,7 +97,7 @@ int pwr_wake_dsp(const u32 timeout) ...@@ -97,7 +97,7 @@ int pwr_wake_dsp(const u32 timeout)
if (!(dev_get_intf_fxns(hdev_obj, if (!(dev_get_intf_fxns(hdev_obj,
(struct bridge_drv_interface **)&intf_fxns))) { (struct bridge_drv_interface **)&intf_fxns))) {
status = status =
(*intf_fxns->pfn_dev_cntrl) (dw_context, (*intf_fxns->dev_cntrl) (dw_context,
BRDIOCTL_WAKEUP, BRDIOCTL_WAKEUP,
(void *)&arg); (void *)&arg);
} }
...@@ -131,7 +131,7 @@ int pwr_pm_pre_scale(u16 voltage_domain, u32 level) ...@@ -131,7 +131,7 @@ int pwr_pm_pre_scale(u16 voltage_domain, u32 level)
if (!(dev_get_intf_fxns(hdev_obj, if (!(dev_get_intf_fxns(hdev_obj,
(struct bridge_drv_interface **)&intf_fxns))) { (struct bridge_drv_interface **)&intf_fxns))) {
status = status =
(*intf_fxns->pfn_dev_cntrl) (dw_context, (*intf_fxns->dev_cntrl) (dw_context,
BRDIOCTL_PRESCALE_NOTIFY, BRDIOCTL_PRESCALE_NOTIFY,
(void *)&arg); (void *)&arg);
} }
...@@ -165,7 +165,7 @@ int pwr_pm_post_scale(u16 voltage_domain, u32 level) ...@@ -165,7 +165,7 @@ int pwr_pm_post_scale(u16 voltage_domain, u32 level)
if (!(dev_get_intf_fxns(hdev_obj, if (!(dev_get_intf_fxns(hdev_obj,
(struct bridge_drv_interface **)&intf_fxns))) { (struct bridge_drv_interface **)&intf_fxns))) {
status = status =
(*intf_fxns->pfn_dev_cntrl) (dw_context, (*intf_fxns->dev_cntrl) (dw_context,
BRDIOCTL_POSTSCALE_NOTIFY, BRDIOCTL_POSTSCALE_NOTIFY,
(void *)&arg); (void *)&arg);
} }
......
...@@ -165,7 +165,7 @@ int strm_close(struct strm_res_object *strmres, ...@@ -165,7 +165,7 @@ int strm_close(struct strm_res_object *strmres,
* -EPIPE */ * -EPIPE */
intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;
status = status =
(*intf_fxns->pfn_chnl_get_info) (stream_obj->chnl_obj, (*intf_fxns->chnl_get_info) (stream_obj->chnl_obj,
&chnl_info_obj); &chnl_info_obj);
DBC_ASSERT(!status); DBC_ASSERT(!status);
...@@ -323,7 +323,7 @@ int strm_get_info(struct strm_object *stream_obj, ...@@ -323,7 +323,7 @@ int strm_get_info(struct strm_object *stream_obj,
intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;
status = status =
(*intf_fxns->pfn_chnl_get_info) (stream_obj->chnl_obj, (*intf_fxns->chnl_get_info) (stream_obj->chnl_obj,
&chnl_info_obj); &chnl_info_obj);
if (status) if (status)
goto func_end; goto func_end;
...@@ -377,7 +377,7 @@ int strm_idle(struct strm_object *stream_obj, bool flush_data) ...@@ -377,7 +377,7 @@ int strm_idle(struct strm_object *stream_obj, bool flush_data)
} else { } else {
intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; 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, stream_obj->utimeout,
flush_data); flush_data);
} }
...@@ -435,7 +435,7 @@ int strm_issue(struct strm_object *stream_obj, u8 *pbuf, u32 ul_bytes, ...@@ -435,7 +435,7 @@ int strm_issue(struct strm_object *stream_obj, u8 *pbuf, u32 ul_bytes,
} }
if (!status) { 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, (stream_obj->chnl_obj, pbuf, ul_bytes, ul_buf_size,
(u32) tmp_buf, dw_arg); (u32) tmp_buf, dw_arg);
} }
...@@ -557,7 +557,7 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index, ...@@ -557,7 +557,7 @@ int strm_open(struct node_object *hnode, u32 dir, u32 index,
chnl_mode = (dir == DSP_TONODE) ? chnl_mode = (dir == DSP_TONODE) ?
CHNL_MODETODSP : CHNL_MODEFROMDSP; CHNL_MODETODSP : CHNL_MODEFROMDSP;
intf_fxns = strm_mgr_obj->intf_fxns; 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, strm_mgr_obj->hchnl_mgr,
chnl_mode, ul_chnl_id, chnl_mode, ul_chnl_id,
&chnl_attr_obj); &chnl_attr_obj);
...@@ -631,7 +631,7 @@ int strm_reclaim(struct strm_object *stream_obj, u8 ** buf_ptr, ...@@ -631,7 +631,7 @@ int strm_reclaim(struct strm_object *stream_obj, u8 ** buf_ptr,
intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;
status = status =
(*intf_fxns->pfn_chnl_get_ioc) (stream_obj->chnl_obj, (*intf_fxns->chnl_get_ioc) (stream_obj->chnl_obj,
stream_obj->utimeout, stream_obj->utimeout,
&chnl_ioc_obj); &chnl_ioc_obj);
if (!status) { if (!status) {
...@@ -719,7 +719,7 @@ int strm_register_notify(struct strm_object *stream_obj, u32 event_mask, ...@@ -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; intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;
status = status =
(*intf_fxns->pfn_chnl_register_notify) (stream_obj-> (*intf_fxns->chnl_register_notify) (stream_obj->
chnl_obj, chnl_obj,
event_mask, event_mask,
notify_type, notify_type,
...@@ -765,7 +765,7 @@ int strm_select(struct strm_object **strm_tab, u32 strms, ...@@ -765,7 +765,7 @@ int strm_select(struct strm_object **strm_tab, u32 strms,
/* Determine which channels have IO ready */ /* Determine which channels have IO ready */
for (i = 0; i < strms; i++) { for (i = 0; i < strms; i++) {
intf_fxns = strm_tab[i]->strm_mgr_obj->intf_fxns; 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); &chnl_info_obj);
if (status) { if (status) {
break; break;
...@@ -786,7 +786,7 @@ int strm_select(struct strm_object **strm_tab, u32 strms, ...@@ -786,7 +786,7 @@ int strm_select(struct strm_object **strm_tab, u32 strms,
for (i = 0; i < strms; i++) { for (i = 0; i < strms; i++) {
intf_fxns = intf_fxns =
strm_tab[i]->strm_mgr_obj->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); (strm_tab[i]->chnl_obj, &chnl_info_obj);
if (status) if (status)
break; break;
...@@ -832,7 +832,7 @@ static int delete_strm(struct strm_object *stream_obj) ...@@ -832,7 +832,7 @@ static int delete_strm(struct strm_object *stream_obj)
intf_fxns = stream_obj->strm_mgr_obj->intf_fxns; intf_fxns = stream_obj->strm_mgr_obj->intf_fxns;
/* Channel close can fail only if the channel handle /* Channel close can fail only if the channel handle
* is invalid. */ * is invalid. */
status = (*intf_fxns->pfn_chnl_close) status = (*intf_fxns->chnl_close)
(stream_obj->chnl_obj); (stream_obj->chnl_obj);
} }
/* Free all SM address translator resources */ /* Free all SM address translator resources */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment