Commit a5120278 authored by Rene Sapiens's avatar Rene Sapiens Committed by Greg Kroah-Hartman

staging: ti dspbridge: Rename words with camel case.

The intention of this patch is to rename the remaining variables with camel
case. Variables will be renamed avoiding camel case and Hungarian notation.
The words to be renamed in this patch are:
========================================
pdwSize to buff_size
pdwState to board_state
pdwValue to value
pdwVersion to version
pElemExisting to elem_existing
pEntry to entry
pExists to exists
pfEnablePerf to enable_perf
pGenObj to gen_obj
phChnlMgr to channel_mgr
phChnl to chnl
phCodMgr to cod_mgr
phDCDHandle to dcd_handle
phDcdMgr to dcd_mgr
phDehMgr to deh_manager
========================================
Signed-off-by: default avatarRene Sapiens <rene.sapiens@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent aa09b091
...@@ -380,7 +380,7 @@ int bridge_chnl_close(struct chnl_object *chnl_obj) ...@@ -380,7 +380,7 @@ int bridge_chnl_close(struct chnl_object *chnl_obj)
* Create a channel manager object, responsible for opening new channels * Create a channel manager object, responsible for opening new channels
* and closing old ones for a given board. * 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, struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs) IN CONST struct chnl_mgrattrs *pMgrAttrs)
{ {
...@@ -389,7 +389,7 @@ int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr, ...@@ -389,7 +389,7 @@ int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
u8 max_channels; u8 max_channels;
/* Check DBC requirements: */ /* Check DBC requirements: */
DBC_REQUIRE(phChnlMgr != NULL); DBC_REQUIRE(channel_mgr != NULL);
DBC_REQUIRE(pMgrAttrs != NULL); DBC_REQUIRE(pMgrAttrs != NULL);
DBC_REQUIRE(pMgrAttrs->max_channels > 0); DBC_REQUIRE(pMgrAttrs->max_channels > 0);
DBC_REQUIRE(pMgrAttrs->max_channels <= CHNL_MAXCHANNELS); DBC_REQUIRE(pMgrAttrs->max_channels <= CHNL_MAXCHANNELS);
...@@ -430,10 +430,10 @@ int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr, ...@@ -430,10 +430,10 @@ int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
if (DSP_FAILED(status)) { if (DSP_FAILED(status)) {
bridge_chnl_destroy(chnl_mgr_obj); bridge_chnl_destroy(chnl_mgr_obj);
*phChnlMgr = NULL; *channel_mgr = NULL;
} else { } else {
/* Return channel manager object to caller... */ /* Return channel manager object to caller... */
*phChnlMgr = chnl_mgr_obj; *channel_mgr = chnl_mgr_obj;
} }
return status; return status;
} }
...@@ -774,7 +774,7 @@ int bridge_chnl_idle(struct chnl_object *chnl_obj, u32 timeout, ...@@ -774,7 +774,7 @@ int bridge_chnl_idle(struct chnl_object *chnl_obj, u32 timeout,
* ======== bridge_chnl_open ======== * ======== bridge_chnl_open ========
* Open a new half-duplex channel to the DSP board. * 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, struct chnl_mgr *hchnl_mgr, s8 chnl_mode,
u32 uChnlId, CONST IN struct chnl_attr *pattrs) u32 uChnlId, CONST IN struct chnl_attr *pattrs)
{ {
...@@ -783,10 +783,10 @@ int bridge_chnl_open(OUT struct chnl_object **phChnl, ...@@ -783,10 +783,10 @@ int bridge_chnl_open(OUT struct chnl_object **phChnl,
struct chnl_object *pchnl = NULL; struct chnl_object *pchnl = NULL;
struct sync_object *sync_event = NULL; struct sync_object *sync_event = NULL;
/* Ensure DBC requirements: */ /* Ensure DBC requirements: */
DBC_REQUIRE(phChnl != NULL); DBC_REQUIRE(chnl != NULL);
DBC_REQUIRE(pattrs != NULL); DBC_REQUIRE(pattrs != NULL);
DBC_REQUIRE(hchnl_mgr != NULL); DBC_REQUIRE(hchnl_mgr != NULL);
*phChnl = NULL; *chnl = NULL;
/* Validate Args: */ /* Validate Args: */
if (pattrs->uio_reqs == 0) { if (pattrs->uio_reqs == 0) {
status = -EINVAL; status = -EINVAL;
...@@ -893,10 +893,10 @@ int bridge_chnl_open(OUT struct chnl_object **phChnl, ...@@ -893,10 +893,10 @@ int bridge_chnl_open(OUT struct chnl_object **phChnl,
spin_unlock_bh(&chnl_mgr_obj->chnl_mgr_lock); spin_unlock_bh(&chnl_mgr_obj->chnl_mgr_lock);
/* Return result... */ /* Return result... */
pchnl->dw_state = CHNL_STATEREADY; pchnl->dw_state = CHNL_STATEREADY;
*phChnl = pchnl; *chnl = pchnl;
} }
func_end: func_end:
DBC_ENSURE((DSP_SUCCEEDED(status) && pchnl) || (*phChnl == NULL)); DBC_ENSURE((DSP_SUCCEEDED(status) && pchnl) || (*chnl == NULL));
return status; return status;
} }
......
...@@ -82,7 +82,7 @@ static int bridge_brd_read(struct bridge_dev_context *dev_context, ...@@ -82,7 +82,7 @@ static int bridge_brd_read(struct bridge_dev_context *dev_context,
static int bridge_brd_start(struct bridge_dev_context *dev_context, static int bridge_brd_start(struct bridge_dev_context *dev_context,
u32 dsp_addr); u32 dsp_addr);
static int bridge_brd_status(struct bridge_dev_context *dev_context, 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_stop(struct bridge_dev_context *dev_context);
static int bridge_brd_write(struct bridge_dev_context *dev_context, static int bridge_brd_write(struct bridge_dev_context *dev_context,
IN u8 *host_buff, IN u8 *host_buff,
...@@ -753,10 +753,10 @@ static int bridge_brd_delete(struct bridge_dev_context *dev_ctxt) ...@@ -753,10 +753,10 @@ static int bridge_brd_delete(struct bridge_dev_context *dev_ctxt)
* Returns the board status. * Returns the board status.
*/ */
static int bridge_brd_status(struct bridge_dev_context *dev_ctxt, static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
int *pdwState) int *board_state)
{ {
struct bridge_dev_context *dev_context = dev_ctxt; struct bridge_dev_context *dev_context = dev_ctxt;
*pdwState = dev_context->dw_brd_state; *board_state = dev_context->dw_brd_state;
return 0; return 0;
} }
......
...@@ -58,9 +58,9 @@ extern int cfg_get_auto_start(IN struct cfg_devnode *dev_node_obj, ...@@ -58,9 +58,9 @@ extern int cfg_get_auto_start(IN struct cfg_devnode *dev_node_obj,
* Purpose: * Purpose:
* Retrieves the version of the PM Class Driver. * Retrieves the version of the PM Class Driver.
* Parameters: * Parameters:
* pdwVersion: Ptr to u32 to contain version number upon return. * version: Ptr to u32 to contain version number upon return.
* Returns: * 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 * the form: 0xAABBCCDD where AABB is Major version and
* CCDD is Minor. * CCDD is Minor.
* -EPERM: Failure. * -EPERM: Failure.
...@@ -68,9 +68,9 @@ extern int cfg_get_auto_start(IN struct cfg_devnode *dev_node_obj, ...@@ -68,9 +68,9 @@ extern int cfg_get_auto_start(IN struct cfg_devnode *dev_node_obj,
* CFG initialized. * CFG initialized.
* Ensures: * Ensures:
* 0: Success. * 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 ======== * ======== cfg_get_dev_object ========
...@@ -79,7 +79,7 @@ extern int cfg_get_cd_version(OUT u32 *pdwVersion); ...@@ -79,7 +79,7 @@ extern int cfg_get_cd_version(OUT u32 *pdwVersion);
* Parameters: * Parameters:
* dev_node_obj: Platform's dev_node handle from which to retrieve * dev_node_obj: Platform's dev_node handle from which to retrieve
* value. * value.
* pdwValue: Ptr to location to store the value. * value: Ptr to location to store the value.
* Returns: * Returns:
* 0: Success. * 0: Success.
* -EFAULT: dev_node_obj is invalid or phDevObject is invalid. * -EFAULT: dev_node_obj is invalid or phDevObject is invalid.
...@@ -87,11 +87,11 @@ extern int cfg_get_cd_version(OUT u32 *pdwVersion); ...@@ -87,11 +87,11 @@ extern int cfg_get_cd_version(OUT u32 *pdwVersion);
* Requires: * Requires:
* CFG initialized. * CFG initialized.
* Ensures: * Ensures:
* 0: *pdwValue is set to the retrieved u32. * 0: *value is set to the retrieved u32.
* else: *pdwValue is set to 0L. * else: *value is set to 0L.
*/ */
extern int cfg_get_dev_object(IN struct cfg_devnode *dev_node_obj, extern int cfg_get_dev_object(IN struct cfg_devnode *dev_node_obj,
OUT u32 *pdwValue); OUT u32 *value);
/* /*
* ======== cfg_get_exec_file ======== * ======== cfg_get_exec_file ========
...@@ -120,17 +120,17 @@ extern int cfg_get_exec_file(IN struct cfg_devnode *dev_node_obj, ...@@ -120,17 +120,17 @@ extern int cfg_get_exec_file(IN struct cfg_devnode *dev_node_obj,
* Purpose: * Purpose:
* Retrieve the Driver Object handle From the Registry * Retrieve the Driver Object handle From the Registry
* Parameters: * Parameters:
* pdwValue: Ptr to location to store the value. * value: Ptr to location to store the value.
* dw_type Type of Object to Get * dw_type Type of Object to Get
* Returns: * Returns:
* 0: Success. * 0: Success.
* Requires: * Requires:
* CFG initialized. * CFG initialized.
* Ensures: * Ensures:
* 0: *pdwValue is set to the retrieved u32(non-Zero). * 0: *value is set to the retrieved u32(non-Zero).
* else: *pdwValue is set to 0L. * 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 ======== * ======== cfg_get_perf_value ========
...@@ -138,15 +138,15 @@ extern int cfg_get_object(OUT u32 *pdwValue, u8 dw_type); ...@@ -138,15 +138,15 @@ extern int cfg_get_object(OUT u32 *pdwValue, u8 dw_type);
* Retrieve a flag indicating whether PERF should log statistics for the * Retrieve a flag indicating whether PERF should log statistics for the
* PM class driver. * PM class driver.
* Parameters: * 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 * not found, or had a zero value. A nonzero value
* means the key was found and had a nonzero value. * means the key was found and had a nonzero value.
* Returns: * Returns:
* Requires: * Requires:
* pfEnablePerf != NULL; * enable_perf != NULL;
* Ensures: * Ensures:
*/ */
extern void cfg_get_perf_value(OUT bool *pfEnablePerf); extern void cfg_get_perf_value(OUT bool *enable_perf);
/* /*
* ======== cfg_get_zl_file ======== * ======== cfg_get_zl_file ========
......
...@@ -51,7 +51,7 @@ extern int chnl_close(struct chnl_object *chnl_obj); ...@@ -51,7 +51,7 @@ extern int chnl_close(struct chnl_object *chnl_obj);
* Create a channel manager object, responsible for opening new channels * Create a channel manager object, responsible for opening new channels
* and closing old ones for a given board. * and closing old ones for a given board.
* Parameters: * 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. * hdev_obj: Handle to a device object.
* pMgrAttrs: Channel manager attributes. * pMgrAttrs: Channel manager attributes.
* pMgrAttrs->max_channels: Max channels * pMgrAttrs->max_channels: Max channels
...@@ -70,14 +70,14 @@ extern int chnl_close(struct chnl_object *chnl_obj); ...@@ -70,14 +70,14 @@ extern int chnl_close(struct chnl_object *chnl_obj);
* -EEXIST: Channel manager already exists for this device. * -EEXIST: Channel manager already exists for this device.
* Requires: * Requires:
* chnl_init(void) called. * chnl_init(void) called.
* phChnlMgr != NULL. * channel_mgr != NULL.
* pMgrAttrs != NULL. * pMgrAttrs != NULL.
* Ensures: * Ensures:
* 0: Subsequent calls to chnl_create() for the same * 0: Subsequent calls to chnl_create() for the same
* board without an intervening call to * board without an intervening call to
* chnl_destroy() will fail. * 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, struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs); IN CONST struct chnl_mgrattrs *pMgrAttrs);
......
...@@ -77,7 +77,7 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr, ...@@ -77,7 +77,7 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* This function creates a DCD module manager. * This function creates a DCD module manager.
* Parameters: * Parameters:
* pszZlDllName: Pointer to a DLL name string. * 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: * Returns:
* 0: Success. * 0: Success.
* -ENOMEM: Unable to allocate memory for DCD manager handle. * -ENOMEM: Unable to allocate memory for DCD manager handle.
...@@ -85,12 +85,12 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr, ...@@ -85,12 +85,12 @@ extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
* Requires: * Requires:
* DCD initialized. * DCD initialized.
* pszZlDllName is non-NULL. * pszZlDllName is non-NULL.
* phDcdMgr is non-NULL. * dcd_mgr is non-NULL.
* Ensures: * Ensures:
* A DCD manager handle is created. * A DCD manager handle is created.
*/ */
extern int dcd_create_manager(IN char *pszZlDllName, extern int dcd_create_manager(IN char *pszZlDllName,
OUT struct dcd_manager **phDcdMgr); OUT struct dcd_manager **dcd_mgr);
/* /*
* ======== dcd_destroy_manager ======== * ======== dcd_destroy_manager ========
...@@ -215,7 +215,7 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr, ...@@ -215,7 +215,7 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* uuid_obj: Pointer to a dsp_uuid that represents a unique DSP/BIOS * uuid_obj: Pointer to a dsp_uuid that represents a unique DSP/BIOS
* Bridge object. * Bridge object.
* pstrLibName: Buffer to hold library name. * 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: Which phase to load
* phase_split: Are phases in multiple libraries * phase_split: Are phases in multiple libraries
* Returns: * Returns:
...@@ -226,13 +226,13 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr, ...@@ -226,13 +226,13 @@ extern int dcd_get_num_dep_libs(IN struct dcd_manager *hdcd_mgr,
* Valid hdcd_mgr. * Valid hdcd_mgr.
* pstrLibName != NULL. * pstrLibName != NULL.
* uuid_obj != NULL * uuid_obj != NULL
* pdwSize != NULL. * buff_size != NULL.
* Ensures: * Ensures:
*/ */
extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr, extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj, IN struct dsp_uuid *uuid_obj,
IN OUT char *pstrLibName, IN OUT char *pstrLibName,
IN OUT u32 *pdwSize, IN OUT u32 *buff_size,
IN enum nldr_phase phase, IN enum nldr_phase phase,
OUT bool *phase_split); OUT bool *phase_split);
......
...@@ -41,7 +41,7 @@ extern int dbll_get_sect(struct dbll_library_obj *lib, char *name, ...@@ -41,7 +41,7 @@ extern int dbll_get_sect(struct dbll_library_obj *lib, char *name,
extern bool dbll_init(void); extern bool dbll_init(void);
extern int dbll_load(struct dbll_library_obj *lib, extern int dbll_load(struct dbll_library_obj *lib,
dbll_flags flags, 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, extern int dbll_load_sect(struct dbll_library_obj *lib,
char *sectName, struct dbll_attrs *attrs); char *sectName, struct dbll_attrs *attrs);
extern int dbll_open(struct dbll_tar_obj *target, char *file, extern int dbll_open(struct dbll_tar_obj *target, char *file,
......
...@@ -342,7 +342,7 @@ typedef bool(*dbll_init_fxn) (void); ...@@ -342,7 +342,7 @@ typedef bool(*dbll_init_fxn) (void);
* Requires: * Requires:
* DBL initialized. * DBL initialized.
* Valid lib. * Valid lib.
* pEntry != NULL. * entry != NULL.
* Ensures: * Ensures:
*/ */
typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib, typedef int(*dbll_load_fxn) (struct dbll_library_obj *lib,
......
...@@ -263,19 +263,19 @@ extern int dev_get_dmm_mgr(struct dev_object *hdev_obj, ...@@ -263,19 +263,19 @@ extern int dev_get_dmm_mgr(struct dev_object *hdev_obj,
* Parameters: * Parameters:
* hdev_obj: Handle to device object created with * hdev_obj: Handle to device object created with
* dev_create_device(). * dev_create_device().
* *phCodMgr: Ptr to location to store handle. * *cod_mgr: Ptr to location to store handle.
* Returns: * Returns:
* 0: Success. * 0: Success.
* -EFAULT: Invalid hdev_obj. * -EFAULT: Invalid hdev_obj.
* Requires: * Requires:
* phCodMgr != NULL. * cod_mgr != NULL.
* DEV Initialized. * DEV Initialized.
* Ensures: * Ensures:
* 0: *phCodMgr contains a handle to a COD manager object. * 0: *cod_mgr contains a handle to a COD manager object.
* else: *phCodMgr is NULL. * else: *cod_mgr is NULL.
*/ */
extern int dev_get_cod_mgr(struct dev_object *hdev_obj, 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 ======== * ======== dev_get_deh_mgr ========
...@@ -283,19 +283,19 @@ extern int dev_get_cod_mgr(struct dev_object *hdev_obj, ...@@ -283,19 +283,19 @@ extern int dev_get_cod_mgr(struct dev_object *hdev_obj,
* Retrieve the DEH manager created for this device. * Retrieve the DEH manager created for this device.
* Parameters: * Parameters:
* hdev_obj: Handle to device object created with dev_create_device(). * 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: * Returns:
* 0: Success. * 0: Success.
* -EFAULT: Invalid hdev_obj. * -EFAULT: Invalid hdev_obj.
* Requires: * Requires:
* phDehMgr != NULL. * deh_manager != NULL.
* DEH Initialized. * DEH Initialized.
* Ensures: * Ensures:
* 0: *phDehMgr contains a handle to a DEH manager object. * 0: *deh_manager contains a handle to a DEH manager object.
* else: *phDehMgr is NULL. * else: *deh_manager is NULL.
*/ */
extern int dev_get_deh_mgr(struct dev_object *hdev_obj, 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 ======== * ======== dev_get_dev_node ========
......
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
#ifndef DSPCHNL_ #ifndef DSPCHNL_
#define 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, struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs IN CONST struct chnl_mgrattrs
*pMgrAttrs); *pMgrAttrs);
extern int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr); 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, struct chnl_mgr *hchnl_mgr,
s8 chnl_mode, s8 chnl_mode,
u32 uChnlId, u32 uChnlId,
......
...@@ -228,17 +228,18 @@ typedef int(*fxn_brd_stop) (struct bridge_dev_context *dev_ctxt); ...@@ -228,17 +228,18 @@ typedef int(*fxn_brd_stop) (struct bridge_dev_context *dev_ctxt);
* Report the current state of the board. * Report the current state of the board.
* Parameters: * Parameters:
* dev_ctxt: Handle to Bridge driver defined device context. * dev_ctxt: Handle to Bridge driver defined device context.
* pdwState: Ptr to BRD status variable. * board_state: Ptr to BRD status variable.
* Returns: * Returns:
* 0: * 0:
* Requires: * Requires:
* pdwState != NULL; * board_state != NULL;
* dev_ctxt != NULL * dev_ctxt != NULL
* Ensures: * 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, typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
int *pdwState); int *board_state);
/* /*
* ======== bridge_brd_read ======== * ======== bridge_brd_read ========
...@@ -297,7 +298,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt, ...@@ -297,7 +298,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
* Create a channel manager object, responsible for opening new channels * Create a channel manager object, responsible for opening new channels
* and closing old ones for a given 'Bridge board. * and closing old ones for a given 'Bridge board.
* Parameters: * 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. * hdev_obj: Handle to a device object.
* pMgrAttrs: Channel manager attributes. * pMgrAttrs: Channel manager attributes.
* pMgrAttrs->max_channels: Max channels * pMgrAttrs->max_channels: Max channels
...@@ -312,7 +313,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt, ...@@ -312,7 +313,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
* -EIO: Unable to plug ISR for given IRQ. * -EIO: Unable to plug ISR for given IRQ.
* -EFAULT: Couldn't map physical address to a virtual one. * -EFAULT: Couldn't map physical address to a virtual one.
* Requires: * Requires:
* phChnlMgr != NULL. * channel_mgr != NULL.
* pMgrAttrs != NULL * pMgrAttrs != NULL
* pMgrAttrs field are all valid: * pMgrAttrs field are all valid:
* 0 < max_channels <= CHNL_MAXCHANNELS. * 0 < max_channels <= CHNL_MAXCHANNELS.
...@@ -323,7 +324,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt, ...@@ -323,7 +324,7 @@ typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
* Ensures: * Ensures:
*/ */
typedef int(*fxn_chnl_create) (OUT struct chnl_mgr typedef int(*fxn_chnl_create) (OUT struct chnl_mgr
**phChnlMgr, **channel_mgr,
struct dev_object struct dev_object
* hdev_obj, * hdev_obj,
IN CONST struct IN CONST struct
...@@ -367,7 +368,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr, ...@@ -367,7 +368,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
* Purpose: * Purpose:
* Open a new half-duplex channel to the DSP board. * Open a new half-duplex channel to the DSP board.
* Parameters: * 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 * hchnl_mgr: Handle to channel manager, as returned by
* CHNL_GetMgr(). * CHNL_GetMgr().
* chnl_mode: One of {CHNL_MODETODSP, CHNL_MODEFROMDSP} specifies * chnl_mode: One of {CHNL_MODETODSP, CHNL_MODEFROMDSP} specifies
...@@ -398,16 +399,16 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr, ...@@ -398,16 +399,16 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
* -EIO: No free IO request packets available for * -EIO: No free IO request packets available for
* queuing. * queuing.
* Requires: * Requires:
* phChnl != NULL. * chnl != NULL.
* pattrs != NULL. * pattrs != NULL.
* pattrs->event_obj is a valid event handle. * pattrs->event_obj is a valid event handle.
* pattrs->hReserved is the kernel mode handle for pattrs->event_obj. * pattrs->hReserved is the kernel mode handle for pattrs->event_obj.
* Ensures: * Ensures:
* 0: *phChnl is a valid channel. * 0: *chnl is a valid channel.
* else: *phChnl is set to NULL if (phChnl != NULL); * else: *chnl is set to NULL if (chnl != NULL);
*/ */
typedef int(*fxn_chnl_open) (OUT struct chnl_object typedef int(*fxn_chnl_open) (OUT struct chnl_object
**phChnl, **chnl,
struct chnl_mgr *hchnl_mgr, struct chnl_mgr *hchnl_mgr,
s8 chnl_mode, s8 chnl_mode,
u32 uChnlId, u32 uChnlId,
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* Create an IO manager object, responsible for managing IO between * Create an IO manager object, responsible for managing IO between
* CHNL and msg_ctrl. * CHNL and msg_ctrl.
* Parameters: * Parameters:
* phChnlMgr: Location to store a channel manager object on * channel_mgr: Location to store a channel manager object on
* output. * output.
* hdev_obj: Handle to a device object. * hdev_obj: Handle to a device object.
* pMgrAttrs: IO manager attributes. * pMgrAttrs: IO manager attributes.
......
...@@ -123,21 +123,21 @@ static inline void lst_init_elem(struct list_head *elem_list) ...@@ -123,21 +123,21 @@ static inline void lst_init_elem(struct list_head *elem_list)
* Parameters: * Parameters:
* pList: Pointer to list control structure. * pList: Pointer to list control structure.
* elem_list: Pointer to element in list to insert. * elem_list: Pointer to element in list to insert.
* pElemExisting: Pointer to existing list element. * elem_existing: Pointer to existing list element.
* Returns: * Returns:
* Requires: * Requires:
* - LST initialized. * - LST initialized.
* - pList != NULL. * - pList != NULL.
* - elem_list != NULL. * - elem_list != NULL.
* - pElemExisting != NULL. * - elem_existing != NULL.
* Ensures: * Ensures:
*/ */
static inline void lst_insert_before(struct lst_list *pList, static inline void lst_insert_before(struct lst_list *pList,
struct list_head *elem_list, struct list_head *elem_list,
struct list_head *pElemExisting) struct list_head *elem_existing)
{ {
if (pList && elem_list && pElemExisting) if (pList && elem_list && elem_existing)
list_add_tail(elem_list, pElemExisting); list_add_tail(elem_list, elem_existing);
} }
/* /*
......
...@@ -174,19 +174,19 @@ extern void mgr_exit(void); ...@@ -174,19 +174,19 @@ extern void mgr_exit(void);
* Retrieves the MGR handle. Accessor Function * Retrieves the MGR handle. Accessor Function
* Parameters: * Parameters:
* mgr_handle: Handle to the Manager Object * mgr_handle: Handle to the Manager Object
* phDCDHandle: Ptr to receive the DCD Handle. * dcd_handle: Ptr to receive the DCD Handle.
* Returns: * Returns:
* 0: Sucess * 0: Sucess
* -EPERM: Failure to get the Handle * -EPERM: Failure to get the Handle
* Requires: * Requires:
* MGR is initialized. * MGR is initialized.
* phDCDHandle != NULL * dcd_handle != NULL
* Ensures: * Ensures:
* 0 and *phDCDHandle != NULL || * 0 and *dcd_handle != NULL ||
* -EPERM and *phDCDHandle == NULL * -EPERM and *dcd_handle == NULL
*/ */
extern int mgr_get_dcd_handle(IN struct mgr_object extern int mgr_get_dcd_handle(IN struct mgr_object
*mgr_handle, OUT u32 *phDCDHandle); *mgr_handle, OUT u32 *dcd_handle);
/* /*
* ======== mgr_init ======== * ======== mgr_init ========
......
...@@ -51,7 +51,7 @@ static u32 refs; ...@@ -51,7 +51,7 @@ static u32 refs;
* Create a channel manager object, responsible for opening new channels * Create a channel manager object, responsible for opening new channels
* and closing old ones for a given 'Bridge board. * 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, struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs) IN CONST struct chnl_mgrattrs *pMgrAttrs)
{ {
...@@ -60,10 +60,10 @@ int chnl_create(OUT struct chnl_mgr **phChnlMgr, ...@@ -60,10 +60,10 @@ int chnl_create(OUT struct chnl_mgr **phChnlMgr,
struct chnl_mgr_ *chnl_mgr_obj = NULL; struct chnl_mgr_ *chnl_mgr_obj = NULL;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(phChnlMgr != NULL); DBC_REQUIRE(channel_mgr != NULL);
DBC_REQUIRE(pMgrAttrs != NULL); DBC_REQUIRE(pMgrAttrs != NULL);
*phChnlMgr = NULL; *channel_mgr = NULL;
/* Validate args: */ /* Validate args: */
if ((0 < pMgrAttrs->max_channels) && if ((0 < pMgrAttrs->max_channels) &&
...@@ -96,7 +96,7 @@ int chnl_create(OUT struct chnl_mgr **phChnlMgr, ...@@ -96,7 +96,7 @@ int chnl_create(OUT struct chnl_mgr **phChnlMgr,
chnl_mgr_obj = (struct chnl_mgr_ *)hchnl_mgr; chnl_mgr_obj = (struct chnl_mgr_ *)hchnl_mgr;
chnl_mgr_obj->intf_fxns = intf_fxns; chnl_mgr_obj->intf_fxns = intf_fxns;
/* Finally, return the new channel manager handle: */ /* Finally, return the new channel manager handle: */
*phChnlMgr = hchnl_mgr; *channel_mgr = hchnl_mgr;
} }
} }
......
...@@ -451,7 +451,7 @@ bool dbll_init(void) ...@@ -451,7 +451,7 @@ bool dbll_init(void)
* ======== dbll_load ======== * ======== dbll_load ========
*/ */
int dbll_load(struct dbll_library_obj *lib, dbll_flags flags, 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_library_obj *zl_lib = (struct dbll_library_obj *)lib;
struct dbll_tar_obj *dbzl; struct dbll_tar_obj *dbzl;
...@@ -461,7 +461,7 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags, ...@@ -461,7 +461,7 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
bool opened_doff = false; bool opened_doff = false;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(zl_lib); DBC_REQUIRE(zl_lib);
DBC_REQUIRE(pEntry != NULL); DBC_REQUIRE(entry != NULL);
DBC_REQUIRE(attrs != NULL); DBC_REQUIRE(attrs != NULL);
/* /*
...@@ -550,7 +550,7 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags, ...@@ -550,7 +550,7 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
redefined_symbol = false; redefined_symbol = false;
status = -EILSEQ; status = -EILSEQ;
} else { } else {
*pEntry = zl_lib->entry; *entry = zl_lib->entry;
} }
} }
} }
...@@ -563,8 +563,8 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags, ...@@ -563,8 +563,8 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
DBC_ENSURE(DSP_FAILED(status) || zl_lib->load_ref > 0); 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", dev_dbg(bridge, "%s: lib: %p flags: 0x%x entry: %p, status 0x%x\n",
__func__, lib, flags, pEntry, status); __func__, lib, flags, entry, status);
return status; return status;
} }
......
...@@ -500,23 +500,23 @@ int dev_get_dmm_mgr(struct dev_object *hdev_obj, ...@@ -500,23 +500,23 @@ int dev_get_dmm_mgr(struct dev_object *hdev_obj,
* Retrieve the COD manager create for this device. * Retrieve the COD manager create for this device.
*/ */
int dev_get_cod_mgr(struct dev_object *hdev_obj, int dev_get_cod_mgr(struct dev_object *hdev_obj,
OUT struct cod_manager **phCodMgr) OUT struct cod_manager **cod_mgr)
{ {
int status = 0; int status = 0;
struct dev_object *dev_obj = hdev_obj; struct dev_object *dev_obj = hdev_obj;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(phCodMgr != NULL); DBC_REQUIRE(cod_mgr != NULL);
if (hdev_obj) { if (hdev_obj) {
*phCodMgr = dev_obj->cod_mgr; *cod_mgr = dev_obj->cod_mgr;
} else { } else {
*phCodMgr = NULL; *cod_mgr = NULL;
status = -EFAULT; status = -EFAULT;
} }
DBC_ENSURE(DSP_SUCCEEDED(status) || ((phCodMgr != NULL) && DBC_ENSURE(DSP_SUCCEEDED(status) || ((cod_mgr != NULL) &&
(*phCodMgr == NULL))); (*cod_mgr == NULL)));
return status; return status;
} }
...@@ -524,17 +524,17 @@ int dev_get_cod_mgr(struct dev_object *hdev_obj, ...@@ -524,17 +524,17 @@ int dev_get_cod_mgr(struct dev_object *hdev_obj,
* ========= dev_get_deh_mgr ======== * ========= dev_get_deh_mgr ========
*/ */
int dev_get_deh_mgr(struct dev_object *hdev_obj, int dev_get_deh_mgr(struct dev_object *hdev_obj,
OUT struct deh_mgr **phDehMgr) OUT struct deh_mgr **deh_manager)
{ {
int status = 0; int status = 0;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(phDehMgr != NULL); DBC_REQUIRE(deh_manager != NULL);
DBC_REQUIRE(hdev_obj); DBC_REQUIRE(hdev_obj);
if (hdev_obj) { if (hdev_obj) {
*phDehMgr = hdev_obj->hdeh_mgr; *deh_manager = hdev_obj->hdeh_mgr;
} else { } else {
*phDehMgr = NULL; *deh_manager = NULL;
status = -EFAULT; status = -EFAULT;
} }
return status; return status;
......
This diff is collapsed.
...@@ -304,21 +304,21 @@ void mgr_exit(void) ...@@ -304,21 +304,21 @@ void mgr_exit(void)
* Retrieves the MGR handle. Accessor Function. * Retrieves the MGR handle. Accessor Function.
*/ */
int mgr_get_dcd_handle(struct mgr_object *mgr_handle, int mgr_get_dcd_handle(struct mgr_object *mgr_handle,
OUT u32 *phDCDHandle) OUT u32 *dcd_handle)
{ {
int status = -EPERM; int status = -EPERM;
struct mgr_object *pmgr_obj = (struct mgr_object *)mgr_handle; struct mgr_object *pmgr_obj = (struct mgr_object *)mgr_handle;
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(phDCDHandle != NULL); DBC_REQUIRE(dcd_handle != NULL);
*phDCDHandle = (u32) NULL; *dcd_handle = (u32) NULL;
if (pmgr_obj) { if (pmgr_obj) {
*phDCDHandle = (u32) pmgr_obj->hdcd_mgr; *dcd_handle = (u32) pmgr_obj->hdcd_mgr;
status = 0; status = 0;
} }
DBC_ENSURE((DSP_SUCCEEDED(status) && *phDCDHandle != (u32) NULL) || DBC_ENSURE((DSP_SUCCEEDED(status) && *dcd_handle != (u32) NULL) ||
(DSP_FAILED(status) && *phDCDHandle == (u32) NULL)); (DSP_FAILED(status) && *dcd_handle == (u32) NULL));
return status; return status;
} }
......
...@@ -290,7 +290,7 @@ static int add_ovly_node(struct dsp_uuid *uuid_obj, ...@@ -290,7 +290,7 @@ static int add_ovly_node(struct dsp_uuid *uuid_obj,
static int add_ovly_sect(struct nldr_object *nldr_obj, static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **pList, struct ovly_sect **pList,
struct dbll_sect_info *pSectInfo, 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, static s32 fake_ovly_write(void *handle, u32 dsp_address, void *buf, u32 bytes,
s32 mtype); s32 mtype);
static void free_sects(struct nldr_object *nldr_obj, static void free_sects(struct nldr_object *nldr_obj,
...@@ -1073,7 +1073,7 @@ static int add_ovly_node(struct dsp_uuid *uuid_obj, ...@@ -1073,7 +1073,7 @@ static int add_ovly_node(struct dsp_uuid *uuid_obj,
static int add_ovly_sect(struct nldr_object *nldr_obj, static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **pList, struct ovly_sect **pList,
struct dbll_sect_info *pSectInfo, 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 *new_sect = NULL;
struct ovly_sect *last_sect; struct ovly_sect *last_sect;
...@@ -1081,7 +1081,7 @@ static int add_ovly_sect(struct nldr_object *nldr_obj, ...@@ -1081,7 +1081,7 @@ static int add_ovly_sect(struct nldr_object *nldr_obj,
int status = 0; int status = 0;
ovly_section = last_sect = *pList; ovly_section = last_sect = *pList;
*pExists = false; *exists = false;
while (ovly_section) { while (ovly_section) {
/* /*
* Make sure section has not already been added. Multiple * Make sure section has not already been added. Multiple
...@@ -1089,7 +1089,7 @@ static int add_ovly_sect(struct nldr_object *nldr_obj, ...@@ -1089,7 +1089,7 @@ static int add_ovly_sect(struct nldr_object *nldr_obj,
*/ */
if (ovly_section->sect_load_addr == addr) { if (ovly_section->sect_load_addr == addr) {
/* Already added */ /* Already added */
*pExists = true; *exists = true;
break; break;
} }
last_sect = ovly_section; last_sect = ovly_section;
......
...@@ -76,7 +76,7 @@ int cfg_get_auto_start(struct cfg_devnode *dev_node_obj, ...@@ -76,7 +76,7 @@ int cfg_get_auto_start(struct cfg_devnode *dev_node_obj,
* Retrieve the Device Object handle for a given devnode. * Retrieve the Device Object handle for a given devnode.
*/ */
int cfg_get_dev_object(struct cfg_devnode *dev_node_obj, int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
OUT u32 *pdwValue) OUT u32 *value)
{ {
int status = 0; int status = 0;
u32 dw_buf_size; u32 dw_buf_size;
...@@ -88,10 +88,10 @@ int cfg_get_dev_object(struct cfg_devnode *dev_node_obj, ...@@ -88,10 +88,10 @@ int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
if (!dev_node_obj) if (!dev_node_obj)
status = -EFAULT; status = -EFAULT;
if (!pdwValue) if (!value)
status = -EFAULT; status = -EFAULT;
dw_buf_size = sizeof(pdwValue); dw_buf_size = sizeof(value);
if (DSP_SUCCEEDED(status)) { if (DSP_SUCCEEDED(status)) {
/* check the device string and then store dev object */ /* check the device string and then store dev object */
...@@ -99,7 +99,7 @@ int cfg_get_dev_object(struct cfg_devnode *dev_node_obj, ...@@ -99,7 +99,7 @@ int cfg_get_dev_object(struct cfg_devnode *dev_node_obj,
(strcmp (strcmp
((char *)((struct drv_ext *)dev_node_obj)->sz_string, ((char *)((struct drv_ext *)dev_node_obj)->sz_string,
"TIOMAP1510"))) "TIOMAP1510")))
*pdwValue = (u32)drv_datap->dev_object; *value = (u32)drv_datap->dev_object;
} }
if (DSP_FAILED(status)) if (DSP_FAILED(status))
pr_err("%s: Failed, status 0x%x\n", __func__, status); pr_err("%s: Failed, status 0x%x\n", __func__, status);
...@@ -142,12 +142,12 @@ int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size, ...@@ -142,12 +142,12 @@ int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
* Purpose: * Purpose:
* Retrieve the Object handle from the Registry * 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; int status = -EINVAL;
struct drv_data *drv_datap = dev_get_drvdata(bridge); struct drv_data *drv_datap = dev_get_drvdata(bridge);
DBC_REQUIRE(pdwValue != NULL); DBC_REQUIRE(value != NULL);
if (!drv_datap) if (!drv_datap)
return -EPERM; return -EPERM;
...@@ -155,7 +155,7 @@ int cfg_get_object(OUT u32 *pdwValue, u8 dw_type) ...@@ -155,7 +155,7 @@ int cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
switch (dw_type) { switch (dw_type) {
case (REG_DRV_OBJECT): case (REG_DRV_OBJECT):
if (drv_datap->drv_object) { if (drv_datap->drv_object) {
*pdwValue = (u32)drv_datap->drv_object; *value = (u32)drv_datap->drv_object;
status = 0; status = 0;
} else { } else {
status = -ENODATA; status = -ENODATA;
...@@ -163,7 +163,7 @@ int cfg_get_object(OUT u32 *pdwValue, u8 dw_type) ...@@ -163,7 +163,7 @@ int cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
break; break;
case (REG_MGR_OBJECT): case (REG_MGR_OBJECT):
if (drv_datap->mgr_object) { if (drv_datap->mgr_object) {
*pdwValue = (u32)drv_datap->mgr_object; *value = (u32)drv_datap->mgr_object;
status = 0; status = 0;
} else { } else {
status = -ENODATA; status = -ENODATA;
...@@ -174,11 +174,11 @@ int cfg_get_object(OUT u32 *pdwValue, u8 dw_type) ...@@ -174,11 +174,11 @@ int cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
break; break;
} }
if (DSP_FAILED(status)) { if (DSP_FAILED(status)) {
*pdwValue = 0; *value = 0;
pr_err("%s: Failed, status 0x%x\n", __func__, status); pr_err("%s: Failed, status 0x%x\n", __func__, status);
} }
DBC_ENSURE((DSP_SUCCEEDED(status) && *pdwValue != 0) || DBC_ENSURE((DSP_SUCCEEDED(status) && *value != 0) ||
(DSP_FAILED(status) && *pdwValue == 0)); (DSP_FAILED(status) && *value == 0));
return status; return status;
} }
......
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