* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given board.
*/
-int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
+int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs)
{
u8 max_channels;
/* Check DBC requirements: */
- DBC_REQUIRE(phChnlMgr != NULL);
+ DBC_REQUIRE(channel_mgr != NULL);
DBC_REQUIRE(pMgrAttrs != NULL);
DBC_REQUIRE(pMgrAttrs->max_channels > 0);
DBC_REQUIRE(pMgrAttrs->max_channels <= CHNL_MAXCHANNELS);
if (DSP_FAILED(status)) {
bridge_chnl_destroy(chnl_mgr_obj);
- *phChnlMgr = NULL;
+ *channel_mgr = NULL;
} else {
/* Return channel manager object to caller... */
- *phChnlMgr = chnl_mgr_obj;
+ *channel_mgr = chnl_mgr_obj;
}
return status;
}
* ======== bridge_chnl_open ========
* Open a new half-duplex channel to the DSP board.
*/
-int bridge_chnl_open(OUT struct chnl_object **phChnl,
+int bridge_chnl_open(OUT struct chnl_object **chnl,
struct chnl_mgr *hchnl_mgr, s8 chnl_mode,
u32 uChnlId, CONST IN struct chnl_attr *pattrs)
{
struct chnl_object *pchnl = NULL;
struct sync_object *sync_event = NULL;
/* Ensure DBC requirements: */
- DBC_REQUIRE(phChnl != NULL);
+ DBC_REQUIRE(chnl != NULL);
DBC_REQUIRE(pattrs != NULL);
DBC_REQUIRE(hchnl_mgr != NULL);
- *phChnl = NULL;
+ *chnl = NULL;
/* Validate Args: */
if (pattrs->uio_reqs == 0) {
status = -EINVAL;
spin_unlock_bh(&chnl_mgr_obj->chnl_mgr_lock);
/* Return result... */
pchnl->dw_state = CHNL_STATEREADY;
- *phChnl = pchnl;
+ *chnl = pchnl;
}
func_end:
- DBC_ENSURE((DSP_SUCCEEDED(status) && pchnl) || (*phChnl == NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && pchnl) || (*chnl == NULL));
return status;
}
static int bridge_brd_start(struct bridge_dev_context *dev_context,
u32 dsp_addr);
static int bridge_brd_status(struct bridge_dev_context *dev_context,
- int *pdwState);
+ int *board_state);
static int bridge_brd_stop(struct bridge_dev_context *dev_context);
static int bridge_brd_write(struct bridge_dev_context *dev_context,
IN u8 *host_buff,
* Returns the board status.
*/
static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
- int *pdwState)
+ int *board_state)
{
struct bridge_dev_context *dev_context = dev_ctxt;
- *pdwState = dev_context->dw_brd_state;
+ *board_state = dev_context->dw_brd_state;
return 0;
}
* Purpose:
* Retrieves the version of the PM Class Driver.
* Parameters:
- * pdwVersion: Ptr to u32 to contain version number upon return.
+ * version: Ptr to u32 to contain version number upon return.
* Returns:
- * 0: Success. pdwVersion contains Class Driver version in
+ * 0: Success. version contains Class Driver version in
* the form: 0xAABBCCDD where AABB is Major version and
* CCDD is Minor.
* -EPERM: Failure.
* CFG initialized.
* Ensures:
* 0: Success.
- * else: *pdwVersion is NULL.
+ * else: *version is NULL.
*/
-extern int cfg_get_cd_version(OUT u32 *pdwVersion);
+extern int cfg_get_cd_version(OUT u32 *version);
/*
* ======== cfg_get_dev_object ========
* Parameters:
* dev_node_obj: Platform's dev_node handle from which to retrieve
* value.
- * pdwValue: Ptr to location to store the value.
+ * value: Ptr to location to store the value.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid or phDevObject is invalid.
* Requires:
* CFG initialized.
* Ensures:
- * 0: *pdwValue is set to the retrieved u32.
- * else: *pdwValue is set to 0L.
+ * 0: *value is set to the retrieved u32.
+ * else: *value is set to 0L.
*/
extern int cfg_get_dev_object(IN struct cfg_devnode *dev_node_obj,
- OUT u32 *pdwValue);
+ OUT u32 *value);
/*
* ======== cfg_get_exec_file ========
* Purpose:
* Retrieve the Driver Object handle From the Registry
* Parameters:
- * pdwValue: Ptr to location to store the value.
+ * value: Ptr to location to store the value.
* dw_type Type of Object to Get
* Returns:
* 0: Success.
* Requires:
* CFG initialized.
* Ensures:
- * 0: *pdwValue is set to the retrieved u32(non-Zero).
- * else: *pdwValue is set to 0L.
+ * 0: *value is set to the retrieved u32(non-Zero).
+ * else: *value is set to 0L.
*/
-extern int cfg_get_object(OUT u32 *pdwValue, u8 dw_type);
+extern int cfg_get_object(OUT u32 *value, u8 dw_type);
/*
* ======== cfg_get_perf_value ========
* Retrieve a flag indicating whether PERF should log statistics for the
* PM class driver.
* Parameters:
- * pfEnablePerf: Location to store flag. 0 indicates the key was
+ * enable_perf: Location to store flag. 0 indicates the key was
* not found, or had a zero value. A nonzero value
* means the key was found and had a nonzero value.
* Returns:
* Requires:
- * pfEnablePerf != NULL;
+ * enable_perf != NULL;
* Ensures:
*/
-extern void cfg_get_perf_value(OUT bool *pfEnablePerf);
+extern void cfg_get_perf_value(OUT bool *enable_perf);
/*
* ======== cfg_get_zl_file ========
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given board.
* Parameters:
- * phChnlMgr: Location to store a channel manager object on output.
+ * channel_mgr: Location to store a channel manager object on output.
* hdev_obj: Handle to a device object.
* pMgrAttrs: Channel manager attributes.
* pMgrAttrs->max_channels: Max channels
* -EEXIST: Channel manager already exists for this device.
* Requires:
* chnl_init(void) called.
- * phChnlMgr != NULL.
+ * channel_mgr != NULL.
* pMgrAttrs != NULL.
* Ensures:
* 0: Subsequent calls to chnl_create() for the same
* board without an intervening call to
* chnl_destroy() will fail.
*/
-extern int chnl_create(OUT struct chnl_mgr **phChnlMgr,
+extern int chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs);
* This function creates a DCD module manager.
* Parameters:
* pszZlDllName: Pointer to a DLL name string.
- * phDcdMgr: A pointer to a DCD manager handle.
+ * dcd_mgr: A pointer to a DCD manager handle.
* Returns:
* 0: Success.
* -ENOMEM: Unable to allocate memory for DCD manager handle.
* Requires:
* DCD initialized.
* pszZlDllName is non-NULL.
- * phDcdMgr is non-NULL.
+ * dcd_mgr is non-NULL.
* Ensures:
* A DCD manager handle is created.
*/
extern int dcd_create_manager(IN char *pszZlDllName,
- OUT struct dcd_manager **phDcdMgr);
+ OUT struct dcd_manager **dcd_mgr);
/*
* ======== dcd_destroy_manager ========
* uuid_obj: Pointer to a dsp_uuid that represents a unique DSP/BIOS
* Bridge object.
* pstrLibName: Buffer to hold library name.
- * pdwSize: Contains buffer size. Set to string size on output.
+ * buff_size: Contains buffer size. Set to string size on output.
* phase: Which phase to load
* phase_split: Are phases in multiple libraries
* Returns:
* Valid hdcd_mgr.
* pstrLibName != NULL.
* uuid_obj != NULL
- * pdwSize != NULL.
+ * buff_size != NULL.
* Ensures:
*/
extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
IN OUT char *pstrLibName,
- IN OUT u32 *pdwSize,
+ IN OUT u32 *buff_size,
IN enum nldr_phase phase,
OUT bool *phase_split);
extern bool dbll_init(void);
extern int dbll_load(struct dbll_library_obj *lib,
dbll_flags flags,
- struct dbll_attrs *attrs, u32 * pEntry);
+ struct dbll_attrs *attrs, u32 * entry);
extern int dbll_load_sect(struct dbll_library_obj *lib,
char *sectName, struct dbll_attrs *attrs);
extern int dbll_open(struct dbll_tar_obj *target, char *file,
* Requires:
* DBL initialized.
* Valid lib.
- * pEntry != NULL.
+ * entry != NULL.
* Ensures:
*/
typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib,
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *phCodMgr: Ptr to location to store handle.
+ * *cod_mgr: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phCodMgr != NULL.
+ * cod_mgr != NULL.
* DEV Initialized.
* Ensures:
- * 0: *phCodMgr contains a handle to a COD manager object.
- * else: *phCodMgr is NULL.
+ * 0: *cod_mgr contains a handle to a COD manager object.
+ * else: *cod_mgr is NULL.
*/
extern int dev_get_cod_mgr(struct dev_object *hdev_obj,
- OUT struct cod_manager **phCodMgr);
+ OUT struct cod_manager **cod_mgr);
/*
* ======== dev_get_deh_mgr ========
* Retrieve the DEH manager created for this device.
* Parameters:
* hdev_obj: Handle to device object created with dev_create_device().
- * *phDehMgr: Ptr to location to store handle.
+ * *deh_manager: Ptr to location to store handle.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * phDehMgr != NULL.
+ * deh_manager != NULL.
* DEH Initialized.
* Ensures:
- * 0: *phDehMgr contains a handle to a DEH manager object.
- * else: *phDehMgr is NULL.
+ * 0: *deh_manager contains a handle to a DEH manager object.
+ * else: *deh_manager is NULL.
*/
extern int dev_get_deh_mgr(struct dev_object *hdev_obj,
- OUT struct deh_mgr **phDehMgr);
+ OUT struct deh_mgr **deh_manager);
/*
* ======== dev_get_dev_node ========
#ifndef DSPCHNL_
#define DSPCHNL_
-extern int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
+extern int bridge_chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs
*pMgrAttrs);
extern int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr);
-extern int bridge_chnl_open(OUT struct chnl_object **phChnl,
+extern int bridge_chnl_open(OUT struct chnl_object **chnl,
struct chnl_mgr *hchnl_mgr,
s8 chnl_mode,
u32 uChnlId,
* Report the current state of the board.
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device context.
- * pdwState: Ptr to BRD status variable.
+ * board_state: Ptr to BRD status variable.
* Returns:
* 0:
* Requires:
- * pdwState != NULL;
+ * board_state != NULL;
* dev_ctxt != NULL
* Ensures:
- * *pdwState is one of {BRD_STOPPED, BRD_IDLE, BRD_RUNNING, BRD_UNKNOWN};
+ * *board_state is one of
+ * {BRD_STOPPED, BRD_IDLE, BRD_RUNNING, BRD_UNKNOWN};
*/
typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
- int *pdwState);
+ int *board_state);
/*
* ======== bridge_brd_read ========
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given 'Bridge board.
* Parameters:
- * phChnlMgr: Location to store a channel manager object on output.
+ * channel_mgr: Location to store a channel manager object on output.
* hdev_obj: Handle to a device object.
* pMgrAttrs: Channel manager attributes.
* pMgrAttrs->max_channels: Max channels
* -EIO: Unable to plug ISR for given IRQ.
* -EFAULT: Couldn't map physical address to a virtual one.
* Requires:
- * phChnlMgr != NULL.
+ * channel_mgr != NULL.
* pMgrAttrs != NULL
* pMgrAttrs field are all valid:
* 0 < max_channels <= CHNL_MAXCHANNELS.
* Ensures:
*/
typedef int(*fxn_chnl_create) (OUT struct chnl_mgr
- **phChnlMgr,
+ **channel_mgr,
struct dev_object
* hdev_obj,
IN CONST struct
* Purpose:
* Open a new half-duplex channel to the DSP board.
* Parameters:
- * phChnl: Location to store a channel object handle.
+ * chnl: Location to store a channel object handle.
* hchnl_mgr: Handle to channel manager, as returned by
* CHNL_GetMgr().
* chnl_mode: One of {CHNL_MODETODSP, CHNL_MODEFROMDSP} specifies
* -EIO: No free IO request packets available for
* queuing.
* Requires:
- * phChnl != NULL.
+ * chnl != NULL.
* pattrs != NULL.
* pattrs->event_obj is a valid event handle.
* pattrs->hReserved is the kernel mode handle for pattrs->event_obj.
* Ensures:
- * 0: *phChnl is a valid channel.
- * else: *phChnl is set to NULL if (phChnl != NULL);
+ * 0: *chnl is a valid channel.
+ * else: *chnl is set to NULL if (chnl != NULL);
*/
typedef int(*fxn_chnl_open) (OUT struct chnl_object
- **phChnl,
+ **chnl,
struct chnl_mgr *hchnl_mgr,
s8 chnl_mode,
u32 uChnlId,
* Create an IO manager object, responsible for managing IO between
* CHNL and msg_ctrl.
* Parameters:
- * phChnlMgr: Location to store a channel manager object on
+ * channel_mgr: Location to store a channel manager object on
* output.
* hdev_obj: Handle to a device object.
* pMgrAttrs: IO manager attributes.
* Parameters:
* pList: Pointer to list control structure.
* elem_list: Pointer to element in list to insert.
- * pElemExisting: Pointer to existing list element.
+ * elem_existing: Pointer to existing list element.
* Returns:
* Requires:
* - LST initialized.
* - pList != NULL.
* - elem_list != NULL.
- * - pElemExisting != NULL.
+ * - elem_existing != NULL.
* Ensures:
*/
static inline void lst_insert_before(struct lst_list *pList,
struct list_head *elem_list,
- struct list_head *pElemExisting)
+ struct list_head *elem_existing)
{
- if (pList && elem_list && pElemExisting)
- list_add_tail(elem_list, pElemExisting);
+ if (pList && elem_list && elem_existing)
+ list_add_tail(elem_list, elem_existing);
}
/*
* Retrieves the MGR handle. Accessor Function
* Parameters:
* mgr_handle: Handle to the Manager Object
- * phDCDHandle: Ptr to receive the DCD Handle.
+ * dcd_handle: Ptr to receive the DCD Handle.
* Returns:
* 0: Sucess
* -EPERM: Failure to get the Handle
* Requires:
* MGR is initialized.
- * phDCDHandle != NULL
+ * dcd_handle != NULL
* Ensures:
- * 0 and *phDCDHandle != NULL ||
- * -EPERM and *phDCDHandle == NULL
+ * 0 and *dcd_handle != NULL ||
+ * -EPERM and *dcd_handle == NULL
*/
extern int mgr_get_dcd_handle(IN struct mgr_object
- *mgr_handle, OUT u32 *phDCDHandle);
+ *mgr_handle, OUT u32 *dcd_handle);
/*
* ======== mgr_init ========
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given 'Bridge board.
*/
-int chnl_create(OUT struct chnl_mgr **phChnlMgr,
+int chnl_create(OUT struct chnl_mgr **channel_mgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs)
{
struct chnl_mgr_ *chnl_mgr_obj = NULL;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phChnlMgr != NULL);
+ DBC_REQUIRE(channel_mgr != NULL);
DBC_REQUIRE(pMgrAttrs != NULL);
- *phChnlMgr = NULL;
+ *channel_mgr = NULL;
/* Validate args: */
if ((0 < pMgrAttrs->max_channels) &&
chnl_mgr_obj = (struct chnl_mgr_ *)hchnl_mgr;
chnl_mgr_obj->intf_fxns = intf_fxns;
/* Finally, return the new channel manager handle: */
- *phChnlMgr = hchnl_mgr;
+ *channel_mgr = hchnl_mgr;
}
}
* ======== dbll_load ========
*/
int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
- struct dbll_attrs *attrs, u32 *pEntry)
+ struct dbll_attrs *attrs, u32 *entry)
{
struct dbll_library_obj *zl_lib = (struct dbll_library_obj *)lib;
struct dbll_tar_obj *dbzl;
bool opened_doff = false;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(zl_lib);
- DBC_REQUIRE(pEntry != NULL);
+ DBC_REQUIRE(entry != NULL);
DBC_REQUIRE(attrs != NULL);
/*
redefined_symbol = false;
status = -EILSEQ;
} else {
- *pEntry = zl_lib->entry;
+ *entry = zl_lib->entry;
}
}
}
DBC_ENSURE(DSP_FAILED(status) || zl_lib->load_ref > 0);
- dev_dbg(bridge, "%s: lib: %p flags: 0x%x pEntry: %p, status 0x%x\n",
- __func__, lib, flags, pEntry, status);
+ dev_dbg(bridge, "%s: lib: %p flags: 0x%x entry: %p, status 0x%x\n",
+ __func__, lib, flags, entry, status);
return status;
}
* Retrieve the COD manager create for this device.
*/
int dev_get_cod_mgr(struct dev_object *hdev_obj,
- OUT struct cod_manager **phCodMgr)
+ OUT struct cod_manager **cod_mgr)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phCodMgr != NULL);
+ DBC_REQUIRE(cod_mgr != NULL);
if (hdev_obj) {
- *phCodMgr = dev_obj->cod_mgr;
+ *cod_mgr = dev_obj->cod_mgr;
} else {
- *phCodMgr = NULL;
+ *cod_mgr = NULL;
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((phCodMgr != NULL) &&
- (*phCodMgr == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((cod_mgr != NULL) &&
+ (*cod_mgr == NULL)));
return status;
}
* ========= dev_get_deh_mgr ========
*/
int dev_get_deh_mgr(struct dev_object *hdev_obj,
- OUT struct deh_mgr **phDehMgr)
+ OUT struct deh_mgr **deh_manager)
{
int status = 0;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDehMgr != NULL);
+ DBC_REQUIRE(deh_manager != NULL);
DBC_REQUIRE(hdev_obj);
if (hdev_obj) {
- *phDehMgr = hdev_obj->hdeh_mgr;
+ *deh_manager = hdev_obj->hdeh_mgr;
} else {
- *phDehMgr = NULL;
+ *deh_manager = NULL;
status = -EFAULT;
}
return status;
static s32 atoi(char *psz_buf);
static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
enum dsp_dcdobjtype obj_type,
- struct dcd_genericobj *pGenObj);
+ struct dcd_genericobj *gen_obj);
static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 char_size);
static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size);
static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
* Creates DCD manager.
*/
int dcd_create_manager(IN char *pszZlDllName,
- OUT struct dcd_manager **phDcdMgr)
+ OUT struct dcd_manager **dcd_mgr)
{
struct cod_manager *cod_mgr; /* COD manager handle */
struct dcd_manager *dcd_mgr_obj = NULL; /* DCD Manager pointer */
int status = 0;
DBC_REQUIRE(refs >= 0);
- DBC_REQUIRE(phDcdMgr);
+ DBC_REQUIRE(dcd_mgr);
status = cod_create(&cod_mgr, pszZlDllName, NULL);
if (DSP_FAILED(status))
dcd_mgr_obj->cod_mgr = cod_mgr;
/* Return handle to this DCD interface. */
- *phDcdMgr = dcd_mgr_obj;
+ *dcd_mgr = dcd_mgr_obj;
} else {
status = -ENOMEM;
*/
int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- IN OUT char *pstrLibName, IN OUT u32 * pdwSize,
+ IN OUT char *pstrLibName,
+ IN OUT u32 *buff_size,
enum nldr_phase phase, OUT bool *phase_split)
{
char sz_reg_key[DCD_MAXPATHLENGTH];
DBC_REQUIRE(uuid_obj != NULL);
DBC_REQUIRE(pstrLibName != NULL);
- DBC_REQUIRE(pdwSize != NULL);
+ DBC_REQUIRE(buff_size != NULL);
DBC_REQUIRE(hdcd_mgr);
- dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, pstrLibName %p, pdwSize "
- "%p\n", __func__, hdcd_mgr, uuid_obj, pstrLibName, pdwSize);
+ dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, pstrLibName %p,"
+ " buff_size %p\n", __func__, hdcd_mgr, uuid_obj, pstrLibName,
+ buff_size);
/*
* Pre-determine final key length. It's length of DCD_REGKEY +
*/
static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
enum dsp_dcdobjtype obj_type,
- struct dcd_genericobj *pGenObj)
+ struct dcd_genericobj *gen_obj)
{
int status = 0;
char seps[] = ", ";
DBC_REQUIRE(ul_buf_size != 0);
DBC_REQUIRE((obj_type == DSP_DCDNODETYPE)
|| (obj_type == DSP_DCDPROCESSORTYPE));
- DBC_REQUIRE(pGenObj != NULL);
+ DBC_REQUIRE(gen_obj != NULL);
switch (obj_type) {
case DSP_DCDNODETYPE:
token = strsep(&psz_cur, seps);
/* u32 cb_struct */
- pGenObj->obj_data.node_obj.ndb_props.cb_struct =
+ gen_obj->obj_data.node_obj.ndb_props.cb_struct =
(u32) atoi(token);
token = strsep(&psz_cur, seps);
/* dsp_uuid ui_node_id */
uuid_uuid_from_string(token,
- &pGenObj->obj_data.node_obj.ndb_props.
+ &gen_obj->obj_data.node_obj.ndb_props.
ui_node_id);
token = strsep(&psz_cur, seps);
if (token_len > DSP_MAXNAMELEN - 1)
token_len = DSP_MAXNAMELEN - 1;
- strncpy(pGenObj->obj_data.node_obj.ndb_props.ac_name,
+ strncpy(gen_obj->obj_data.node_obj.ndb_props.ac_name,
token, token_len);
- pGenObj->obj_data.node_obj.ndb_props.ac_name[token_len] = '\0';
+ gen_obj->obj_data.node_obj.ndb_props.ac_name[token_len] = '\0';
token = strsep(&psz_cur, seps);
/* u32 ntype */
- pGenObj->obj_data.node_obj.ndb_props.ntype = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.ntype = atoi(token);
token = strsep(&psz_cur, seps);
/* u32 cache_on_gpp */
- pGenObj->obj_data.node_obj.ndb_props.cache_on_gpp = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.cache_on_gpp = atoi(token);
token = strsep(&psz_cur, seps);
/* dsp_resourcereqmts dsp_resource_reqmts */
- pGenObj->obj_data.node_obj.ndb_props.dsp_resource_reqmts.
+ gen_obj->obj_data.node_obj.ndb_props.dsp_resource_reqmts.
cb_struct = (u32) atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.static_data_size = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.global_data_size = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.program_mem_size = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.uwc_execution_time = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.uwc_period = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.uwc_deadline = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.avg_exection_time = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.node_obj.ndb_props.
+ gen_obj->obj_data.node_obj.ndb_props.
dsp_resource_reqmts.minimum_period = atoi(token);
token = strsep(&psz_cur, seps);
/* s32 prio */
- pGenObj->obj_data.node_obj.ndb_props.prio = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.prio = atoi(token);
token = strsep(&psz_cur, seps);
/* u32 stack_size */
- pGenObj->obj_data.node_obj.ndb_props.stack_size = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.stack_size = atoi(token);
token = strsep(&psz_cur, seps);
/* u32 sys_stack_size */
- pGenObj->obj_data.node_obj.ndb_props.sys_stack_size =
+ gen_obj->obj_data.node_obj.ndb_props.sys_stack_size =
atoi(token);
token = strsep(&psz_cur, seps);
/* u32 stack_seg */
- pGenObj->obj_data.node_obj.ndb_props.stack_seg = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.stack_seg = atoi(token);
token = strsep(&psz_cur, seps);
/* u32 message_depth */
- pGenObj->obj_data.node_obj.ndb_props.message_depth =
+ gen_obj->obj_data.node_obj.ndb_props.message_depth =
atoi(token);
token = strsep(&psz_cur, seps);
/* u32 num_input_streams */
- pGenObj->obj_data.node_obj.ndb_props.num_input_streams =
+ gen_obj->obj_data.node_obj.ndb_props.num_input_streams =
atoi(token);
token = strsep(&psz_cur, seps);
/* u32 num_output_streams */
- pGenObj->obj_data.node_obj.ndb_props.num_output_streams =
+ gen_obj->obj_data.node_obj.ndb_props.num_output_streams =
atoi(token);
token = strsep(&psz_cur, seps);
/* u32 utimeout */
- pGenObj->obj_data.node_obj.ndb_props.utimeout = atoi(token);
+ gen_obj->obj_data.node_obj.ndb_props.utimeout = atoi(token);
token = strsep(&psz_cur, seps);
/* char *pstr_create_phase_fxn */
DBC_REQUIRE(token);
token_len = strlen(token);
- pGenObj->obj_data.node_obj.pstr_create_phase_fxn =
+ gen_obj->obj_data.node_obj.pstr_create_phase_fxn =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(pGenObj->obj_data.node_obj.pstr_create_phase_fxn,
+ strncpy(gen_obj->obj_data.node_obj.pstr_create_phase_fxn,
token, token_len);
- pGenObj->obj_data.node_obj.pstr_create_phase_fxn[token_len] =
+ gen_obj->obj_data.node_obj.pstr_create_phase_fxn[token_len] =
'\0';
token = strsep(&psz_cur, seps);
/* char *pstr_execute_phase_fxn */
DBC_REQUIRE(token);
token_len = strlen(token);
- pGenObj->obj_data.node_obj.pstr_execute_phase_fxn =
+ gen_obj->obj_data.node_obj.pstr_execute_phase_fxn =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(pGenObj->obj_data.node_obj.pstr_execute_phase_fxn,
+ strncpy(gen_obj->obj_data.node_obj.pstr_execute_phase_fxn,
token, token_len);
- pGenObj->obj_data.node_obj.pstr_execute_phase_fxn[token_len] =
+ gen_obj->obj_data.node_obj.pstr_execute_phase_fxn[token_len] =
'\0';
token = strsep(&psz_cur, seps);
/* char *pstr_delete_phase_fxn */
DBC_REQUIRE(token);
token_len = strlen(token);
- pGenObj->obj_data.node_obj.pstr_delete_phase_fxn =
+ gen_obj->obj_data.node_obj.pstr_delete_phase_fxn =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(pGenObj->obj_data.node_obj.pstr_delete_phase_fxn,
+ strncpy(gen_obj->obj_data.node_obj.pstr_delete_phase_fxn,
token, token_len);
- pGenObj->obj_data.node_obj.pstr_delete_phase_fxn[token_len] =
+ gen_obj->obj_data.node_obj.pstr_delete_phase_fxn[token_len] =
'\0';
token = strsep(&psz_cur, seps);
/* Segment id for message buffers */
- pGenObj->obj_data.node_obj.msg_segid = atoi(token);
+ gen_obj->obj_data.node_obj.msg_segid = atoi(token);
token = strsep(&psz_cur, seps);
/* Message notification type */
- pGenObj->obj_data.node_obj.msg_notify_type = atoi(token);
+ gen_obj->obj_data.node_obj.msg_notify_type = atoi(token);
token = strsep(&psz_cur, seps);
/* char *pstr_i_alg_name */
if (token) {
token_len = strlen(token);
- pGenObj->obj_data.node_obj.pstr_i_alg_name =
+ gen_obj->obj_data.node_obj.pstr_i_alg_name =
kzalloc(token_len + 1, GFP_KERNEL);
- strncpy(pGenObj->obj_data.node_obj.pstr_i_alg_name,
+ strncpy(gen_obj->obj_data.node_obj.pstr_i_alg_name,
token, token_len);
- pGenObj->obj_data.node_obj.pstr_i_alg_name[token_len] =
+ gen_obj->obj_data.node_obj.pstr_i_alg_name[token_len] =
'\0';
token = strsep(&psz_cur, seps);
}
/* Load type (static, dynamic, or overlay) */
if (token) {
- pGenObj->obj_data.node_obj.us_load_type = atoi(token);
+ gen_obj->obj_data.node_obj.us_load_type = atoi(token);
token = strsep(&psz_cur, seps);
}
/* Dynamic load data requirements */
if (token) {
- pGenObj->obj_data.node_obj.ul_data_mem_seg_mask =
+ gen_obj->obj_data.node_obj.ul_data_mem_seg_mask =
atoi(token);
token = strsep(&psz_cur, seps);
}
/* Dynamic load code requirements */
if (token) {
- pGenObj->obj_data.node_obj.ul_code_mem_seg_mask =
+ gen_obj->obj_data.node_obj.ul_code_mem_seg_mask =
atoi(token);
token = strsep(&psz_cur, seps);
}
/* Extract node profiles into node properties */
if (token) {
- pGenObj->obj_data.node_obj.ndb_props.count_profiles =
+ gen_obj->obj_data.node_obj.ndb_props.count_profiles =
atoi(token);
for (i = 0;
i <
- pGenObj->obj_data.node_obj.
+ gen_obj->obj_data.node_obj.
ndb_props.count_profiles; i++) {
token = strsep(&psz_cur, seps);
if (token) {
/* Heap Size for the node */
- pGenObj->obj_data.node_obj.
+ gen_obj->obj_data.node_obj.
ndb_props.node_profiles[i].
ul_heap_size = atoi(token);
}
}
token = strsep(&psz_cur, seps);
if (token) {
- pGenObj->obj_data.node_obj.ndb_props.stack_seg_name =
+ gen_obj->obj_data.node_obj.ndb_props.stack_seg_name =
(u32) (token);
}
psz_cur = psz_buf;
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.cb_struct = atoi(token);
+ gen_obj->obj_data.proc_info.cb_struct = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.processor_family = atoi(token);
+ gen_obj->obj_data.proc_info.processor_family = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.processor_type = atoi(token);
+ gen_obj->obj_data.proc_info.processor_type = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.clock_rate = atoi(token);
+ gen_obj->obj_data.proc_info.clock_rate = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.ul_internal_mem_size = atoi(token);
+ gen_obj->obj_data.proc_info.ul_internal_mem_size = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.ul_external_mem_size = atoi(token);
+ gen_obj->obj_data.proc_info.ul_external_mem_size = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.processor_id = atoi(token);
+ gen_obj->obj_data.proc_info.processor_id = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.ty_running_rtos = atoi(token);
+ gen_obj->obj_data.proc_info.ty_running_rtos = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.node_min_priority = atoi(token);
+ gen_obj->obj_data.proc_info.node_min_priority = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.proc_info.node_max_priority = atoi(token);
+ gen_obj->obj_data.proc_info.node_max_priority = atoi(token);
#ifdef _DB_TIOMAP
/* Proc object may contain additional(extended) attributes. */
/* attr must match proc.hxx */
for (entry_id = 0; entry_id < 7; entry_id++) {
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.ext_proc_obj.ty_tlb[entry_id].
+ gen_obj->obj_data.ext_proc_obj.ty_tlb[entry_id].
ul_gpp_phys = atoi(token);
token = strsep(&psz_cur, seps);
- pGenObj->obj_data.ext_proc_obj.ty_tlb[entry_id].
+ gen_obj->obj_data.ext_proc_obj.ty_tlb[entry_id].
ul_dsp_virt = atoi(token);
}
#endif
* Retrieves the MGR handle. Accessor Function.
*/
int mgr_get_dcd_handle(struct mgr_object *mgr_handle,
- OUT u32 *phDCDHandle)
+ OUT u32 *dcd_handle)
{
int status = -EPERM;
struct mgr_object *pmgr_obj = (struct mgr_object *)mgr_handle;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(phDCDHandle != NULL);
+ DBC_REQUIRE(dcd_handle != NULL);
- *phDCDHandle = (u32) NULL;
+ *dcd_handle = (u32) NULL;
if (pmgr_obj) {
- *phDCDHandle = (u32) pmgr_obj->hdcd_mgr;
+ *dcd_handle = (u32) pmgr_obj->hdcd_mgr;
status = 0;
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && *phDCDHandle != (u32) NULL) ||
- (DSP_FAILED(status) && *phDCDHandle == (u32) NULL));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *dcd_handle != (u32) NULL) ||
+ (DSP_FAILED(status) && *dcd_handle == (u32) NULL));
return status;
}
static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **pList,
struct dbll_sect_info *pSectInfo,
- bool *pExists, u32 addr, u32 bytes);
+ bool *exists, u32 addr, u32 bytes);
static s32 fake_ovly_write(void *handle, u32 dsp_address, void *buf, u32 bytes,
s32 mtype);
static void free_sects(struct nldr_object *nldr_obj,
static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **pList,
struct dbll_sect_info *pSectInfo,
- bool *pExists, u32 addr, u32 bytes)
+ bool *exists, u32 addr, u32 bytes)
{
struct ovly_sect *new_sect = NULL;
struct ovly_sect *last_sect;
int status = 0;
ovly_section = last_sect = *pList;
- *pExists = false;
+ *exists = false;
while (ovly_section) {
/*
* Make sure section has not already been added. Multiple
*/
if (ovly_section->sect_load_addr == addr) {
/* Already added */
- *pExists = true;
+ *exists = true;
break;
}
last_sect = ovly_section;
* Retrieve the Device Object handle for a given devnode.
*/
int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
- OUT u32 *pdwValue)
+ OUT u32 *value)
{
int status = 0;
u32 dw_buf_size;
if (!dev_node_obj)
status = -EFAULT;
- if (!pdwValue)
+ if (!value)
status = -EFAULT;
- dw_buf_size = sizeof(pdwValue);
+ dw_buf_size = sizeof(value);
if (DSP_SUCCEEDED(status)) {
/* check the device string and then store dev object */
(strcmp
((char *)((struct drv_ext *)dev_node_obj)->sz_string,
"TIOMAP1510")))
- *pdwValue = (u32)drv_datap->dev_object;
+ *value = (u32)drv_datap->dev_object;
}
if (DSP_FAILED(status))
pr_err("%s: Failed, status 0x%x\n", __func__, status);
* Purpose:
* Retrieve the Object handle from the Registry
*/
-int cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
+int cfg_get_object(OUT u32 *value, u8 dw_type)
{
int status = -EINVAL;
struct drv_data *drv_datap = dev_get_drvdata(bridge);
- DBC_REQUIRE(pdwValue != NULL);
+ DBC_REQUIRE(value != NULL);
if (!drv_datap)
return -EPERM;
switch (dw_type) {
case (REG_DRV_OBJECT):
if (drv_datap->drv_object) {
- *pdwValue = (u32)drv_datap->drv_object;
+ *value = (u32)drv_datap->drv_object;
status = 0;
} else {
status = -ENODATA;
break;
case (REG_MGR_OBJECT):
if (drv_datap->mgr_object) {
- *pdwValue = (u32)drv_datap->mgr_object;
+ *value = (u32)drv_datap->mgr_object;
status = 0;
} else {
status = -ENODATA;
break;
}
if (DSP_FAILED(status)) {
- *pdwValue = 0;
+ *value = 0;
pr_err("%s: Failed, status 0x%x\n", __func__, status);
}
- DBC_ENSURE((DSP_SUCCEEDED(status) && *pdwValue != 0) ||
- (DSP_FAILED(status) && *pdwValue == 0));
+ DBC_ENSURE((DSP_SUCCEEDED(status) && *value != 0) ||
+ (DSP_FAILED(status) && *value == 0));
return status;
}