* ======== bridge_io_create ========
* Create an IO manager object.
*/
-int bridge_io_create(OUT struct io_mgr **phIOMgr,
+int bridge_io_create(OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs)
{
u8 dev_type;
/* Check requirements */
- if (!phIOMgr || !pMgrAttrs || pMgrAttrs->word_size == 0) {
+ if (!io_man || !pMgrAttrs || pMgrAttrs->word_size == 0) {
status = -EFAULT;
goto func_end;
}
if (DSP_FAILED(status)) {
/* Cleanup */
bridge_io_destroy(pio_mgr);
- if (phIOMgr)
- *phIOMgr = NULL;
+ if (io_man)
+ *io_man = NULL;
} else {
/* Return IO manager object to caller... */
hchnl_mgr->hio_mgr = pio_mgr;
- *phIOMgr = pio_mgr;
+ *io_man = pio_mgr;
}
return status;
}
* Create an object to manage message queues. Only one of these objects
* can exist per device object.
*/
-int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
+int bridge_msg_create(OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj,
msg_onexit msg_callback)
{
struct io_mgr *hio_mgr;
int status = 0;
- if (!phMsgMgr || !msg_callback || !hdev_obj) {
+ if (!msg_man || !msg_callback || !hdev_obj) {
status = -EFAULT;
goto func_end;
}
status = -EFAULT;
goto func_end;
}
- *phMsgMgr = NULL;
+ *msg_man = NULL;
/* Allocate msg_ctrl manager object */
msg_mgr_obj = kzalloc(sizeof(struct msg_mgr), GFP_KERNEL);
sync_init_event(msg_mgr_obj->sync_event);
if (DSP_SUCCEEDED(status))
- *phMsgMgr = msg_mgr_obj;
+ *msg_man = msg_mgr_obj;
else
delete_msg_mgr(msg_mgr_obj);
* on the DSP.
*/
int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
- OUT struct msg_queue **phMsgQueue,
+ OUT struct msg_queue **msgq,
u32 msgq_id, u32 max_msgs, void *arg)
{
u32 i;
struct msg_queue *msg_q;
int status = 0;
- if (!hmsg_mgr || phMsgQueue == NULL || !hmsg_mgr->msg_free_list) {
+ if (!hmsg_mgr || msgq == NULL || !hmsg_mgr->msg_free_list) {
status = -EFAULT;
goto func_end;
}
- *phMsgQueue = NULL;
+ *msgq = NULL;
/* Allocate msg_queue object */
msg_q = kzalloc(sizeof(struct msg_queue), GFP_KERNEL);
if (!msg_q) {
} else {
lst_put_tail(hmsg_mgr->queue_list,
(struct list_head *)msg_q);
- *phMsgQueue = msg_q;
+ *msgq = msg_q;
/* Signal that free frames are now available */
if (!LST_IS_EMPTY(hmsg_mgr->msg_free_list))
sync_set_event(hmsg_mgr->sync_event);
* value: Ptr to location to store the value.
* Returns:
* 0: Success.
- * -EFAULT: dev_node_obj is invalid or phDevObject is invalid.
+ * -EFAULT: dev_node_obj is invalid or device_obj is invalid.
* -ENODATA: The resource is not available.
* Requires:
* CFG initialized.
* Symbol table information is managed by this object and can be retrieved
* using the cod_get_sym_value() function.
* Parameters:
- * phManager: created manager object
+ * manager: created manager object
* pstrZLFile: ZL DLL filename, of length < COD_MAXPATHLENGTH.
* attrs: attributes to be used by this object. A NULL value
* will cause default attrs to be used.
* pstrZLFile != NULL
* Ensures:
*/
-extern int cod_create(OUT struct cod_manager **phManager,
+extern int cod_create(OUT struct cod_manager **manager,
char *pstrZLFile,
IN OPTIONAL CONST struct cod_attrs *attrs);
* Get handle to the DBL loader.
* Parameters:
* cod_mgr_obj: handle of manager to be deleted
- * phLoader: location to store loader handle on output.
+ * loader: location to store loader handle on output.
* Returns:
* 0: Success.
* Requires:
* COD module initialized.
* valid cod_mgr_obj.
- * phLoader != NULL.
+ * loader != NULL.
* Ensures:
*/
extern int cod_get_loader(struct cod_manager *cod_mgr_obj,
- struct dbll_tar_obj **phLoader);
+ struct dbll_tar_obj **loader);
/*
* ======== cod_get_section ========
* Called by the operating system to load the Bridge Driver for a
* 'Bridge device.
* Parameters:
- * phDevObject: Ptr to location to receive the device object handle.
+ * device_obj: Ptr to location to receive the device object handle.
* driver_file_name: Name of Bridge driver PE DLL file to load. If the
* absolute path is not provided, the file is loaded
* through 'Bridge's module search path.
* -ESPIPE: Unable to load ZL DLL.
* Requires:
* DEV Initialized.
- * phDevObject != NULL.
+ * device_obj != NULL.
* driver_file_name != NULL.
* pHostConfig != NULL.
* pDspConfig != NULL.
* Ensures:
- * 0: *phDevObject will contain handle to the new device object.
+ * 0: *device_obj will contain handle to the new device object.
* Otherwise, does not create the device object, ensures the Bridge driver
- * module is unloaded, and sets *phDevObject to NULL.
+ * module is unloaded, and sets *device_obj to NULL.
*/
extern int dev_create_device(OUT struct dev_object
- **phDevObject,
+ **device_obj,
IN CONST char *driver_file_name,
struct cfg_devnode *dev_node_obj);
* Purpose:
* Called by the operating system to load the Bridge Driver for IVA.
* Parameters:
- * phDevObject: Ptr to location to receive the device object handle.
+ * device_obj: Ptr to location to receive the device object handle.
* driver_file_name: Name of Bridge driver PE DLL file to load. If the
* absolute path is not provided, the file is loaded
* through 'Bridge's module search path.
* -ESPIPE: Unable to load ZL DLL.
* Requires:
* DEV Initialized.
- * phDevObject != NULL.
+ * device_obj != NULL.
* driver_file_name != NULL.
* pHostConfig != NULL.
* pDspConfig != NULL.
* Ensures:
- * 0: *phDevObject will contain handle to the new device object.
+ * 0: *device_obj will contain handle to the new device object.
* Otherwise, does not create the device object, ensures the Bridge driver
- * module is unloaded, and sets *phDevObject to NULL.
+ * module is unloaded, and sets *device_obj to NULL.
*/
extern int dev_create_iva_device(OUT struct dev_object
- **phDevObject,
+ **device_obj,
IN CONST char *driver_file_name,
IN CONST struct cfg_hostres
*pHostConfig,
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phMgr: Ptr to location to store handle.
+ * *mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phMgr != NULL.
+ * mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phMgr contains a handle to a channel manager object,
+ * 0: *mgr contains a handle to a channel manager object,
* or NULL.
- * else: *phMgr is NULL.
+ * else: *mgr is NULL.
*/
extern int dev_get_chnl_mgr(struct dev_object *hdev_obj,
- OUT struct chnl_mgr **phMgr);
+ OUT struct chnl_mgr **mgr);
/*
* ======== dev_get_cmm_mgr ========
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phMgr: Ptr to location to store handle.
+ * *mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phMgr != NULL.
+ * mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phMgr contains a handle to a channel manager object,
+ * 0: *mgr contains a handle to a channel manager object,
* or NULL.
- * else: *phMgr is NULL.
+ * else: *mgr is NULL.
*/
extern int dev_get_cmm_mgr(struct dev_object *hdev_obj,
- OUT struct cmm_object **phMgr);
+ OUT struct cmm_object **mgr);
/*
* ======== dev_get_dmm_mgr ========
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phMgr: Ptr to location to store handle.
+ * *mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phMgr != NULL.
+ * mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phMgr contains a handle to a channel manager object,
+ * 0: *mgr contains a handle to a channel manager object,
* or NULL.
- * else: *phMgr is NULL.
+ * else: *mgr is NULL.
*/
extern int dev_get_dmm_mgr(struct dev_object *hdev_obj,
- OUT struct dmm_object **phMgr);
+ OUT struct dmm_object **mgr);
/*
* ======== dev_get_cod_mgr ========
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * phDevNode: Ptr to location to get the device node handle.
+ * dev_nde: Ptr to location to get the device node handle.
* Returns:
* 0: Returns a DEVNODE in *dev_node_obj.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phDevNode != NULL.
+ * dev_nde != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phDevNode contains a platform specific device ID;
- * else: *phDevNode is NULL.
+ * 0: *dev_nde contains a platform specific device ID;
+ * else: *dev_nde is NULL.
*/
extern int dev_get_dev_node(struct dev_object *hdev_obj,
- OUT struct cfg_devnode **phDevNode);
+ OUT struct cfg_devnode **dev_nde);
/*
* ======== dev_get_dev_type ========
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * phDevNode: Ptr to location to get the device node handle.
+ * dev_nde: Ptr to location to get the device node handle.
* Returns:
* 0: Success
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phDevNode != NULL.
+ * dev_nde != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phDevNode contains a platform specific device ID;
- * else: *phDevNode is NULL.
+ * 0: *dev_nde contains a platform specific device ID;
+ * else: *dev_nde is NULL.
*/
extern int dev_get_dev_type(struct dev_object *device_obj,
u8 *dev_type);
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phMgr: Ptr to location to store handle.
+ * *mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phMgr != NULL.
+ * mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phMgr contains a handle to an IO manager object.
- * else: *phMgr is NULL.
+ * 0: *mgr contains a handle to an IO manager object.
+ * else: *mgr is NULL.
*/
extern int dev_get_io_mgr(struct dev_object *hdev_obj,
- OUT struct io_mgr **phMgr);
+ OUT struct io_mgr **mgr);
/*
* ======== dev_get_next ========
* Retrieve the msg_ctrl Manager Handle from the DevObject.
* Parameters:
* hdev_obj: Handle to the Dev Object
- * phMsgMgr: Location where msg_ctrl Manager handle will be returned.
+ * msg_man: Location where msg_ctrl Manager handle will be returned.
* Returns:
* Requires:
* DEV Initialized.
* Ensures:
*/
extern void dev_get_msg_mgr(struct dev_object *hdev_obj,
- OUT struct msg_mgr **phMsgMgr);
+ OUT struct msg_mgr **msg_man);
/*
* ========= dev_get_node_manager ========
* Manager object should have exactly one NODE Dispatcher.
*
* Parameters:
- * phDispObject: Location to store node dispatcher object on output.
+ * dispatch_obj: Location to store node dispatcher object on output.
* hdev_obj: Device for this processor.
* disp_attrs: Node dispatcher attributes.
* Returns:
* disp_init(void) called.
* disp_attrs != NULL.
* hdev_obj != NULL.
- * phDispObject != NULL.
+ * dispatch_obj != NULL.
* Ensures:
- * 0: IS_VALID(*phDispObject).
- * error: *phDispObject == NULL.
+ * 0: IS_VALID(*dispatch_obj).
+ * error: *dispatch_obj == NULL.
*/
-extern int disp_create(OUT struct disp_object **phDispObject,
+extern int disp_create(OUT struct disp_object **dispatch_obj,
struct dev_object *hdev_obj,
IN CONST struct disp_attr *disp_attrs);
*/
extern int dmm_get_handle(void *hprocessor,
- OUT struct dmm_object **phDmmMgr);
+ OUT struct dmm_object **dmm_manager);
extern int dmm_reserve_memory(struct dmm_object *dmm_mgr,
u32 size, u32 *prsv_addr);
extern int dmm_delete_tables(struct dmm_object *dmm_mgr);
-extern int dmm_create(OUT struct dmm_object **phDmmMgr,
+extern int dmm_create(OUT struct dmm_object **dmm_manager,
struct dev_object *hdev_obj,
IN CONST struct dmm_mgrattrs *pMgrAttrs);
* Creates the Driver Object. This is done during the driver loading.
* There is only one Driver Object in the DSP/BIOS Bridge.
* Parameters:
- * phDrvObject: Location to store created DRV Object handle.
+ * drv_obj: Location to store created DRV Object handle.
* Returns:
* 0: Sucess
* -ENOMEM: Failed in Memory allocation
* -EPERM: General Failure
* Requires:
* DRV Initialized (refs > 0 )
- * phDrvObject != NULL.
+ * drv_obj != NULL.
* Ensures:
- * 0: - *phDrvObject is a valid DRV interface to the device.
+ * 0: - *drv_obj is a valid DRV interface to the device.
* - List of DevObject Created and Initialized.
* - List of dev_node String created and intialized.
* - Registry is updated with the DRV Object.
* Also it can hold other neccessary
* information in its storage area.
*/
-extern int drv_create(struct drv_object **phDrvObject);
+extern int drv_create(struct drv_object **drv_obj);
/*
* ======== drv_destroy ========
* Given a index, returns a handle to DevObject from the list
* Parameters:
* hdrv_obj: Handle to the Manager
- * phDevObject: Location to store the Dev Handle
+ * device_obj: Location to store the Dev Handle
* Requires:
* DRV Initialized
* index >= 0
* hdrv_obj is not NULL and Valid DRV Object
- * phDevObject is not NULL
+ * device_obj is not NULL
* Device Object List not Empty
* Returns:
* 0: Success
* -EPERM: Failed to Get the Dev Object
* Ensures:
- * 0: *phDevObject != NULL
- * -EPERM: *phDevObject = NULL
+ * 0: *device_obj != NULL
+ * -EPERM: *device_obj = NULL
*/
extern int drv_get_dev_object(u32 index,
struct drv_object *hdrv_obj,
- struct dev_object **phDevObject);
+ struct dev_object **device_obj);
/*
* ======== drv_get_next_dev_object ========
* Purpose:
* Complete creation of the device object for this board.
* Parameters:
- * phDevContext: Ptr to location to store a Bridge device context.
+ * device_ctx: Ptr to location to store a Bridge device context.
* hdev_obj: Handle to a Device Object, created and managed by DSP API.
* config_param: Ptr to configuration parameters provided by the
* Configuration Manager during device loading.
* 0: Success.
* -ENOMEM: Unable to allocate memory for device context.
* Requires:
- * phDevContext != NULL;
+ * device_ctx != NULL;
* hdev_obj != NULL;
* config_param != NULL;
* pDspConfig != NULL;
* structure.
*/
typedef int(*fxn_dev_create) (OUT struct bridge_dev_context
- **phDevContext,
+ **device_ctx,
struct dev_object
* hdev_obj,
IN struct cfg_hostres
* Purpose:
* Create an object that manages I/O between CHNL and msg_ctrl.
* Parameters:
- * phIOMgr: Location to store IO manager on output.
+ * io_man: Location to store IO manager on output.
* hchnl_mgr: Handle to channel manager.
* hmsg_mgr: Handle to message manager.
* Returns:
* Channel manager already created;
* Message manager already created;
* pMgrAttrs != NULL;
- * phIOMgr != NULL;
+ * io_man != NULL;
* Ensures:
*/
-typedef int(*fxn_io_create) (OUT struct io_mgr **phIOMgr,
+typedef int(*fxn_io_create) (OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs);
* Create an object to manage message queues. Only one of these objects
* can exist per device object.
* Parameters:
- * phMsgMgr: Location to store msg_ctrl manager on output.
+ * msg_man: Location to store msg_ctrl manager on output.
* hdev_obj: Handle to a device object.
* msg_callback: Called whenever an RMS_EXIT message is received.
* Returns:
* 0: Success.
* -ENOMEM: Insufficient memory.
* Requires:
- * phMsgMgr != NULL.
+ * msg_man != NULL.
* msg_callback != NULL.
* hdev_obj != NULL.
* Ensures:
*/
typedef int(*fxn_msg_create)
- (OUT struct msg_mgr **phMsgMgr,
+ (OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj, msg_onexit msg_callback);
/*
* Parameters:
* hmsg_mgr: msg_ctrl queue manager handle returned from
* bridge_msg_create.
- * phMsgQueue: Location to store msg_ctrl queue on output.
+ * msgq: Location to store msg_ctrl queue on output.
* msgq_id: Identifier for messages (node environment pointer).
* max_msgs: Max number of simultaneous messages for the node.
* h: Handle passed to hmsg_mgr->msg_callback().
* 0: Success.
* -ENOMEM: Insufficient memory.
* Requires:
- * phMsgQueue != NULL.
+ * msgq != NULL.
* h != NULL.
* max_msgs > 0.
* Ensures:
- * phMsgQueue !=NULL <==> 0.
+ * msgq !=NULL <==> 0.
*/
typedef int(*fxn_msg_createqueue)
(struct msg_mgr *hmsg_mgr,
- OUT struct msg_queue **phMsgQueue, u32 msgq_id, u32 max_msgs, void *h);
+ OUT struct msg_queue **msgq, u32 msgq_id, u32 max_msgs, void *h);
/*
* ======== bridge_msg_delete ========
#include <dspbridge/devdefs.h>
#include <dspbridge/iodefs.h>
-extern int bridge_io_create(OUT struct io_mgr **phIOMgr,
+extern int bridge_io_create(OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs);
#include <dspbridge/msgdefs.h>
-extern int bridge_msg_create(OUT struct msg_mgr **phMsgMgr,
+extern int bridge_msg_create(OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj,
msg_onexit msg_callback);
extern int bridge_msg_create_queue(struct msg_mgr *hmsg_mgr,
- OUT struct msg_queue **phMsgQueue,
+ OUT struct msg_queue **msgq,
u32 msgq_id, u32 max_msgs, void *h);
extern void bridge_msg_delete(struct msg_mgr *hmsg_mgr);
* Invalid base address for DSP communications.
* Requires:
* io_init(void) called.
- * phIOMgr != NULL.
+ * io_man != NULL.
* pMgrAttrs != NULL.
* Ensures:
*/
-extern int io_create(OUT struct io_mgr **phIOMgr,
+extern int io_create(OUT struct io_mgr **io_man,
struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs);
* Creates the Manager Object. This is done during the driver loading.
* There is only one Manager Object in the DSP/BIOS Bridge.
* Parameters:
- * phMgrObject: Location to store created MGR Object handle.
+ * mgr_obj: Location to store created MGR Object handle.
* dev_node_obj: Device object as known to the system.
* Returns:
* 0: Success
* -EPERM: General Failure
* Requires:
* MGR Initialized (refs > 0 )
- * phMgrObject != NULL.
+ * mgr_obj != NULL.
* Ensures:
- * 0: *phMgrObject is a valid MGR interface to the device.
+ * 0: *mgr_obj is a valid MGR interface to the device.
* MGR Object stores the DCD Manager Handle.
* MGR Object stored in the Regsitry.
* !0: MGR Object not created
* can exist per device object. The msg_ctrl manager must be created before
* the IO Manager.
* Parameters:
- * phMsgMgr: Location to store msg_ctrl manager handle on output.
+ * msg_man: Location to store msg_ctrl manager handle on output.
* hdev_obj: The device object.
* msg_callback: Called whenever an RMS_EXIT message is received.
* Returns:
* Requires:
* msg_mod_init(void) called.
- * phMsgMgr != NULL.
+ * msg_man != NULL.
* hdev_obj != NULL.
* msg_callback != NULL.
* Ensures:
*/
-extern int msg_create(OUT struct msg_mgr **phMsgMgr,
+extern int msg_create(OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj,
msg_onexit msg_callback);
extern int nldr_allocate(struct nldr_object *nldr_obj,
void *priv_ref, IN CONST struct dcd_nodeprops
*node_props,
- OUT struct nldr_nodeobject **phNldrNode,
+ OUT struct nldr_nodeobject **nldr_nodeobj,
IN bool *pf_phase_split);
extern int nldr_create(OUT struct nldr_object **phNldr,
* nldr_obj: Handle of loader that will load the node.
* priv_ref: Handle to identify the node.
* node_props: Pointer to a dcd_nodeprops for the node.
- * phNldrNode: Location to store node handle on output. This handle
+ * nldr_nodeobj: Location to store node handle on output. This handle
* will be passed to nldr_load/nldr_unload.
* pf_phase_split: pointer to int variable referenced in node.c
* Returns:
* nldr_init(void) called.
* Valid nldr_obj.
* node_props != NULL.
- * phNldrNode != NULL.
+ * nldr_nodeobj != NULL.
* Ensures:
- * 0: IsValidNode(*phNldrNode).
- * error: *phNldrNode == NULL.
+ * 0: IsValidNode(*nldr_nodeobj).
+ * error: *nldr_nodeobj == NULL.
*/
typedef int(*nldr_allocatefxn) (struct nldr_object *nldr_obj,
void *priv_ref,
IN CONST struct dcd_nodeprops
* node_props,
OUT struct nldr_nodeobject
- **phNldrNode,
+ **nldr_nodeobj,
OUT bool *pf_phase_split);
/*
* Returns the DEV Hanlde for a given Processor handle
* Parameters:
* hprocessor : Processor Handle
- * phDevObject : Location to store the DEV Handle.
+ * device_obj : Location to store the DEV Handle.
* Returns:
- * 0 : Success; *phDevObject has Dev handle
- * -EPERM : Failure; *phDevObject is zero.
+ * 0 : Success; *device_obj has Dev handle
+ * -EPERM : Failure; *device_obj is zero.
* Requires:
- * phDevObject is not NULL
+ * device_obj is not NULL
* PROC Initialized.
* Ensures:
- * 0 : *phDevObject is not NULL
- * -EPERM : *phDevObject is NULL.
+ * 0 : *device_obj is not NULL
+ * -EPERM : *device_obj is NULL.
*/
extern int proc_get_dev_object(void *hprocessor,
- struct dev_object **phDevObject);
+ struct dev_object **device_obj);
/*
* ======== proc_init ========
* dynamically loaded object files.
*
*/
-int cod_create(OUT struct cod_manager **phMgr, char *pstrDummyFile,
+int cod_create(OUT struct cod_manager **mgr, char *pstrDummyFile,
IN OPTIONAL CONST struct cod_attrs *attrs)
{
struct cod_manager *mgr_new;
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMgr != NULL);
+ DBC_REQUIRE(mgr != NULL);
/* assume failure */
- *phMgr = NULL;
+ *mgr = NULL;
/* we don't support non-default attrs yet */
if (attrs != NULL)
}
/* return the new manager */
- *phMgr = mgr_new;
+ *mgr = mgr_new;
return 0;
}
* Get handle to the DBLL loader.
*/
int cod_get_loader(struct cod_manager *cod_mgr_obj,
- struct dbll_tar_obj **phLoader)
+ struct dbll_tar_obj **loader)
{
int status = 0;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(cod_mgr_obj));
- DBC_REQUIRE(phLoader != NULL);
+ DBC_REQUIRE(loader != NULL);
- *phLoader = (struct dbll_tar_obj *)cod_mgr_obj->target;
+ *loader = (struct dbll_tar_obj *)cod_mgr_obj->target;
return status;
}
* Called by the operating system to load the PM Bridge Driver for a
* PM board (device).
*/
-int dev_create_device(OUT struct dev_object **phDevObject,
+int dev_create_device(OUT struct dev_object **device_obj,
IN CONST char *driver_file_name,
struct cfg_devnode *dev_node_obj)
{
struct drv_object *hdrv_obj = NULL;
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDevObject != NULL);
+ DBC_REQUIRE(device_obj != NULL);
DBC_REQUIRE(driver_file_name != NULL);
status = drv_request_bridge_res_dsp((void *)&host_res);
/* If all went well, return a handle to the dev object;
* else, cleanup and return NULL in the OUT parameter. */
if (DSP_SUCCEEDED(status)) {
- *phDevObject = dev_obj;
+ *device_obj = dev_obj;
} else {
if (dev_obj) {
kfree(dev_obj->proc_list);
kfree(dev_obj);
}
- *phDevObject = NULL;
+ *device_obj = NULL;
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && *phDevObject) ||
- (DSP_FAILED(status) && !*phDevObject));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *device_obj) ||
+ (DSP_FAILED(status) && !*device_obj));
return status;
}
* device.
*/
int dev_get_chnl_mgr(struct dev_object *hdev_obj,
- OUT struct chnl_mgr **phMgr)
+ OUT struct chnl_mgr **mgr)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMgr != NULL);
+ DBC_REQUIRE(mgr != NULL);
if (hdev_obj) {
- *phMgr = dev_obj->hchnl_mgr;
+ *mgr = dev_obj->hchnl_mgr;
} else {
- *phMgr = NULL;
+ *mgr = NULL;
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phMgr != NULL) &&
- (*phMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((mgr != NULL) &&
+ (*mgr == NULL)));
return status;
}
* device.
*/
int dev_get_cmm_mgr(struct dev_object *hdev_obj,
- OUT struct cmm_object **phMgr)
+ OUT struct cmm_object **mgr)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMgr != NULL);
+ DBC_REQUIRE(mgr != NULL);
if (hdev_obj) {
- *phMgr = dev_obj->hcmm_mgr;
+ *mgr = dev_obj->hcmm_mgr;
} else {
- *phMgr = NULL;
+ *mgr = NULL;
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phMgr != NULL) &&
- (*phMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((mgr != NULL) &&
+ (*mgr == NULL)));
return status;
}
* device.
*/
int dev_get_dmm_mgr(struct dev_object *hdev_obj,
- OUT struct dmm_object **phMgr)
+ OUT struct dmm_object **mgr)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMgr != NULL);
+ DBC_REQUIRE(mgr != NULL);
if (hdev_obj) {
- *phMgr = dev_obj->dmm_mgr;
+ *mgr = dev_obj->dmm_mgr;
} else {
- *phMgr = NULL;
+ *mgr = NULL;
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phMgr != NULL) &&
- (*phMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((mgr != NULL) &&
+ (*mgr == NULL)));
return status;
}
* Retrieve the platform specific device ID for this device.
*/
int dev_get_dev_node(struct dev_object *hdev_obj,
- OUT struct cfg_devnode **phDevNode)
+ OUT struct cfg_devnode **dev_nde)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDevNode != NULL);
+ DBC_REQUIRE(dev_nde != NULL);
if (hdev_obj) {
- *phDevNode = dev_obj->dev_node_obj;
+ *dev_nde = dev_obj->dev_node_obj;
} else {
- *phDevNode = NULL;
+ *dev_nde = NULL;
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phDevNode != NULL) &&
- (*phDevNode == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((dev_nde != NULL) &&
+ (*dev_nde == NULL)));
return status;
}
* ========= dev_get_io_mgr ========
*/
int dev_get_io_mgr(struct dev_object *hdev_obj,
- OUT struct io_mgr **phIOMgr)
+ OUT struct io_mgr **io_man)
{
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phIOMgr != NULL);
+ DBC_REQUIRE(io_man != NULL);
DBC_REQUIRE(hdev_obj);
if (hdev_obj) {
- *phIOMgr = hdev_obj->hio_mgr;
+ *io_man = hdev_obj->hio_mgr;
} else {
- *phIOMgr = NULL;
+ *io_man = NULL;
status = -EFAULT;
}
/*
* ========= dev_get_msg_mgr ========
*/
-void dev_get_msg_mgr(struct dev_object *hdev_obj, OUT struct msg_mgr **phMsgMgr)
+void dev_get_msg_mgr(struct dev_object *hdev_obj, OUT struct msg_mgr **msg_man)
{
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMsgMgr != NULL);
+ DBC_REQUIRE(msg_man != NULL);
DBC_REQUIRE(hdev_obj);
- *phMsgMgr = hdev_obj->hmsg_mgr;
+ *msg_man = hdev_obj->hmsg_mgr;
}
/*
* Purpose:
* Create a dynamic memory manager object.
*/
-int dmm_create(OUT struct dmm_object **phDmmMgr,
+int dmm_create(OUT struct dmm_object **dmm_manager,
struct dev_object *hdev_obj,
IN CONST struct dmm_mgrattrs *pMgrAttrs)
{
struct dmm_object *dmm_obj = NULL;
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDmmMgr != NULL);
+ DBC_REQUIRE(dmm_manager != NULL);
- *phDmmMgr = NULL;
+ *dmm_manager = NULL;
/* create, zero, and tag a cmm mgr object */
dmm_obj = kzalloc(sizeof(struct dmm_object), GFP_KERNEL);
if (dmm_obj != NULL) {
spin_lock_init(&dmm_obj->dmm_lock);
- *phDmmMgr = dmm_obj;
+ *dmm_manager = dmm_obj;
} else {
status = -ENOMEM;
}
* Return the dynamic memory manager object for this device.
* This is typically called from the client process.
*/
-int dmm_get_handle(void *hprocessor, OUT struct dmm_object **phDmmMgr)
+int dmm_get_handle(void *hprocessor, OUT struct dmm_object **dmm_manager)
{
int status = 0;
struct dev_object *hdev_obj;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDmmMgr != NULL);
+ DBC_REQUIRE(dmm_manager != NULL);
if (hprocessor != NULL)
status = proc_get_dev_object(hprocessor, &hdev_obj);
else
hdev_obj = dev_get_first(); /* default */
if (DSP_SUCCEEDED(status))
- status = dev_get_dmm_mgr(hdev_obj, phDmmMgr);
+ status = dev_get_dmm_mgr(hdev_obj, dmm_manager);
return status;
}
* Create an IO manager object, responsible for managing IO between
* CHNL and msg_ctrl
*/
-int io_create(OUT struct io_mgr **phIOMgr, struct dev_object *hdev_obj,
+int io_create(OUT struct io_mgr **io_man, struct dev_object *hdev_obj,
IN CONST struct io_attrs *pMgrAttrs)
{
struct bridge_drv_interface *intf_fxns;
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phIOMgr != NULL);
+ DBC_REQUIRE(io_man != NULL);
DBC_REQUIRE(pMgrAttrs != NULL);
- *phIOMgr = NULL;
+ *io_man = NULL;
/* A memory base of 0 implies no memory base: */
if ((pMgrAttrs->shm_base != 0) && (pMgrAttrs->usm_length == 0))
pio_mgr->hdev_obj = hdev_obj;
/* Return the new channel manager handle: */
- *phIOMgr = hio_mgr;
+ *io_man = hio_mgr;
}
}
* Create an object to manage message queues. Only one of these objects
* can exist per device object.
*/
-int msg_create(OUT struct msg_mgr **phMsgMgr,
+int msg_create(OUT struct msg_mgr **msg_man,
struct dev_object *hdev_obj, msg_onexit msg_callback)
{
struct bridge_drv_interface *intf_fxns;
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phMsgMgr != NULL);
+ DBC_REQUIRE(msg_man != NULL);
DBC_REQUIRE(msg_callback != NULL);
DBC_REQUIRE(hdev_obj != NULL);
- *phMsgMgr = NULL;
+ *msg_man = NULL;
dev_get_intf_fxns(hdev_obj, &intf_fxns);
msg_mgr_obj->intf_fxns = intf_fxns;
/* Finally, return the new message manager handle: */
- *phMsgMgr = hmsg_mgr;
+ *msg_man = hmsg_mgr;
} else {
status = -EPERM;
}
* ======== disp_create ========
* Create a NODE Dispatcher object.
*/
-int disp_create(OUT struct disp_object **phDispObject,
+int disp_create(OUT struct disp_object **dispatch_obj,
struct dev_object *hdev_obj,
IN CONST struct disp_attr *disp_attrs)
{
u8 dev_type;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDispObject != NULL);
+ DBC_REQUIRE(dispatch_obj != NULL);
DBC_REQUIRE(disp_attrs != NULL);
DBC_REQUIRE(hdev_obj != NULL);
- *phDispObject = NULL;
+ *dispatch_obj = NULL;
/* Allocate Node Dispatcher object */
disp_obj = kzalloc(sizeof(struct disp_object), GFP_KERNEL);
}
func_cont:
if (DSP_SUCCEEDED(status))
- *phDispObject = disp_obj;
+ *dispatch_obj = disp_obj;
else
delete_disp(disp_obj);
- DBC_ENSURE(((DSP_FAILED(status)) && ((*phDispObject == NULL))) ||
- ((DSP_SUCCEEDED(status)) && *phDispObject));
+ DBC_ENSURE(((DSP_FAILED(status)) && ((*dispatch_obj == NULL))) ||
+ ((DSP_SUCCEEDED(status)) && *dispatch_obj));
return status;
}
* Purpose:
* DRV Object gets created only once during Driver Loading.
*/
-int drv_create(OUT struct drv_object **phDRVObject)
+int drv_create(OUT struct drv_object **drv_obj)
{
int status = 0;
struct drv_object *pdrv_object = NULL;
- DBC_REQUIRE(phDRVObject != NULL);
+ DBC_REQUIRE(drv_obj != NULL);
DBC_REQUIRE(refs > 0);
pdrv_object = kzalloc(sizeof(struct drv_object), GFP_KERNEL);
if (DSP_SUCCEEDED(status))
status = cfg_set_object((u32) pdrv_object, REG_DRV_OBJECT);
if (DSP_SUCCEEDED(status)) {
- *phDRVObject = pdrv_object;
+ *drv_obj = pdrv_object;
} else {
kfree(pdrv_object->dev_list);
kfree(pdrv_object->dev_node_string);
* Given a index, returns a handle to DevObject from the list.
*/
int drv_get_dev_object(u32 index, struct drv_object *hdrv_obj,
- struct dev_object **phDevObject)
+ struct dev_object **device_obj)
{
int status = 0;
#ifdef CONFIG_TIDSPBRIDGE_DEBUG
struct dev_object *dev_obj;
u32 i;
DBC_REQUIRE(pdrv_obj);
- DBC_REQUIRE(phDevObject != NULL);
+ DBC_REQUIRE(device_obj != NULL);
DBC_REQUIRE(index >= 0);
DBC_REQUIRE(refs > 0);
DBC_ASSERT(!(LST_IS_EMPTY(pdrv_obj->dev_list)));
(struct dev_object *)drv_get_next_dev_object((u32) dev_obj);
}
if (dev_obj) {
- *phDevObject = (struct dev_object *)dev_obj;
+ *device_obj = (struct dev_object *)dev_obj;
} else {
- *phDevObject = NULL;
+ *device_obj = NULL;
status = -EPERM;
}
* Purpose:
* MGR Object gets created only once during driver Loading.
*/
-int mgr_create(OUT struct mgr_object **phMgrObject,
+int mgr_create(OUT struct mgr_object **mgr_obj,
struct cfg_devnode *dev_node_obj)
{
int status = 0;
struct mgr_object *pmgr_obj = NULL;
- DBC_REQUIRE(phMgrObject != NULL);
+ DBC_REQUIRE(mgr_obj != NULL);
DBC_REQUIRE(refs > 0);
pmgr_obj = kzalloc(sizeof(struct mgr_object), GFP_KERNEL);
/* If succeeded store the handle in the MGR Object */
status = cfg_set_object((u32) pmgr_obj, REG_MGR_OBJECT);
if (DSP_SUCCEEDED(status)) {
- *phMgrObject = pmgr_obj;
+ *mgr_obj = pmgr_obj;
} else {
dcd_destroy_manager(pmgr_obj->hdcd_mgr);
kfree(pmgr_obj);
*/
int nldr_allocate(struct nldr_object *nldr_obj, void *priv_ref,
IN CONST struct dcd_nodeprops *node_props,
- OUT struct nldr_nodeobject **phNldrNode,
+ OUT struct nldr_nodeobject **nldr_nodeobj,
IN bool *pf_phase_split)
{
struct nldr_nodeobject *nldr_node_obj = NULL;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(node_props != NULL);
- DBC_REQUIRE(phNldrNode != NULL);
+ DBC_REQUIRE(nldr_nodeobj != NULL);
DBC_REQUIRE(nldr_obj);
/* Initialize handle in case of failure */
- *phNldrNode = NULL;
+ *nldr_nodeobj = NULL;
/* Allocate node object */
nldr_node_obj = kzalloc(sizeof(struct nldr_nodeobject), GFP_KERNEL);
nldr_node_obj->overlay = true;
}
- *phNldrNode = (struct nldr_nodeobject *)nldr_node_obj;
+ *nldr_nodeobj = (struct nldr_nodeobject *)nldr_node_obj;
}
/* Cleanup on failure */
if (DSP_FAILED(status) && nldr_node_obj)
kfree(nldr_node_obj);
- DBC_ENSURE((DSP_SUCCEEDED(status) && *phNldrNode)
- || (DSP_FAILED(status) && *phNldrNode == NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *nldr_nodeobj)
+ || (DSP_FAILED(status) && *nldr_nodeobj == NULL));
return status;
}
*
*/
int proc_get_dev_object(void *hprocessor,
- struct dev_object **phDevObject)
+ struct dev_object **device_obj)
{
int status = -EPERM;
struct proc_object *p_proc_object = (struct proc_object *)hprocessor;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDevObject != NULL);
+ DBC_REQUIRE(device_obj != NULL);
if (p_proc_object) {
- *phDevObject = p_proc_object->hdev_obj;
+ *device_obj = p_proc_object->hdev_obj;
status = 0;
} else {
- *phDevObject = NULL;
+ *device_obj = NULL;
status = -EFAULT;
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && *phDevObject != NULL) ||
- (DSP_FAILED(status) && *phDevObject == NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *device_obj != NULL) ||
+ (DSP_FAILED(status) && *device_obj == NULL));
return status;
}