Commit a6bff488 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:
========================================
aAddr to addrs
aArgs to args
aSize to len
baseAddress to base_address
bDynamicLoad to dynamic_load
bForce to force
cCharSize to char_size
cContentSize to content_size
cCount to count
cDspCharSize to dsp_char_size
cIndex to index
ClkId to clock_id
cOrigin to origin
dataBasePhys to data_base_phys
dcdObjUnion to dcd_obj
deviceContext to device_ctxt
========================================
Signed-off-by: default avatarRene Sapiens <rene.sapiens@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8dd1260f
...@@ -80,6 +80,6 @@ int handle_constraints_set(struct bridge_dev_context *dev_context, ...@@ -80,6 +80,6 @@ int handle_constraints_set(struct bridge_dev_context *dev_context,
* This function sets the group selction bits for while * This function sets the group selction bits for while
* enabling/disabling. * enabling/disabling.
*/ */
void dsp_clk_wakeup_event_ctrl(u32 ClkId, bool enable); void dsp_clk_wakeup_event_ctrl(u32 clock_id, bool enable);
#endif /* _TIOMAP_PWR_ */ #endif /* _TIOMAP_PWR_ */
...@@ -407,7 +407,7 @@ int post_scale_dsp(struct bridge_dev_context *dev_context, ...@@ -407,7 +407,7 @@ int post_scale_dsp(struct bridge_dev_context *dev_context,
return status; return status;
} }
void dsp_clk_wakeup_event_ctrl(u32 ClkId, bool enable) void dsp_clk_wakeup_event_ctrl(u32 clock_id, bool enable)
{ {
struct cfg_hostres *resources; struct cfg_hostres *resources;
int status = 0; int status = 0;
...@@ -428,7 +428,7 @@ void dsp_clk_wakeup_event_ctrl(u32 ClkId, bool enable) ...@@ -428,7 +428,7 @@ void dsp_clk_wakeup_event_ctrl(u32 ClkId, bool enable)
if (!resources) if (!resources)
return; return;
switch (ClkId) { switch (clock_id) {
case BPWR_GP_TIMER5: case BPWR_GP_TIMER5:
iva2_grpsel = (u32) *((reg_uword32 *) iva2_grpsel = (u32) *((reg_uword32 *)
((u32) (resources->dw_per_pm_base) + ((u32) (resources->dw_per_pm_base) +
......
...@@ -227,7 +227,7 @@ int write_dsp_data(struct bridge_dev_context *hDevContext, ...@@ -227,7 +227,7 @@ int write_dsp_data(struct bridge_dev_context *hDevContext,
int write_ext_dsp_data(struct bridge_dev_context *dev_context, int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *pbHostBuf, u32 dwDSPAddr, IN u8 *pbHostBuf, u32 dwDSPAddr,
u32 ul_num_bytes, u32 ulMemType, u32 ul_num_bytes, u32 ulMemType,
bool bDynamicLoad) bool dynamic_load)
{ {
u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr; u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr;
u32 dw_offset = 0; u32 dw_offset = 0;
...@@ -259,7 +259,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context, ...@@ -259,7 +259,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
} }
/* If dynamic, force remap/unmap */ /* If dynamic, force remap/unmap */
if ((bDynamicLoad || trace_load) && dw_base_addr) { if ((dynamic_load || trace_load) && dw_base_addr) {
dw_base_addr = 0; dw_base_addr = 0;
MEM_UNMAP_LINEAR_ADDRESS((void *) MEM_UNMAP_LINEAR_ADDRESS((void *)
dev_context->dw_dsp_ext_base_addr); dev_context->dw_dsp_ext_base_addr);
...@@ -271,7 +271,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context, ...@@ -271,7 +271,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
ret = dev_get_symbol(dev_context->hdev_obj, ret = dev_get_symbol(dev_context->hdev_obj,
SHMBASENAME, &ul_shm_base_virt); SHMBASENAME, &ul_shm_base_virt);
DBC_ASSERT(ul_shm_base_virt != 0); DBC_ASSERT(ul_shm_base_virt != 0);
if (bDynamicLoad) { if (dynamic_load) {
if (DSP_SUCCEEDED(ret)) { if (DSP_SUCCEEDED(ret)) {
if (symbols_reloaded) if (symbols_reloaded)
ret = ret =
...@@ -377,7 +377,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context, ...@@ -377,7 +377,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
*((u32 *) pbHostBuf) = dw_base_addr + dw_offset; *((u32 *) pbHostBuf) = dw_base_addr + dw_offset;
} }
/* Unmap here to force remap for other Ext loads */ /* Unmap here to force remap for other Ext loads */
if ((bDynamicLoad || trace_load) && dev_context->dw_dsp_ext_base_addr) { if ((dynamic_load || trace_load) && dev_context->dw_dsp_ext_base_addr) {
MEM_UNMAP_LINEAR_ADDRESS((void *) MEM_UNMAP_LINEAR_ADDRESS((void *)
dev_context->dw_dsp_ext_base_addr); dev_context->dw_dsp_ext_base_addr);
dev_context->dw_dsp_ext_base_addr = 0x0; dev_context->dw_dsp_ext_base_addr = 0x0;
......
...@@ -67,7 +67,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context, ...@@ -67,7 +67,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context,
extern int write_ext_dsp_data(struct bridge_dev_context *dev_context, extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *pbHostBuf, u32 dwDSPAddr, IN u8 *pbHostBuf, u32 dwDSPAddr,
u32 ul_num_bytes, u32 ulMemType, u32 ul_num_bytes, u32 ulMemType,
bool bDynamicLoad); bool dynamic_load);
/* /*
* ======== write_ext32_bit_dsp_data ======== * ======== write_ext32_bit_dsp_data ========
......
This diff is collapsed.
This diff is collapsed.
...@@ -42,44 +42,44 @@ struct hw_mmu_map_attrs_t { ...@@ -42,44 +42,44 @@ struct hw_mmu_map_attrs_t {
bool donotlockmpupage; bool donotlockmpupage;
}; };
extern hw_status hw_mmu_enable(const void __iomem *baseAddress); extern hw_status hw_mmu_enable(const void __iomem *base_address);
extern hw_status hw_mmu_disable(const void __iomem *baseAddress); extern hw_status hw_mmu_disable(const void __iomem *base_address);
extern hw_status hw_mmu_num_locked_set(const void __iomem *baseAddress, extern hw_status hw_mmu_num_locked_set(const void __iomem *base_address,
u32 numLockedEntries); u32 numLockedEntries);
extern hw_status hw_mmu_victim_num_set(const void __iomem *baseAddress, extern hw_status hw_mmu_victim_num_set(const void __iomem *base_address,
u32 victimEntryNum); u32 victimEntryNum);
/* For MMU faults */ /* For MMU faults */
extern hw_status hw_mmu_event_ack(const void __iomem *baseAddress, extern hw_status hw_mmu_event_ack(const void __iomem *base_address,
u32 irqMask); u32 irqMask);
extern hw_status hw_mmu_event_disable(const void __iomem *baseAddress, extern hw_status hw_mmu_event_disable(const void __iomem *base_address,
u32 irqMask); u32 irqMask);
extern hw_status hw_mmu_event_enable(const void __iomem *baseAddress, extern hw_status hw_mmu_event_enable(const void __iomem *base_address,
u32 irqMask); u32 irqMask);
extern hw_status hw_mmu_event_status(const void __iomem *baseAddress, extern hw_status hw_mmu_event_status(const void __iomem *base_address,
u32 *irqMask); u32 *irqMask);
extern hw_status hw_mmu_fault_addr_read(const void __iomem *baseAddress, extern hw_status hw_mmu_fault_addr_read(const void __iomem *base_address,
u32 *addr); u32 *addr);
/* Set the TT base address */ /* Set the TT base address */
extern hw_status hw_mmu_ttb_set(const void __iomem *baseAddress, extern hw_status hw_mmu_ttb_set(const void __iomem *base_address,
u32 TTBPhysAddr); u32 TTBPhysAddr);
extern hw_status hw_mmu_twl_enable(const void __iomem *baseAddress); extern hw_status hw_mmu_twl_enable(const void __iomem *base_address);
extern hw_status hw_mmu_twl_disable(const void __iomem *baseAddress); extern hw_status hw_mmu_twl_disable(const void __iomem *base_address);
extern hw_status hw_mmu_tlb_flush(const void __iomem *baseAddress, extern hw_status hw_mmu_tlb_flush(const void __iomem *base_address,
u32 virtualAddr, u32 pageSize); u32 virtualAddr, u32 pageSize);
extern hw_status hw_mmu_tlb_add(const void __iomem *baseAddress, extern hw_status hw_mmu_tlb_add(const void __iomem *base_address,
u32 physicalAddr, u32 physicalAddr,
u32 virtualAddr, u32 virtualAddr,
u32 pageSize, u32 pageSize,
......
...@@ -95,7 +95,7 @@ extern int cmm_create(OUT struct cmm_object **ph_cmm_mgr, ...@@ -95,7 +95,7 @@ extern int cmm_create(OUT struct cmm_object **ph_cmm_mgr,
* Destroy the communication memory manager object. * Destroy the communication memory manager object.
* Parameters: * Parameters:
* hcmm_mgr: Cmm Mgr handle. * hcmm_mgr: Cmm Mgr handle.
* bForce: Force deallocation of all cmm memory immediately if set TRUE. * force: Force deallocation of all cmm memory immediately if set TRUE.
* If FALSE, and outstanding allocations will return -EPERM * If FALSE, and outstanding allocations will return -EPERM
* status. * status.
* Returns: * Returns:
...@@ -108,7 +108,7 @@ extern int cmm_create(OUT struct cmm_object **ph_cmm_mgr, ...@@ -108,7 +108,7 @@ extern int cmm_create(OUT struct cmm_object **ph_cmm_mgr,
* Ensures: * Ensures:
* Memory resources used by Cmm Mgr are freed. * Memory resources used by Cmm Mgr are freed.
*/ */
extern int cmm_destroy(struct cmm_object *hcmm_mgr, bool bForce); extern int cmm_destroy(struct cmm_object *hcmm_mgr, bool force);
/* /*
* ======== cmm_exit ======== * ======== cmm_exit ========
...@@ -305,7 +305,7 @@ extern int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator, ...@@ -305,7 +305,7 @@ extern int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
* Delete translator resources * Delete translator resources
* Parameters: * Parameters:
* xlator: handle to translator. * xlator: handle to translator.
* bForce: bForce = TRUE will free XLators SM buffers/dscriptrs. * force: force = TRUE will free XLators SM buffers/dscriptrs.
* Returns: * Returns:
* 0: Success. * 0: Success.
* -EFAULT: Bad translator handle. * -EFAULT: Bad translator handle.
...@@ -316,7 +316,7 @@ extern int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator, ...@@ -316,7 +316,7 @@ extern int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
* *
*/ */
extern int cmm_xlator_delete(struct cmm_xlatorobject *xlator, extern int cmm_xlator_delete(struct cmm_xlatorobject *xlator,
bool bForce); bool force);
/* /*
* ======== cmm_xlator_free_buf ======== * ======== cmm_xlator_free_buf ========
......
...@@ -288,13 +288,13 @@ extern bool cod_init(void); ...@@ -288,13 +288,13 @@ extern bool cod_init(void);
* COD module initialized. * COD module initialized.
* hmgr is valid. * hmgr is valid.
* nArgc > 0. * nArgc > 0.
* aArgs != NULL. * args != NULL.
* aArgs[0] != NULL. * args[0] != NULL.
* pfn_write != NULL. * pfn_write != NULL.
* Ensures: * Ensures:
*/ */
extern int cod_load_base(struct cod_manager *cod_mgr_obj, extern int cod_load_base(struct cod_manager *cod_mgr_obj,
u32 nArgc, char *aArgs[], u32 nArgc, char *args[],
cod_writefxn pfn_write, void *pArb, cod_writefxn pfn_write, void *pArb,
char *envp[]); char *envp[]);
...@@ -364,6 +364,6 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -364,6 +364,6 @@ extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
*/ */
extern int cod_read_section(struct cod_libraryobj *lib, extern int cod_read_section(struct cod_libraryobj *lib,
IN char *pstrSect, IN char *pstrSect,
OUT char *pstrContent, IN u32 cContentSize); OUT char *pstrContent, IN u32 content_size);
#endif /* COD_ */ #endif /* COD_ */
...@@ -113,7 +113,7 @@ extern int dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr); ...@@ -113,7 +113,7 @@ extern int dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr);
* This function enumerates currently visible DSP/BIOS Bridge objects * This function enumerates currently visible DSP/BIOS Bridge objects
* and returns the UUID and type of each enumerated object. * and returns the UUID and type of each enumerated object.
* Parameters: * Parameters:
* cIndex: The object enumeration index. * index: The object enumeration index.
* obj_type: Type of object to enumerate. * obj_type: Type of object to enumerate.
* uuid_obj: Pointer to a dsp_uuid object. * uuid_obj: Pointer to a dsp_uuid object.
* Returns: * Returns:
...@@ -128,7 +128,7 @@ extern int dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr); ...@@ -128,7 +128,7 @@ extern int dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr);
* This function can be used in conjunction with dcd_get_object_def to * This function can be used in conjunction with dcd_get_object_def to
* retrieve object properties. * retrieve object properties.
*/ */
extern int dcd_enumerate_object(IN s32 cIndex, extern int dcd_enumerate_object(IN s32 index,
IN enum dsp_dcdobjtype obj_type, IN enum dsp_dcdobjtype obj_type,
OUT struct dsp_uuid *uuid_obj); OUT struct dsp_uuid *uuid_obj);
......
...@@ -61,7 +61,7 @@ struct dcd_nodeprops { ...@@ -61,7 +61,7 @@ struct dcd_nodeprops {
/* DCD Generic Object Type */ /* DCD Generic Object Type */
struct dcd_genericobj { struct dcd_genericobj {
union dcdObjUnion { union dcd_obj {
struct dcd_nodeprops node_obj; /* node object. */ struct dcd_nodeprops node_obj; /* node object. */
/* processor object. */ /* processor object. */
struct dsp_processorinfo proc_info; struct dsp_processorinfo proc_info;
......
...@@ -304,7 +304,7 @@ int cmm_create(OUT struct cmm_object **ph_cmm_mgr, ...@@ -304,7 +304,7 @@ int cmm_create(OUT struct cmm_object **ph_cmm_mgr,
* Purpose: * Purpose:
* Release the communication memory manager resources. * Release the communication memory manager resources.
*/ */
int cmm_destroy(struct cmm_object *hcmm_mgr, bool bForce) int cmm_destroy(struct cmm_object *hcmm_mgr, bool force)
{ {
struct cmm_object *cmm_mgr_obj = (struct cmm_object *)hcmm_mgr; struct cmm_object *cmm_mgr_obj = (struct cmm_object *)hcmm_mgr;
struct cmm_info temp_info; struct cmm_info temp_info;
...@@ -319,7 +319,7 @@ int cmm_destroy(struct cmm_object *hcmm_mgr, bool bForce) ...@@ -319,7 +319,7 @@ int cmm_destroy(struct cmm_object *hcmm_mgr, bool bForce)
} }
mutex_lock(&cmm_mgr_obj->cmm_lock); mutex_lock(&cmm_mgr_obj->cmm_lock);
/* If not force then fail if outstanding allocations exist */ /* If not force then fail if outstanding allocations exist */
if (!bForce) { if (!force) {
/* Check for outstanding memory allocations */ /* Check for outstanding memory allocations */
status = cmm_get_info(hcmm_mgr, &temp_info); status = cmm_get_info(hcmm_mgr, &temp_info);
if (DSP_SUCCEEDED(status)) { if (DSP_SUCCEEDED(status)) {
...@@ -989,7 +989,7 @@ int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator, ...@@ -989,7 +989,7 @@ int cmm_xlator_create(OUT struct cmm_xlatorobject **phXlator,
* Free the Xlator resources. * Free the Xlator resources.
* VM gets freed later. * VM gets freed later.
*/ */
int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool bForce) int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool force)
{ {
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator; struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
int status = 0; int status = 0;
......
...@@ -128,21 +128,21 @@ static struct file *cod_f_open(CONST char *psz_file_name, CONST char *pszMode) ...@@ -128,21 +128,21 @@ static struct file *cod_f_open(CONST char *psz_file_name, CONST char *pszMode)
return filp; return filp;
} }
static s32 cod_f_read(void __user *pbuffer, s32 size, s32 cCount, static s32 cod_f_read(void __user *pbuffer, s32 size, s32 count,
struct file *filp) struct file *filp)
{ {
/* check for valid file handle */ /* check for valid file handle */
if (!filp) if (!filp)
return -EFAULT; return -EFAULT;
if ((size > 0) && (cCount > 0) && pbuffer) { if ((size > 0) && (count > 0) && pbuffer) {
u32 dw_bytes_read; u32 dw_bytes_read;
mm_segment_t fs; mm_segment_t fs;
/* read from file */ /* read from file */
fs = get_fs(); fs = get_fs();
set_fs(get_ds()); set_fs(get_ds());
dw_bytes_read = filp->f_op->read(filp, pbuffer, size * cCount, dw_bytes_read = filp->f_op->read(filp, pbuffer, size * count,
&(filp->f_pos)); &(filp->f_pos));
set_fs(fs); set_fs(fs);
...@@ -155,7 +155,7 @@ static s32 cod_f_read(void __user *pbuffer, s32 size, s32 cCount, ...@@ -155,7 +155,7 @@ static s32 cod_f_read(void __user *pbuffer, s32 size, s32 cCount,
return -EINVAL; return -EINVAL;
} }
static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 cOrigin) static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 origin)
{ {
loff_t dw_cur_pos; loff_t dw_cur_pos;
...@@ -164,7 +164,7 @@ static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 cOrigin) ...@@ -164,7 +164,7 @@ static s32 cod_f_seek(struct file *filp, s32 lOffset, s32 cOrigin)
return -EFAULT; return -EFAULT;
/* based on the origin flag, move the internal pointer */ /* based on the origin flag, move the internal pointer */
dw_cur_pos = filp->f_op->llseek(filp, lOffset, cOrigin); dw_cur_pos = filp->f_op->llseek(filp, lOffset, origin);
if ((s32) dw_cur_pos < 0) if ((s32) dw_cur_pos < 0)
return -EPERM; return -EPERM;
...@@ -487,12 +487,12 @@ bool cod_init(void) ...@@ -487,12 +487,12 @@ bool cod_init(void)
* loaded must be the first element of the args array and must be a fully * loaded must be the first element of the args array and must be a fully
* qualified pathname. * qualified pathname.
* Details: * Details:
* if nArgc doesn't match the number of arguments in the aArgs array, the * if nArgc doesn't match the number of arguments in the args array, the
* aArgs array is searched for a NULL terminating entry, and argc is * args array is searched for a NULL terminating entry, and argc is
* recalculated to reflect this. In this way, we can support NULL * recalculated to reflect this. In this way, we can support NULL
* terminating aArgs arrays, if nArgc is very large. * terminating args arrays, if nArgc is very large.
*/ */
int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *aArgs[], int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *args[],
cod_writefxn pfn_write, void *pArb, char *envp[]) cod_writefxn pfn_write, void *pArb, char *envp[])
{ {
dbll_flags flags; dbll_flags flags;
...@@ -504,8 +504,8 @@ int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *aArgs[], ...@@ -504,8 +504,8 @@ int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *aArgs[],
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr)); DBC_REQUIRE(IS_VALID(hmgr));
DBC_REQUIRE(nArgc > 0); DBC_REQUIRE(nArgc > 0);
DBC_REQUIRE(aArgs != NULL); DBC_REQUIRE(args != NULL);
DBC_REQUIRE(aArgs[0] != NULL); DBC_REQUIRE(args[0] != NULL);
DBC_REQUIRE(pfn_write != NULL); DBC_REQUIRE(pfn_write != NULL);
DBC_REQUIRE(hmgr->base_lib != NULL); DBC_REQUIRE(hmgr->base_lib != NULL);
...@@ -514,7 +514,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *aArgs[], ...@@ -514,7 +514,7 @@ int cod_load_base(struct cod_manager *hmgr, u32 nArgc, char *aArgs[],
* reflect true number in NULL terminated argv array. * reflect true number in NULL terminated argv array.
*/ */
for (i = 0; i < nArgc; i++) { for (i = 0; i < nArgc; i++) {
if (aArgs[i] == NULL) { if (args[i] == NULL) {
nArgc = i; nArgc = i;
break; break;
} }
...@@ -626,7 +626,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath, ...@@ -626,7 +626,7 @@ int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
* Retrieve the content of a code section given the section name. * Retrieve the content of a code section given the section name.
*/ */
int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect, int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
OUT char *pstrContent, IN u32 cContentSize) OUT char *pstrContent, IN u32 content_size)
{ {
int status = 0; int status = 0;
...@@ -639,7 +639,7 @@ int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect, ...@@ -639,7 +639,7 @@ int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
if (lib != NULL) if (lib != NULL)
status = status =
lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, pstrSect, lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, pstrSect,
pstrContent, cContentSize); pstrContent, content_size);
else else
status = -ESPIPE; status = -ESPIPE;
......
...@@ -72,8 +72,8 @@ static u32 table_size; /* The size of virt and phys pages tables */ ...@@ -72,8 +72,8 @@ static u32 table_size; /* The size of virt and phys pages tables */
/* ----------------------------------- Function Prototypes */ /* ----------------------------------- Function Prototypes */
static struct map_page *get_region(u32 addr); static struct map_page *get_region(u32 addr);
static struct map_page *get_free_region(u32 aSize); static struct map_page *get_free_region(u32 len);
static struct map_page *get_mapped_region(u32 aAddr); static struct map_page *get_mapped_region(u32 addrs);
/* ======== dmm_create_tables ======== /* ======== dmm_create_tables ========
* Purpose: * Purpose:
...@@ -405,14 +405,14 @@ int dmm_un_reserve_memory(struct dmm_object *dmm_mgr, u32 rsv_addr) ...@@ -405,14 +405,14 @@ int dmm_un_reserve_memory(struct dmm_object *dmm_mgr, u32 rsv_addr)
* Purpose: * Purpose:
* Returns a region containing the specified memory region * Returns a region containing the specified memory region
*/ */
static struct map_page *get_region(u32 aAddr) static struct map_page *get_region(u32 addrs)
{ {
struct map_page *curr_region = NULL; struct map_page *curr_region = NULL;
u32 i = 0; u32 i = 0;
if (virtual_mapping_table != NULL) { if (virtual_mapping_table != NULL) {
/* find page mapped by this address */ /* find page mapped by this address */
i = DMM_ADDR_TO_INDEX(aAddr); i = DMM_ADDR_TO_INDEX(addrs);
if (i < table_size) if (i < table_size)
curr_region = virtual_mapping_table + i; curr_region = virtual_mapping_table + i;
} }
...@@ -427,7 +427,7 @@ static struct map_page *get_region(u32 aAddr) ...@@ -427,7 +427,7 @@ static struct map_page *get_region(u32 aAddr)
* Purpose: * Purpose:
* Returns the requested free region * Returns the requested free region
*/ */
static struct map_page *get_free_region(u32 aSize) static struct map_page *get_free_region(u32 len)
{ {
struct map_page *curr_region = NULL; struct map_page *curr_region = NULL;
u32 i = 0; u32 i = 0;
...@@ -436,7 +436,7 @@ static struct map_page *get_free_region(u32 aSize) ...@@ -436,7 +436,7 @@ static struct map_page *get_free_region(u32 aSize)
if (virtual_mapping_table == NULL) if (virtual_mapping_table == NULL)
return curr_region; return curr_region;
if (aSize > free_size) { if (len > free_size) {
/* Find the largest free region /* Find the largest free region
* (coalesce during the traversal) */ * (coalesce during the traversal) */
while (i < table_size) { while (i < table_size) {
...@@ -461,10 +461,10 @@ static struct map_page *get_free_region(u32 aSize) ...@@ -461,10 +461,10 @@ static struct map_page *get_free_region(u32 aSize)
i = next_i; i = next_i;
} }
} }
if (aSize <= free_size) { if (len <= free_size) {
curr_region = virtual_mapping_table + free_region; curr_region = virtual_mapping_table + free_region;
free_region += (aSize / PG_SIZE4K); free_region += (len / PG_SIZE4K);
free_size -= aSize; free_size -= len;
} }
return curr_region; return curr_region;
} }
...@@ -474,7 +474,7 @@ static struct map_page *get_free_region(u32 aSize) ...@@ -474,7 +474,7 @@ static struct map_page *get_free_region(u32 aSize)
* Purpose: * Purpose:
* Returns the requestedmapped region * Returns the requestedmapped region
*/ */
static struct map_page *get_mapped_region(u32 aAddr) static struct map_page *get_mapped_region(u32 addrs)
{ {
u32 i = 0; u32 i = 0;
struct map_page *curr_region = NULL; struct map_page *curr_region = NULL;
...@@ -482,7 +482,7 @@ static struct map_page *get_mapped_region(u32 aAddr) ...@@ -482,7 +482,7 @@ static struct map_page *get_mapped_region(u32 aAddr)
if (virtual_mapping_table == NULL) if (virtual_mapping_table == NULL)
return curr_region; return curr_region;
i = DMM_ADDR_TO_INDEX(aAddr); i = DMM_ADDR_TO_INDEX(addrs);
if (i < table_size && (virtual_mapping_table[i].mapped || if (i < table_size && (virtual_mapping_table[i].mapped ||
virtual_mapping_table[i].reserved)) virtual_mapping_table[i].reserved))
curr_region = virtual_mapping_table + i; curr_region = virtual_mapping_table + i;
......
...@@ -65,8 +65,8 @@ static s32 atoi(char *psz_buf); ...@@ -65,8 +65,8 @@ static s32 atoi(char *psz_buf);
static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size, static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
enum dsp_dcdobjtype obj_type, enum dsp_dcdobjtype obj_type,
struct dcd_genericobj *pGenObj); struct dcd_genericobj *pGenObj);
static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize); static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 char_size);
static char dsp_char2_gpp_char(char *pWord, s32 cDspCharSize); static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size);
static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr, static int get_dep_lib_info(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj, IN struct dsp_uuid *uuid_obj,
IN OUT u16 *pNumLibs, IN OUT u16 *pNumLibs,
...@@ -193,7 +193,7 @@ int dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr) ...@@ -193,7 +193,7 @@ int dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr)
* Purpose: * Purpose:
* Enumerates objects in the DCD. * Enumerates objects in the DCD.
*/ */
int dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type, int dcd_enumerate_object(IN s32 index, IN enum dsp_dcdobjtype obj_type,
OUT struct dsp_uuid *uuid_obj) OUT struct dsp_uuid *uuid_obj)
{ {
int status = 0; int status = 0;
...@@ -206,10 +206,10 @@ int dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type, ...@@ -206,10 +206,10 @@ int dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type,
int len; int len;
DBC_REQUIRE(refs >= 0); DBC_REQUIRE(refs >= 0);
DBC_REQUIRE(cIndex >= 0); DBC_REQUIRE(index >= 0);
DBC_REQUIRE(uuid_obj != NULL); DBC_REQUIRE(uuid_obj != NULL);
if ((cIndex != 0) && (enum_refs == 0)) { if ((index != 0) && (enum_refs == 0)) {
/* /*
* If an enumeration is being performed on an index greater * If an enumeration is being performed on an index greater
* than zero, then the current enum_refs must have been * than zero, then the current enum_refs must have been
...@@ -257,7 +257,7 @@ int dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type, ...@@ -257,7 +257,7 @@ int dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type,
spin_lock(&dbdcd_lock); spin_lock(&dbdcd_lock);
list_for_each_entry(dcd_key, &reg_key_list, link) { list_for_each_entry(dcd_key, &reg_key_list, link) {
if (!strncmp(dcd_key->name, sz_reg_key, len) if (!strncmp(dcd_key->name, sz_reg_key, len)
&& !cIndex--) { && !index--) {
strncpy(sz_value, &dcd_key->name[len], strncpy(sz_value, &dcd_key->name[len],
strlen(&dcd_key->name[len]) + 1); strlen(&dcd_key->name[len]) + 1);
break; break;
...@@ -1321,7 +1321,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size, ...@@ -1321,7 +1321,7 @@ static int get_attrs_from_buf(char *psz_buf, u32 ul_buf_size,
* Purpose: * Purpose:
* Compress the DSP buffer, if necessary, to conform to PC format. * Compress the DSP buffer, if necessary, to conform to PC format.
*/ */
static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize) static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 char_size)
{ {
char *p; char *p;
char ch; char ch;
...@@ -1332,10 +1332,10 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize) ...@@ -1332,10 +1332,10 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize)
return; return;
for (q = psz_buf; q < (psz_buf + ul_buf_size);) { for (q = psz_buf; q < (psz_buf + ul_buf_size);) {
ch = dsp_char2_gpp_char(q, cCharSize); ch = dsp_char2_gpp_char(q, char_size);
if (ch == '\\') { if (ch == '\\') {
q += cCharSize; q += char_size;
ch = dsp_char2_gpp_char(q, cCharSize); ch = dsp_char2_gpp_char(q, char_size);
switch (ch) { switch (ch) {
case 't': case 't':
*p = '\t'; *p = '\t';
...@@ -1361,7 +1361,7 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize) ...@@ -1361,7 +1361,7 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize)
*p = ch; *p = ch;
} }
p++; p++;
q += cCharSize; q += char_size;
} }
/* NULL out remainder of buffer. */ /* NULL out remainder of buffer. */
...@@ -1374,13 +1374,13 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize) ...@@ -1374,13 +1374,13 @@ static void compress_buf(char *psz_buf, u32 ul_buf_size, s32 cCharSize)
* Purpose: * Purpose:
* Convert DSP char to host GPP char in a portable manner * Convert DSP char to host GPP char in a portable manner
*/ */
static char dsp_char2_gpp_char(char *pWord, s32 cDspCharSize) static char dsp_char2_gpp_char(char *pWord, s32 dsp_char_size)
{ {
char ch = '\0'; char ch = '\0';
char *ch_src; char *ch_src;
s32 i; s32 i;
for (ch_src = pWord, i = cDspCharSize; i > 0; i--) for (ch_src = pWord, i = dsp_char_size; i > 0; i--)
ch |= *ch_src++; ch |= *ch_src++;
return ch; return ch;
......
...@@ -116,7 +116,7 @@ u32 dsp_init(OUT u32 *init_status) ...@@ -116,7 +116,7 @@ u32 dsp_init(OUT u32 *init_status)
* ======== dsp_deinit ======== * ======== dsp_deinit ========
* Frees the resources allocated for bridge. * Frees the resources allocated for bridge.
*/ */
bool dsp_deinit(u32 deviceContext) bool dsp_deinit(u32 device_ctxt)
{ {
bool ret = true; bool ret = true;
u32 device_node; u32 device_node;
...@@ -126,10 +126,10 @@ bool dsp_deinit(u32 deviceContext) ...@@ -126,10 +126,10 @@ bool dsp_deinit(u32 deviceContext)
(void)dev_remove_device((struct cfg_devnode *)device_node); (void)dev_remove_device((struct cfg_devnode *)device_node);
(void)drv_release_resources((u32) device_node, (void)drv_release_resources((u32) device_node,
(struct drv_object *)deviceContext); (struct drv_object *)device_ctxt);
} }
(void)drv_destroy((struct drv_object *)deviceContext); (void)drv_destroy((struct drv_object *)device_ctxt);
/* Get the Manager Object from Registry /* Get the Manager Object from Registry
* MGR Destroy will unload the DCD dll */ * MGR Destroy will unload the DCD dll */
......
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