static u32 find_ready_output(struct chnl_mgr *chnl_mgr_obj,
struct chnl_object *pchnl, u32 mask);
static u32 read_data(struct bridge_dev_context *dev_ctxt, void *dest,
- void *pSrc, u32 usize);
+ void *src, u32 usize);
static u32 write_data(struct bridge_dev_context *dev_ctxt, void *dest,
- void *pSrc, u32 usize);
+ void *src, u32 usize);
/* Bus Addr (cached kernel) */
static int register_shm_segs(struct io_mgr *hio_mgr,
* out the dispatch of I/O as a non-preemptible event.It can only be
* pre-empted by an ISR.
*/
-void io_dpc(IN OUT unsigned long pRefData)
+void io_dpc(IN OUT unsigned long ref_data)
{
- struct io_mgr *pio_mgr = (struct io_mgr *)pRefData;
+ struct io_mgr *pio_mgr = (struct io_mgr *)ref_data;
struct chnl_mgr *chnl_mgr_obj;
struct msg_mgr *msg_mgr_obj;
struct deh_mgr *hdeh_mgr;
* Copies buffers from the shared memory to the host buffer.
*/
static u32 read_data(struct bridge_dev_context *dev_ctxt, void *dest,
- void *pSrc, u32 usize)
+ void *src, u32 usize)
{
- memcpy(dest, pSrc, usize);
+ memcpy(dest, src, usize);
return usize;
}
* Copies buffers from the host side buffer to the shared memory.
*/
static u32 write_data(struct bridge_dev_context *dev_ctxt, void *dest,
- void *pSrc, u32 usize)
+ void *src, u32 usize)
{
- memcpy(dest, pSrc, usize);
+ memcpy(dest, src, usize);
return usize;
}
* Gets the Processor's Load information
*/
int bridge_io_get_proc_load(IN struct io_mgr *hio_mgr,
- OUT struct dsp_procloadstat *pProcStat)
+ OUT struct dsp_procloadstat *proc_lstat)
{
- pProcStat->curr_load = hio_mgr->shared_mem->load_mon_info.curr_dsp_load;
- pProcStat->predicted_load =
+ proc_lstat->curr_load =
+ hio_mgr->shared_mem->load_mon_info.curr_dsp_load;
+ proc_lstat->predicted_load =
hio_mgr->shared_mem->load_mon_info.pred_dsp_load;
- pProcStat->curr_dsp_freq =
+ proc_lstat->curr_dsp_freq =
hio_mgr->shared_mem->load_mon_info.curr_dsp_freq;
- pProcStat->predicted_freq =
+ proc_lstat->predicted_freq =
hio_mgr->shared_mem->load_mon_info.pred_dsp_freq;
dev_dbg(bridge, "Curr Load = %d, Pred Load = %d, Curr Freq = %d, "
- "Pred Freq = %d\n", pProcStat->curr_load,
- pProcStat->predicted_load, pProcStat->curr_dsp_freq,
- pProcStat->predicted_freq);
+ "Pred Freq = %d\n", proc_lstat->curr_load,
+ proc_lstat->predicted_load, proc_lstat->curr_dsp_freq,
+ proc_lstat->predicted_freq);
return 0;
}
* TypE : const u32
* Description : It indicates the page size
*
- * Identifier : preservedBit
+ * Identifier : preserved_bit
* Type : const u32
* Description : It indicates the TLB entry is preserved entry
* or not
*/
static hw_status mmu_set_cam_entry(const void __iomem *base_address,
const u32 page_sz,
- const u32 preservedBit,
+ const u32 preserved_bit,
const u32 validBit,
const u32 virtual_addr_tag);
u32 page_sz,
u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
- s8 preservedBit, s8 validBit)
+ s8 preserved_bit, s8 validBit)
{
hw_status status = RET_OK;
u32 lock_reg;
virtual_addr_tag = ((virtualAddr & MMU_ADDR_MASK) >> 12);
/* Write the fields in the CAM Entry Register */
- mmu_set_cam_entry(base_address, mmu_pg_size, preservedBit, validBit,
+ mmu_set_cam_entry(base_address, mmu_pg_size, preserved_bit, validBit,
virtual_addr_tag);
/* Write the different fields of the RAM Entry Register */
/* mmu_set_cam_entry */
static hw_status mmu_set_cam_entry(const void __iomem *base_address,
const u32 page_sz,
- const u32 preservedBit,
+ const u32 preserved_bit,
const u32 validBit,
const u32 virtual_addr_tag)
{
mmu_cam_reg = (virtual_addr_tag << 12);
mmu_cam_reg = (mmu_cam_reg) | (page_sz) | (validBit << 2) |
- (preservedBit << 3);
+ (preserved_bit << 3);
/* write values to register */
MMUMMU_CAM_WRITE_REGISTER32(base_address, mmu_cam_reg);
u32 page_sz,
u32 entry_num,
struct hw_mmu_map_attrs_t *map_attrs,
- s8 preservedBit, s8 validBit);
+ s8 preserved_bit, s8 validBit);
/* For PTEs */
extern hw_status hw_mmu_pte_set(const u32 pg_tbl_va,
* Parameters:
* dev_node_obj: Handle to the dev_node who's driver we are querying.
* buf_size: Size of buffer.
- * pstrExecFile: Ptr to character buf to hold ExecFile.
+ * str_exec_file: Ptr to character buf to hold ExecFile.
* Returns:
* 0: Success.
- * -EFAULT: dev_node_obj is invalid or pstrExecFile is invalid.
+ * -EFAULT: dev_node_obj is invalid or str_exec_file is invalid.
* -ENODATA: The resource is not available.
* Requires:
* CFG initialized.
* Ensures:
- * 0: Not more than buf_size bytes were copied into pstrExecFile,
- * and *pstrExecFile contains default executable for this
+ * 0: Not more than buf_size bytes were copied into str_exec_file,
+ * and *str_exec_file contains default executable for this
* devnode.
*/
extern int cfg_get_exec_file(IN struct cfg_devnode *dev_node_obj,
- IN u32 buf_size, OUT char *pstrExecFile);
+ IN u32 buf_size, OUT char *str_exec_file);
/*
* ======== cfg_get_object ========
* Parameters:
* cod_mgr_obj - manager in which to search for the symbol
* pstrSect - name of the section, with or without leading "."
- * pstrContent - buffer to store content of the section.
+ * str_content - buffer to store content of the section.
* Returns:
* 0: on success, error code on failure
* -ESPIPE: Symbols have not been loaded onto the board.
* COD module initialized.
* valid cod_mgr_obj.
* pstrSect != NULL;
- * pstrContent != NULL;
+ * str_content != NULL;
* Ensures:
- * 0: *pstrContent stores the content of the named section.
+ * 0: *str_content stores the content of the named section.
*/
extern int cod_read_section(struct cod_libraryobj *lib,
IN char *pstrSect,
- OUT char *pstrContent, IN u32 content_size);
+ OUT char *str_content, IN u32 content_size);
#endif /* COD_ */
extern void dbll_delete(struct dbll_tar_obj *target);
extern void dbll_exit(void);
extern bool dbll_get_addr(struct dbll_library_obj *lib, char *name,
- struct dbll_sym_val **ppSym);
+ struct dbll_sym_val **sym_val);
extern void dbll_get_attrs(struct dbll_tar_obj *target,
struct dbll_attrs *pattrs);
extern bool dbll_get_c_addr(struct dbll_library_obj *lib, char *name,
- struct dbll_sym_val **ppSym);
+ struct dbll_sym_val **sym_val);
extern int dbll_get_sect(struct dbll_library_obj *lib, char *name,
u32 *paddr, u32 *psize);
extern bool dbll_init(void);
* Parameters:
* lib - Handle returned from dbll_open().
* name - Name of symbol
- * ppSym - Location to store symbol address on output.
+ * sym_val - Location to store symbol address on output.
* Returns:
* TRUE: Success.
* FALSE: Symbol not found.
* DBL initialized.
* Valid library.
* name != NULL.
- * ppSym != NULL.
+ * sym_val != NULL.
* Ensures:
*/
typedef bool(*dbll_get_addr_fxn) (struct dbll_library_obj *lib, char *name,
- struct dbll_sym_val **ppSym);
+ struct dbll_sym_val **sym_val);
/*
* ======== dbll_get_attrs ========
* Parameters:
* lib - Handle returned from dbll_open().
* name - Name of symbol
- * ppSym - Location to store symbol address on output.
+ * sym_val - Location to store symbol address on output.
* Returns:
* TRUE: Success.
* FALSE: Symbol not found.
* DBL initialized.
* Valid target.
* name != NULL.
- * ppSym != NULL.
+ * sym_val != NULL.
* Ensures:
*/
typedef bool(*dbll_get_c_addr_fxn) (struct dbll_library_obj *lib, char *name,
- struct dbll_sym_val **ppSym);
+ struct dbll_sym_val **sym_val);
/*
* ======== dbll_get_sect ========
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * *ppIntfFxns: Ptr to location to store fxn interface.
+ * *if_fxns: Ptr to location to store fxn interface.
* Returns:
* 0: Success.
* -EFAULT: Invalid hdev_obj.
* Requires:
- * ppIntfFxns != NULL.
+ * if_fxns != NULL.
* DEV Initialized.
* Ensures:
- * 0: *ppIntfFxns contains a pointer to the Bridge
+ * 0: *if_fxns contains a pointer to the Bridge
* driver interface;
- * else: *ppIntfFxns is NULL.
+ * else: *if_fxns is NULL.
*/
extern int dev_get_intf_fxns(struct dev_object *hdev_obj,
- OUT struct bridge_drv_interface **ppIntfFxns);
+ OUT struct bridge_drv_interface **if_fxns);
/*
* ======== dev_get_io_mgr ========
* Parameters:
* byte_size: Number of bytes to allocate.
* ulAlign: Alignment Mask.
- * pPhysicalAddress: Physical address of allocated memory.
+ * physical_address: Physical address of allocated memory.
* Returns:
* Pointer to a block of memory;
* NULL if memory couldn't be allocated, or if byte_size == 0.
* location of memory.
*/
extern void *mem_alloc_phys_mem(IN u32 byte_size,
- IN u32 ulAlign, OUT u32 *pPhysicalAddress);
+ IN u32 ulAlign, OUT u32 *physical_address);
/*
* ======== mem_free_phys_mem ========
* Parameters:
* pVirtualAddress: Pointer to virtual memory region allocated
* by mem_alloc_phys_mem().
- * pPhysicalAddress: Pointer to physical memory region allocated
+ * physical_address: Pointer to physical memory region allocated
* by mem_alloc_phys_mem().
* byte_size: Size of the memory region allocated by mem_alloc_phys_mem().
* Returns:
* pVirtualAddress is no longer a valid pointer to memory.
*/
extern void mem_free_phys_mem(void *pVirtualAddress,
- u32 pPhysicalAddress, u32 byte_size);
+ u32 physical_address, u32 byte_size);
/*
* ======== MEM_LINEAR_ADDRESS ========
* Purpose:
* Get the linear address corresponding to the given physical address.
* Parameters:
- * pPhysAddr: Physical address to be mapped.
+ * phys_addr: Physical address to be mapped.
* byte_size: Number of bytes in physical range to map.
* Returns:
* The corresponding linear address, or NULL if unsuccessful.
* Parameters:
* cmd: IOCTL id, base 0.
* args: Argument structure.
- * pResult:
+ * result:
* Returns:
* 0 if command called; -EINVAL if command not in IOCTL
* table.
*/
extern int api_call_dev_ioctl(unsigned int cmd,
union Trapped_Args *args,
- u32 *pResult, void *pr_ctxt);
+ u32 *result, void *pr_ctxt);
/*
* ======== api_init ========
* Called to get the Processor's current and predicted load
* Parameters:
* hio_mgr: IO Manager.
- * pProcLoadStat Processor Load statistics
+ * proc_load_stat Processor Load statistics
* Returns:
* 0: Success.
* -EPERM: Internal failure occurred.
*/
typedef int(*fxn_io_getprocload) (struct io_mgr *hio_mgr,
struct dsp_procloadstat *
- pProcLoadStat);
+ proc_load_stat);
/*
* ======== bridge_msg_create ========
extern int iva_io_on_loaded(struct io_mgr *hio_mgr);
extern int bridge_io_get_proc_load(IN struct io_mgr *hio_mgr,
- OUT struct dsp_procloadstat *pProcStat);
+ OUT struct dsp_procloadstat *proc_lstat);
#endif /* DSPIO_ */
* Deferred procedure call for shared memory channel driver ISR. Carries
* out the dispatch of I/O.
* Parameters:
- * pRefData: Pointer to reference data registered via a call to
+ * ref_data: Pointer to reference data registered via a call to
* DPC_Create().
* Returns:
* Requires:
* Ensures:
* Non-preemptible (but interruptible).
*/
-extern void io_dpc(IN OUT unsigned long pRefData);
+extern void io_dpc(IN OUT unsigned long ref_data);
/*
* ======== io_mbox_msg ========
* Calls the Bridge's chnlsm_isr to determine if this interrupt is ours,
* then schedules a DPC to dispatch I/O.
* Parameters:
- * pRefData: Pointer to the channel manager object for this board.
+ * ref_data: Pointer to the channel manager object for this board.
* Set in an initial call to ISR_Install().
* Returns:
* TRUE if interrupt handled; FALSE otherwise.
* Report the state of the specified DSP processor.
* Parameters:
* hprocessor : The processor handle.
- * procID : Processor ID
+ * proc_id : Processor ID
*
* Returns:
* 0 : Success.
* Ensures:
* Details:
*/
-extern int proc_get_processor_id(void *hprocessor, u32 * procID);
+extern int proc_get_processor_id(void *hprocessor, u32 * proc_id);
/*
* ======== proc_get_trace ========
* dynamically loaded object files.
*
*/
-int cod_create(OUT struct cod_manager **mgr, char *pstrDummyFile,
+int cod_create(OUT struct cod_manager **mgr, char *str_dummy_file,
IN OPTIONAL CONST struct cod_attrs *attrs)
{
struct cod_manager *mgr_new;
* Retrieve the content of a code section given the section name.
*/
int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
- OUT char *pstrContent, IN u32 content_size)
+ OUT char *str_content, IN u32 content_size)
{
int status = 0;
DBC_REQUIRE(lib != NULL);
DBC_REQUIRE(IS_VALID(lib->cod_mgr));
DBC_REQUIRE(pstrSect != NULL);
- DBC_REQUIRE(pstrContent != NULL);
+ DBC_REQUIRE(str_content != NULL);
if (lib != NULL)
status =
lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, pstrSect,
- pstrContent, content_size);
+ str_content, content_size);
else
status = -ESPIPE;
* Get address of name in the specified library.
*/
bool dbll_get_addr(struct dbll_library_obj *zl_lib, char *name,
- struct dbll_sym_val **ppSym)
+ struct dbll_sym_val **sym_val)
{
struct dbll_symbol *sym;
bool status = false;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(zl_lib);
DBC_REQUIRE(name != NULL);
- DBC_REQUIRE(ppSym != NULL);
+ DBC_REQUIRE(sym_val != NULL);
DBC_REQUIRE(zl_lib->sym_tab != NULL);
sym = (struct dbll_symbol *)gh_find(zl_lib->sym_tab, name);
if (sym != NULL) {
- *ppSym = &sym->value;
+ *sym_val = &sym->value;
status = true;
}
dev_dbg(bridge, "%s: lib: %p name: %s paddr: %p, status 0x%x\n",
- __func__, zl_lib, name, ppSym, status);
+ __func__, zl_lib, name, sym_val, status);
return status;
}
* Get address of a "C" name in the specified library.
*/
bool dbll_get_c_addr(struct dbll_library_obj *zl_lib, char *name,
- struct dbll_sym_val **ppSym)
+ struct dbll_sym_val **sym_val)
{
struct dbll_symbol *sym;
char cname[MAXEXPR + 1];
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(zl_lib);
- DBC_REQUIRE(ppSym != NULL);
+ DBC_REQUIRE(sym_val != NULL);
DBC_REQUIRE(zl_lib->sym_tab != NULL);
DBC_REQUIRE(name != NULL);
sym = (struct dbll_symbol *)gh_find(zl_lib->sym_tab, cname);
if (sym != NULL) {
- *ppSym = &sym->value;
+ *sym_val = &sym->value;
status = true;
}
* ======== dev_get_intf_fxns ========
* Purpose:
* Retrieve the Bridge interface function structure for the loaded driver.
- * ppIntfFxns != NULL.
+ * if_fxns != NULL.
*/
int dev_get_intf_fxns(struct dev_object *hdev_obj,
- OUT struct bridge_drv_interface **ppIntfFxns)
+ OUT struct bridge_drv_interface **if_fxns)
{
int status = 0;
struct dev_object *dev_obj = hdev_obj;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(ppIntfFxns != NULL);
+ DBC_REQUIRE(if_fxns != NULL);
if (hdev_obj) {
- *ppIntfFxns = &dev_obj->bridge_interface;
+ *if_fxns = &dev_obj->bridge_interface;
} else {
- *ppIntfFxns = NULL;
+ *if_fxns = NULL;
status = -EFAULT;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((ppIntfFxns != NULL) &&
- (*ppIntfFxns == NULL)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((if_fxns != NULL) &&
+ (*if_fxns == NULL)));
return status;
}
* Allocate physically contiguous, uncached memory from external memory pool
*/
-static void *mem_ext_phys_mem_alloc(u32 bytes, u32 align, OUT u32 * pPhysAddr)
+static void *mem_ext_phys_mem_alloc(u32 bytes, u32 align, OUT u32 * phys_addr)
{
u32 new_alloc_ptr;
u32 offset;
if (bytes > ((ext_mem_pool.phys_mem_base + ext_mem_pool.phys_mem_size)
- ext_mem_pool.next_phys_alloc_ptr)) {
- pPhysAddr = NULL;
+ phys_addr = NULL;
return NULL;
} else {
offset = (ext_mem_pool.next_phys_alloc_ptr & (align - 1));
if ((new_alloc_ptr + bytes) <=
(ext_mem_pool.phys_mem_base + ext_mem_pool.phys_mem_size)) {
/* we can allocate */
- *pPhysAddr = new_alloc_ptr;
+ *phys_addr = new_alloc_ptr;
ext_mem_pool.next_phys_alloc_ptr =
new_alloc_ptr + bytes;
virt_addr =
phys_mem_base);
return (void *)virt_addr;
} else {
- *pPhysAddr = 0;
+ *phys_addr = 0;
return NULL;
}
}
* Purpose:
* Allocate physically contiguous, uncached memory
*/
-void *mem_alloc_phys_mem(u32 byte_size, u32 ulAlign, OUT u32 * pPhysicalAddress)
+void *mem_alloc_phys_mem(u32 byte_size, u32 ulAlign, OUT u32 * physical_address)
{
void *va_mem = NULL;
dma_addr_t pa_mem;
va_mem = dma_alloc_coherent(NULL, byte_size, &pa_mem,
GFP_KERNEL);
if (va_mem == NULL)
- *pPhysicalAddress = 0;
+ *physical_address = 0;
else
- *pPhysicalAddress = pa_mem;
+ *physical_address = pa_mem;
}
return va_mem;
}
* Purpose:
* Free the given block of physically contiguous memory.
*/
-void mem_free_phys_mem(void *pVirtualAddress, u32 pPhysicalAddress,
+void mem_free_phys_mem(void *pVirtualAddress, u32 physical_address,
u32 byte_size)
{
DBC_REQUIRE(pVirtualAddress != NULL);
if (!ext_phys_mem_pool_enabled)
dma_free_coherent(NULL, byte_size, pVirtualAddress,
- pPhysicalAddress);
+ physical_address);
}
enum dsp_dcdobjtype obj_type, IN void *handle);
static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **lst,
- struct dbll_sect_info *pSectInfo,
+ struct dbll_sect_info *sect_inf,
bool *exists, u32 addr, u32 bytes);
static s32 fake_ovly_write(void *handle, u32 dsp_address, void *buf, u32 bytes,
s32 mtype);
enum nldr_phase phase, u16 depth);
static int load_ovly(struct nldr_nodeobject *nldr_node_obj,
enum nldr_phase phase);
-static int remote_alloc(void **pRef, u16 mem_sect_type, u32 size,
+static int remote_alloc(void **ref, u16 mem_sect_type, u32 size,
u32 align, u32 *dsp_address,
OPTIONAL s32 segmentId,
OPTIONAL s32 req, bool reserve);
-static int remote_free(void **pRef, u16 space, u32 dsp_address, u32 size,
+static int remote_free(void **ref, u16 space, u32 dsp_address, u32 size,
bool reserve);
static void unload_lib(struct nldr_nodeobject *nldr_node_obj,
*/
static int add_ovly_sect(struct nldr_object *nldr_obj,
struct ovly_sect **lst,
- struct dbll_sect_info *pSectInfo,
+ struct dbll_sect_info *sect_inf,
bool *exists, u32 addr, u32 bytes)
{
struct ovly_sect *new_sect = NULL;
status = -ENOMEM;
} else {
new_sect->sect_load_addr = addr;
- new_sect->sect_run_addr = pSectInfo->sect_run_addr +
- (addr - pSectInfo->sect_load_addr);
+ new_sect->sect_run_addr = sect_inf->sect_run_addr +
+ (addr - sect_inf->sect_load_addr);
new_sect->size = bytes;
- new_sect->page = pSectInfo->type;
+ new_sect->page = sect_inf->type;
}
/* Add to the list */
/*
* ======== remote_alloc ========
*/
-static int remote_alloc(void **pRef, u16 space, u32 size,
+static int remote_alloc(void **ref, u16 space, u32 size,
u32 align, u32 *dsp_address,
OPTIONAL s32 segmentId, OPTIONAL s32 req,
bool reserve)
{
- struct nldr_nodeobject *hnode = (struct nldr_nodeobject *)pRef;
+ struct nldr_nodeobject *hnode = (struct nldr_nodeobject *)ref;
struct nldr_object *nldr_obj;
struct rmm_target_obj *rmm;
u16 mem_phase_bit = MAXFLAGS;
return status;
}
-static int remote_free(void **pRef, u16 space, u32 dsp_address,
+static int remote_free(void **ref, u16 space, u32 dsp_address,
u32 size, bool reserve)
{
- struct nldr_object *nldr_obj = (struct nldr_object *)pRef;
+ struct nldr_object *nldr_obj = (struct nldr_object *)ref;
struct rmm_target_obj *rmm;
u32 word_size;
int status = -ENOMEM; /* Set to fail */
* Purpose:
* Retrieves the processor ID.
*/
-int proc_get_processor_id(void *proc, u32 * procID)
+int proc_get_processor_id(void *proc, u32 * proc_id)
{
int status = 0;
struct proc_object *p_proc_object = (struct proc_object *)proc;
if (p_proc_object)
- *procID = p_proc_object->processor_id;
+ *proc_id = p_proc_object->processor_id;
else
status = -EFAULT;
* Retreive the default executable, if any, for this board.
*/
int cfg_get_exec_file(struct cfg_devnode *dev_node_obj, u32 ul_buf_size,
- OUT char *pstrExecFile)
+ OUT char *str_exec_file)
{
int status = 0;
struct drv_data *drv_datap = dev_get_drvdata(bridge);
if (!dev_node_obj)
status = -EFAULT;
- else if (!pstrExecFile || !drv_datap)
+ else if (!str_exec_file || !drv_datap)
status = -EFAULT;
if (strlen(drv_datap->base_img) > ul_buf_size)
status = -EINVAL;
if (DSP_SUCCEEDED(status) && drv_datap->base_img)
- strcpy(pstrExecFile, drv_datap->base_img);
+ strcpy(str_exec_file, drv_datap->base_img);
if (DSP_FAILED(status))
pr_err("%s: Failed, status 0x%x\n", __func__, status);
DBC_ENSURE(((status == 0) &&
- (strlen(pstrExecFile) <= ul_buf_size))
+ (strlen(str_exec_file) <= ul_buf_size))
|| (status != 0));
return status;
}