aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/tidspbridge/pmgr/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/tidspbridge/pmgr/dev.c')
-rw-r--r--drivers/staging/tidspbridge/pmgr/dev.c355
1 files changed, 164 insertions, 191 deletions
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 132e960967b9..9a38d86a84a0 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -16,6 +16,7 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include <linux/types.h>
+#include <linux/list.h>
/* ----------------------------------- Host OS */
#include <dspbridge/host_os.h>
@@ -26,10 +27,6 @@
/* ----------------------------------- Trace & Debug */
#include <dspbridge/dbc.h>
-/* ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/ldr.h>
-#include <dspbridge/list.h>
-
/* ----------------------------------- Platform Manager */
#include <dspbridge/cod.h>
#include <dspbridge/drv.h>
@@ -60,28 +57,26 @@
/* The Bridge device object: */
struct dev_object {
- /* LST requires "link" to be first field! */
struct list_head link; /* Link to next dev_object. */
u8 dev_type; /* Device Type */
struct cfg_devnode *dev_node_obj; /* Platform specific dev id */
/* Bridge Context Handle */
- struct bridge_dev_context *hbridge_context;
+ struct bridge_dev_context *bridge_context;
/* Function interface to Bridge driver. */
struct bridge_drv_interface bridge_interface;
struct brd_object *lock_owner; /* Client with exclusive access. */
struct cod_manager *cod_mgr; /* Code manager handle. */
- struct chnl_mgr *hchnl_mgr; /* Channel manager. */
- struct deh_mgr *hdeh_mgr; /* DEH manager. */
- struct msg_mgr *hmsg_mgr; /* Message manager. */
- struct io_mgr *hio_mgr; /* IO manager (CHNL, msg_ctrl) */
- struct cmm_object *hcmm_mgr; /* SM memory manager. */
+ struct chnl_mgr *chnl_mgr; /* Channel manager. */
+ struct deh_mgr *deh_mgr; /* DEH manager. */
+ struct msg_mgr *msg_mgr; /* Message manager. */
+ 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. */
u32 word_size; /* DSP word size: quick access. */
- struct drv_object *hdrv_obj; /* Driver Object */
- struct lst_list *proc_list; /* List of Proceeosr attached to
- * this device */
- struct node_mgr *hnode_mgr;
+ struct drv_object *drv_obj; /* Driver Object */
+ /* List of Processors attached to this device */
+ struct list_head proc_list;
+ struct node_mgr *node_mgr;
};
struct drv_ext {
@@ -115,9 +110,9 @@ u32 dev_brd_write_fxn(void *arb, u32 dsp_add, void *host_buf,
DBC_REQUIRE(host_buf != NULL); /* Required of BrdWrite(). */
if (dev_obj) {
/* Require of BrdWrite() */
- DBC_ASSERT(dev_obj->hbridge_context != NULL);
- status = (*dev_obj->bridge_interface.pfn_brd_write) (
- dev_obj->hbridge_context, host_buf,
+ DBC_ASSERT(dev_obj->bridge_context != NULL);
+ status = (*dev_obj->bridge_interface.brd_write) (
+ dev_obj->bridge_context, host_buf,
dsp_add, ul_num_bytes, mem_space);
/* Special case of getting the address only */
if (ul_num_bytes == 0)
@@ -140,7 +135,6 @@ int dev_create_device(struct dev_object **device_obj,
struct cfg_devnode *dev_node_obj)
{
struct cfg_hostres *host_res;
- struct ldr_module *module_obj = NULL;
struct bridge_drv_interface *drv_fxns = NULL;
struct dev_object *dev_obj = NULL;
struct chnl_mgrattrs mgr_attrs;
@@ -180,13 +174,12 @@ int dev_create_device(struct dev_object **device_obj,
if (dev_obj) {
/* Fill out the rest of the Dev Object structure: */
dev_obj->dev_node_obj = dev_node_obj;
- dev_obj->module_obj = module_obj;
dev_obj->cod_mgr = NULL;
- dev_obj->hchnl_mgr = NULL;
- dev_obj->hdeh_mgr = NULL;
+ dev_obj->chnl_mgr = NULL;
+ dev_obj->deh_mgr = NULL;
dev_obj->lock_owner = NULL;
dev_obj->word_size = DSPWORDSIZE;
- dev_obj->hdrv_obj = hdrv_obj;
+ dev_obj->drv_obj = hdrv_obj;
dev_obj->dev_type = DSP_UNIT;
/* Store this Bridge's interface functions, based on its
* version. */
@@ -195,12 +188,12 @@ int dev_create_device(struct dev_object **device_obj,
/* Call fxn_dev_create() to get the Bridge's device
* context handle. */
- status = (dev_obj->bridge_interface.pfn_dev_create)
- (&dev_obj->hbridge_context, dev_obj,
+ status = (dev_obj->bridge_interface.dev_create)
+ (&dev_obj->bridge_context, dev_obj,
host_res);
/* Assert bridge_dev_create()'s ensure clause: */
DBC_ASSERT(status
- || (dev_obj->hbridge_context != NULL));
+ || (dev_obj->bridge_context != NULL));
} else {
status = -ENOMEM;
}
@@ -220,54 +213,47 @@ 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.usm_length =
- host_res->dw_mem_length[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.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__);
}
- status = chnl_create(&dev_obj->hchnl_mgr, dev_obj, &mgr_attrs);
+ status = chnl_create(&dev_obj->chnl_mgr, dev_obj, &mgr_attrs);
if (status == -ENOSYS) {
/* It's OK for a device not to have a channel
* manager: */
status = 0;
}
/* Create CMM mgr even if Msg Mgr not impl. */
- status = cmm_create(&dev_obj->hcmm_mgr,
+ status = cmm_create(&dev_obj->cmm_mgr,
(struct dev_object *)dev_obj, NULL);
/* Only create IO manager if we have a channel manager */
- if (!status && dev_obj->hchnl_mgr) {
- status = io_create(&dev_obj->hio_mgr, dev_obj,
+ if (!status && dev_obj->chnl_mgr) {
+ status = io_create(&dev_obj->iomgr, dev_obj,
&io_mgr_attrs);
}
/* Only create DEH manager if we have an IO manager */
if (!status) {
/* Instantiate the DEH module */
- status = bridge_deh_create(&dev_obj->hdeh_mgr, dev_obj);
+ status = bridge_deh_create(&dev_obj->deh_mgr, dev_obj);
}
/* Create DMM mgr . */
status = dmm_create(&dev_obj->dmm_mgr,
(struct dev_object *)dev_obj, NULL);
}
/* Add the new DEV_Object to the global list: */
- if (!status) {
- lst_init_elem(&dev_obj->link);
+ if (!status)
status = drv_insert_dev_object(hdrv_obj, dev_obj);
- }
+
/* Create the Processor List */
- if (!status) {
- dev_obj->proc_list = kzalloc(sizeof(struct lst_list),
- GFP_KERNEL);
- if (!(dev_obj->proc_list))
- status = -EPERM;
- else
- INIT_LIST_HEAD(&dev_obj->proc_list->head);
- }
+ if (!status)
+ INIT_LIST_HEAD(&dev_obj->proc_list);
leave:
/* If all went well, return a handle to the dev object;
* else, cleanup and return NULL in the OUT parameter. */
@@ -275,7 +261,6 @@ leave:
*device_obj = dev_obj;
} else {
if (dev_obj) {
- kfree(dev_obj->proc_list);
if (dev_obj->cod_mgr)
cod_delete(dev_obj->cod_mgr);
if (dev_obj->dmm_mgr)
@@ -306,13 +291,13 @@ int dev_create2(struct dev_object *hdev_obj)
DBC_REQUIRE(hdev_obj);
/* There can be only one Node Manager per DEV object */
- DBC_ASSERT(!dev_obj->hnode_mgr);
- status = node_create_mgr(&dev_obj->hnode_mgr, hdev_obj);
+ DBC_ASSERT(!dev_obj->node_mgr);
+ status = node_create_mgr(&dev_obj->node_mgr, hdev_obj);
if (status)
- dev_obj->hnode_mgr = NULL;
+ dev_obj->node_mgr = NULL;
- DBC_ENSURE((!status && dev_obj->hnode_mgr != NULL)
- || (status && dev_obj->hnode_mgr == NULL));
+ DBC_ENSURE((!status && dev_obj->node_mgr != NULL)
+ || (status && dev_obj->node_mgr == NULL));
return status;
}
@@ -329,15 +314,15 @@ int dev_destroy2(struct dev_object *hdev_obj)
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(hdev_obj);
- if (dev_obj->hnode_mgr) {
- if (node_delete_mgr(dev_obj->hnode_mgr))
+ if (dev_obj->node_mgr) {
+ if (node_delete_mgr(dev_obj->node_mgr))
status = -EPERM;
else
- dev_obj->hnode_mgr = NULL;
+ dev_obj->node_mgr = NULL;
}
- DBC_ENSURE((!status && dev_obj->hnode_mgr == NULL) || status);
+ DBC_ENSURE((!status && dev_obj->node_mgr == NULL) || status);
return status;
}
@@ -360,33 +345,33 @@ int dev_destroy_device(struct dev_object *hdev_obj)
dev_obj->cod_mgr = NULL;
}
- if (dev_obj->hnode_mgr) {
- node_delete_mgr(dev_obj->hnode_mgr);
- dev_obj->hnode_mgr = NULL;
+ if (dev_obj->node_mgr) {
+ node_delete_mgr(dev_obj->node_mgr);
+ dev_obj->node_mgr = NULL;
}
/* 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->hchnl_mgr) {
- chnl_destroy(dev_obj->hchnl_mgr);
- dev_obj->hchnl_mgr = NULL;
+ if (dev_obj->chnl_mgr) {
+ chnl_destroy(dev_obj->chnl_mgr);
+ dev_obj->chnl_mgr = NULL;
}
- if (dev_obj->hmsg_mgr) {
- msg_delete(dev_obj->hmsg_mgr);
- dev_obj->hmsg_mgr = NULL;
+ if (dev_obj->msg_mgr) {
+ msg_delete(dev_obj->msg_mgr);
+ dev_obj->msg_mgr = NULL;
}
- if (dev_obj->hdeh_mgr) {
+ if (dev_obj->deh_mgr) {
/* Uninitialize DEH module. */
- bridge_deh_destroy(dev_obj->hdeh_mgr);
- dev_obj->hdeh_mgr = NULL;
+ bridge_deh_destroy(dev_obj->deh_mgr);
+ dev_obj->deh_mgr = NULL;
}
- if (dev_obj->hcmm_mgr) {
- cmm_destroy(dev_obj->hcmm_mgr, true);
- dev_obj->hcmm_mgr = NULL;
+ if (dev_obj->cmm_mgr) {
+ cmm_destroy(dev_obj->cmm_mgr, true);
+ dev_obj->cmm_mgr = NULL;
}
if (dev_obj->dmm_mgr) {
@@ -396,18 +381,15 @@ int dev_destroy_device(struct dev_object *hdev_obj)
/* Call the driver's bridge_dev_destroy() function: */
/* Require of DevDestroy */
- if (dev_obj->hbridge_context) {
- status = (*dev_obj->bridge_interface.pfn_dev_destroy)
- (dev_obj->hbridge_context);
- dev_obj->hbridge_context = NULL;
+ if (dev_obj->bridge_context) {
+ status = (*dev_obj->bridge_interface.dev_destroy)
+ (dev_obj->bridge_context);
+ dev_obj->bridge_context = NULL;
} else
status = -EPERM;
if (!status) {
- kfree(dev_obj->proc_list);
- dev_obj->proc_list = NULL;
-
/* Remove this DEV_Object from the global list: */
- drv_remove_dev_object(dev_obj->hdrv_obj, dev_obj);
+ drv_remove_dev_object(dev_obj->drv_obj, dev_obj);
/* Free The library * LDR_FreeModule
* (dev_obj->module_obj); */
/* Free this dev object: */
@@ -437,7 +419,7 @@ int dev_get_chnl_mgr(struct dev_object *hdev_obj,
DBC_REQUIRE(mgr != NULL);
if (hdev_obj) {
- *mgr = dev_obj->hchnl_mgr;
+ *mgr = dev_obj->chnl_mgr;
} else {
*mgr = NULL;
status = -EFAULT;
@@ -463,7 +445,7 @@ int dev_get_cmm_mgr(struct dev_object *hdev_obj,
DBC_REQUIRE(mgr != NULL);
if (hdev_obj) {
- *mgr = dev_obj->hcmm_mgr;
+ *mgr = dev_obj->cmm_mgr;
} else {
*mgr = NULL;
status = -EFAULT;
@@ -536,7 +518,7 @@ int dev_get_deh_mgr(struct dev_object *hdev_obj,
DBC_REQUIRE(deh_manager != NULL);
DBC_REQUIRE(hdev_obj);
if (hdev_obj) {
- *deh_manager = hdev_obj->hdeh_mgr;
+ *deh_manager = hdev_obj->deh_mgr;
} else {
*deh_manager = NULL;
status = -EFAULT;
@@ -623,7 +605,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;
@@ -660,7 +642,7 @@ void dev_get_msg_mgr(struct dev_object *hdev_obj, struct msg_mgr **msg_man)
DBC_REQUIRE(msg_man != NULL);
DBC_REQUIRE(hdev_obj);
- *msg_man = hdev_obj->hmsg_mgr;
+ *msg_man = hdev_obj->msg_mgr;
}
/*
@@ -678,7 +660,7 @@ int dev_get_node_manager(struct dev_object *hdev_obj,
DBC_REQUIRE(node_man != NULL);
if (hdev_obj) {
- *node_man = dev_obj->hnode_mgr;
+ *node_man = dev_obj->node_mgr;
} else {
*node_man = NULL;
status = -EFAULT;
@@ -728,7 +710,7 @@ int dev_get_bridge_context(struct dev_object *hdev_obj,
DBC_REQUIRE(phbridge_context != NULL);
if (hdev_obj) {
- *phbridge_context = dev_obj->hbridge_context;
+ *phbridge_context = dev_obj->bridge_context;
} else {
*phbridge_context = NULL;
status = -EFAULT;
@@ -799,20 +781,18 @@ bool dev_init(void)
* Purpose:
* Notify all clients of this device of a change in device status.
*/
-int dev_notify_clients(struct dev_object *hdev_obj, u32 ret)
+int dev_notify_clients(struct dev_object *dev_obj, u32 ret)
{
- int status = 0;
-
- struct dev_object *dev_obj = hdev_obj;
- void *proc_obj;
+ struct list_head *curr;
- for (proc_obj = (void *)lst_first(dev_obj->proc_list);
- proc_obj != NULL;
- proc_obj = (void *)lst_next(dev_obj->proc_list,
- (struct list_head *)proc_obj))
- proc_notify_clients(proc_obj, (u32) ret);
+ /*
+ * FIXME: this code needs struct proc_object to have a list_head
+ * at the begining. If not, this can go horribly wrong.
+ */
+ list_for_each(curr, &dev_obj->proc_list)
+ proc_notify_clients((void *)curr, ret);
- return status;
+ return 0;
}
/*
@@ -864,11 +844,11 @@ int dev_set_chnl_mgr(struct dev_object *hdev_obj,
DBC_REQUIRE(refs > 0);
if (hdev_obj)
- dev_obj->hchnl_mgr = hmgr;
+ dev_obj->chnl_mgr = hmgr;
else
status = -EFAULT;
- DBC_ENSURE(status || (dev_obj->hchnl_mgr == hmgr));
+ DBC_ENSURE(status || (dev_obj->chnl_mgr == hmgr));
return status;
}
@@ -882,7 +862,7 @@ void dev_set_msg_mgr(struct dev_object *hdev_obj, struct msg_mgr *hmgr)
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(hdev_obj);
- hdev_obj->hmsg_mgr = hmgr;
+ hdev_obj->msg_mgr = hmgr;
}
/*
@@ -894,7 +874,7 @@ int dev_start_device(struct cfg_devnode *dev_node_obj)
{
struct dev_object *hdev_obj = NULL; /* handle to 'Bridge Device */
/* Bridge driver filename */
- char bridge_file_name[CFG_MAXSEARCHPATHLEN] = "UMA";
+ char *bridge_file_name = "UMA";
int status;
struct mgr_object *hmgr_obj = NULL;
struct drv_data *drv_datap = dev_get_drvdata(bridge);
@@ -967,7 +947,7 @@ static int init_cod_mgr(struct dev_object *dev_obj)
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(!dev_obj || (dev_obj->cod_mgr == NULL));
- status = cod_create(&dev_obj->cod_mgr, sz_dummy_file, NULL);
+ status = cod_create(&dev_obj->cod_mgr, sz_dummy_file);
return status;
}
@@ -994,23 +974,23 @@ static int init_cod_mgr(struct dev_object *dev_obj)
int dev_insert_proc_object(struct dev_object *hdev_obj,
u32 proc_obj, bool *already_attached)
{
- int status = 0;
struct dev_object *dev_obj = (struct dev_object *)hdev_obj;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(dev_obj);
DBC_REQUIRE(proc_obj != 0);
- DBC_REQUIRE(dev_obj->proc_list != NULL);
DBC_REQUIRE(already_attached != NULL);
- if (!LST_IS_EMPTY(dev_obj->proc_list))
+ if (!list_empty(&dev_obj->proc_list))
*already_attached = true;
/* Add DevObject to tail. */
- lst_put_tail(dev_obj->proc_list, (struct list_head *)proc_obj);
-
- DBC_ENSURE(!status && !LST_IS_EMPTY(dev_obj->proc_list));
+ /*
+ * FIXME: this code needs struct proc_object to have a list_head
+ * at the begining. If not, this can go horribly wrong.
+ */
+ list_add_tail((struct list_head *)proc_obj, &dev_obj->proc_list);
- return status;
+ return 0;
}
/*
@@ -1039,15 +1019,12 @@ int dev_remove_proc_object(struct dev_object *hdev_obj, u32 proc_obj)
DBC_REQUIRE(dev_obj);
DBC_REQUIRE(proc_obj != 0);
- DBC_REQUIRE(dev_obj->proc_list != NULL);
- DBC_REQUIRE(!LST_IS_EMPTY(dev_obj->proc_list));
+ DBC_REQUIRE(!list_empty(&dev_obj->proc_list));
/* Search list for dev_obj: */
- for (cur_elem = lst_first(dev_obj->proc_list); cur_elem != NULL;
- cur_elem = lst_next(dev_obj->proc_list, cur_elem)) {
- /* If found, remove it. */
+ list_for_each(cur_elem, &dev_obj->proc_list) {
if ((u32) cur_elem == proc_obj) {
- lst_remove_elem(dev_obj->proc_list, cur_elem);
+ list_del(cur_elem);
status = 0;
break;
}
@@ -1056,14 +1033,10 @@ int dev_remove_proc_object(struct dev_object *hdev_obj, u32 proc_obj)
return status;
}
-int dev_get_dev_type(struct dev_object *device_obj, u8 *dev_type)
+int dev_get_dev_type(struct dev_object *dev_obj, u8 *dev_type)
{
- int status = 0;
- struct dev_object *dev_obj = (struct dev_object *)device_obj;
-
*dev_type = dev_obj->dev_type;
-
- return status;
+ return 0;
}
/*
@@ -1106,73 +1079,73 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
intf_fxns->brd_api_minor_version = drv_fxns->brd_api_minor_version;
/* Install functions up to DSP API version .80 (first alpha): */
if (bridge_version > 0) {
- 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_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_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_chnl_create, pfn_chnl_create);
- STORE_FXN(fxn_chnl_destroy, pfn_chnl_destroy);
- STORE_FXN(fxn_chnl_open, pfn_chnl_open);
- STORE_FXN(fxn_chnl_close, pfn_chnl_close);
- STORE_FXN(fxn_chnl_addioreq, pfn_chnl_add_io_req);
- STORE_FXN(fxn_chnl_getioc, pfn_chnl_get_ioc);
- STORE_FXN(fxn_chnl_cancelio, pfn_chnl_cancel_io);
- STORE_FXN(fxn_chnl_flushio, pfn_chnl_flush_io);
- STORE_FXN(fxn_chnl_getinfo, pfn_chnl_get_info);
- STORE_FXN(fxn_chnl_getmgrinfo, pfn_chnl_get_mgr_info);
- STORE_FXN(fxn_chnl_idle, pfn_chnl_idle);
- STORE_FXN(fxn_chnl_registernotify, pfn_chnl_register_notify);
- STORE_FXN(fxn_io_create, pfn_io_create);
- STORE_FXN(fxn_io_destroy, pfn_io_destroy);
- STORE_FXN(fxn_io_onloaded, pfn_io_on_loaded);
- STORE_FXN(fxn_io_getprocload, pfn_io_get_proc_load);
- STORE_FXN(fxn_msg_create, pfn_msg_create);
- STORE_FXN(fxn_msg_createqueue, pfn_msg_create_queue);
- STORE_FXN(fxn_msg_delete, pfn_msg_delete);
- STORE_FXN(fxn_msg_deletequeue, pfn_msg_delete_queue);
- STORE_FXN(fxn_msg_get, pfn_msg_get);
- STORE_FXN(fxn_msg_put, pfn_msg_put);
- STORE_FXN(fxn_msg_registernotify, pfn_msg_register_notify);
- STORE_FXN(fxn_msg_setqueueid, pfn_msg_set_queue_id);
+ STORE_FXN(fxn_dev_create, dev_create);
+ STORE_FXN(fxn_dev_destroy, dev_destroy);
+ STORE_FXN(fxn_dev_ctrl, dev_cntrl);
+ STORE_FXN(fxn_brd_monitor, brd_monitor);
+ STORE_FXN(fxn_brd_start, brd_start);
+ STORE_FXN(fxn_brd_stop, brd_stop);
+ STORE_FXN(fxn_brd_status, brd_status);
+ STORE_FXN(fxn_brd_read, brd_read);
+ STORE_FXN(fxn_brd_write, brd_write);
+ STORE_FXN(fxn_brd_setstate, brd_set_state);
+ 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, chnl_create);
+ STORE_FXN(fxn_chnl_destroy, chnl_destroy);
+ STORE_FXN(fxn_chnl_open, chnl_open);
+ STORE_FXN(fxn_chnl_close, chnl_close);
+ STORE_FXN(fxn_chnl_addioreq, chnl_add_io_req);
+ STORE_FXN(fxn_chnl_getioc, chnl_get_ioc);
+ STORE_FXN(fxn_chnl_cancelio, chnl_cancel_io);
+ STORE_FXN(fxn_chnl_flushio, chnl_flush_io);
+ STORE_FXN(fxn_chnl_getinfo, chnl_get_info);
+ STORE_FXN(fxn_chnl_getmgrinfo, chnl_get_mgr_info);
+ STORE_FXN(fxn_chnl_idle, chnl_idle);
+ STORE_FXN(fxn_chnl_registernotify, chnl_register_notify);
+ STORE_FXN(fxn_io_create, io_create);
+ STORE_FXN(fxn_io_destroy, io_destroy);
+ STORE_FXN(fxn_io_onloaded, io_on_loaded);
+ STORE_FXN(fxn_io_getprocload, io_get_proc_load);
+ STORE_FXN(fxn_msg_create, msg_create);
+ STORE_FXN(fxn_msg_createqueue, msg_create_queue);
+ STORE_FXN(fxn_msg_delete, msg_delete);
+ STORE_FXN(fxn_msg_deletequeue, msg_delete_queue);
+ STORE_FXN(fxn_msg_get, msg_get);
+ STORE_FXN(fxn_msg_put, msg_put);
+ STORE_FXN(fxn_msg_registernotify, msg_register_notify);
+ STORE_FXN(fxn_msg_setqueueid, msg_set_queue_id);
}
/* Add code for any additional functions in newerBridge versions here */
/* Ensure postcondition: */
- 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->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->pfn_brd_write != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_create != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_destroy != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_open != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_close != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_add_io_req != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_get_ioc != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_cancel_io != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_flush_io != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_get_info != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_get_mgr_info != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_idle != NULL);
- DBC_ENSURE(intf_fxns->pfn_chnl_register_notify != NULL);
- DBC_ENSURE(intf_fxns->pfn_io_create != NULL);
- DBC_ENSURE(intf_fxns->pfn_io_destroy != NULL);
- DBC_ENSURE(intf_fxns->pfn_io_on_loaded != NULL);
- DBC_ENSURE(intf_fxns->pfn_io_get_proc_load != NULL);
- DBC_ENSURE(intf_fxns->pfn_msg_set_queue_id != NULL);
+ DBC_ENSURE(intf_fxns->dev_create != NULL);
+ DBC_ENSURE(intf_fxns->dev_destroy != NULL);
+ DBC_ENSURE(intf_fxns->dev_cntrl != NULL);
+ DBC_ENSURE(intf_fxns->brd_monitor != NULL);
+ DBC_ENSURE(intf_fxns->brd_start != NULL);
+ DBC_ENSURE(intf_fxns->brd_stop != NULL);
+ DBC_ENSURE(intf_fxns->brd_status != NULL);
+ DBC_ENSURE(intf_fxns->brd_read != NULL);
+ DBC_ENSURE(intf_fxns->brd_write != NULL);
+ DBC_ENSURE(intf_fxns->chnl_create != NULL);
+ DBC_ENSURE(intf_fxns->chnl_destroy != NULL);
+ DBC_ENSURE(intf_fxns->chnl_open != NULL);
+ DBC_ENSURE(intf_fxns->chnl_close != NULL);
+ DBC_ENSURE(intf_fxns->chnl_add_io_req != NULL);
+ DBC_ENSURE(intf_fxns->chnl_get_ioc != NULL);
+ DBC_ENSURE(intf_fxns->chnl_cancel_io != NULL);
+ DBC_ENSURE(intf_fxns->chnl_flush_io != NULL);
+ DBC_ENSURE(intf_fxns->chnl_get_info != NULL);
+ DBC_ENSURE(intf_fxns->chnl_get_mgr_info != NULL);
+ DBC_ENSURE(intf_fxns->chnl_idle != NULL);
+ DBC_ENSURE(intf_fxns->chnl_register_notify != NULL);
+ DBC_ENSURE(intf_fxns->io_create != NULL);
+ DBC_ENSURE(intf_fxns->io_destroy != NULL);
+ DBC_ENSURE(intf_fxns->io_on_loaded != NULL);
+ DBC_ENSURE(intf_fxns->io_get_proc_load != NULL);
+ DBC_ENSURE(intf_fxns->msg_set_queue_id != NULL);
#undef STORE_FXN
}