Commit 5e2eae57 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:
========================================
ulBrdState to brd_state
ulChnl to chnl
ulDspAddr to dsp_add
ulDspDestAddr to dsp_dest_addr
ulDspLoadAddr to dsp_load_addr
ulDspRunAddr to dsp_run_addr
ulDspSrcAddr to dsp_src_addr
ulMapAttrs to map_attr
ulMemType to mem_type
ulRMSFxn to rms_fxn
ulStatus to ret
ulVirtAddr to virt_addr
uNumDesc to num_desc
uNumToDSP to num_to_dsp
uPaSize to pa_size
uPhase to phase
uSegId to segm_id
uStream1 to stream1
uStream2 to stream2
uZId to zid
========================================
Signed-off-by: default avatarRene Sapiens <rene.sapiens@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0cd343a4
......@@ -816,7 +816,7 @@ u32 io_buf_size(struct io_mgr *hio_mgr)
* ======== io_cancel_chnl ========
* Cancel IO on a given PCPY channel.
*/
void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl)
void io_cancel_chnl(struct io_mgr *hio_mgr, u32 chnl)
{
struct io_mgr *pio_mgr = (struct io_mgr *)hio_mgr;
struct shm *sm;
......@@ -827,7 +827,7 @@ void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl)
/* Inform DSP that we have no more buffers on this channel */
IO_AND_VALUE(pio_mgr->hbridge_context, struct shm, sm, host_free_mask,
(~(1 << ulChnl)));
(~(1 << chnl)));
sm_interrupt_dsp(pio_mgr->hbridge_context, MBX_PCPY_CLASS);
func_end:
......
......@@ -40,7 +40,7 @@
/* ----------------------------------- Function Prototypes */
static int add_new_msg(struct lst_list *msg_list);
static void delete_msg_mgr(struct msg_mgr *hmsg_mgr);
static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP);
static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 num_to_dsp);
static void free_msg_list(struct lst_list *msg_list);
/*
......@@ -602,7 +602,7 @@ static void delete_msg_mgr(struct msg_mgr *hmsg_mgr)
/*
* ======== delete_msg_queue ========
*/
static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP)
static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 num_to_dsp)
{
struct msg_mgr *hmsg_mgr;
struct msg_frame *pmsg;
......@@ -614,8 +614,8 @@ static void delete_msg_queue(struct msg_queue *msg_queue_obj, u32 uNumToDSP)
hmsg_mgr = msg_queue_obj->hmsg_mgr;
/* Pull off uNumToDSP message frames from Msg manager and free */
for (i = 0; i < uNumToDSP; i++) {
/* Pull off num_to_dsp message frames from Msg manager and free */
for (i = 0; i < num_to_dsp; i++) {
if (!LST_IS_EMPTY(hmsg_mgr->msg_free_list)) {
pmsg = (struct msg_frame *)
......
......@@ -78,7 +78,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_context);
static int bridge_brd_read(struct bridge_dev_context *dev_context,
OUT u8 *host_buff,
u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);
u32 mem_type);
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,
......@@ -87,21 +87,21 @@ 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,
u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);
u32 mem_type);
static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
u32 ulBrdState);
u32 brd_state);
static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
u32 ulDspDestAddr, u32 ulDspSrcAddr,
u32 ul_num_bytes, u32 ulMemType);
u32 dsp_dest_addr, u32 dsp_src_addr,
u32 ul_num_bytes, u32 mem_type);
static int bridge_brd_mem_write(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
u32 ul_num_bytes, u32 mem_type);
static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr,
u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes, u32 ul_map_attr,
struct page **mapped_pages);
static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes);
u32 virt_addr, u32 ul_num_bytes);
static int bridge_dev_create(OUT struct bridge_dev_context
**dev_cntxt,
struct dev_object *hdev_obj,
......@@ -116,7 +116,7 @@ static int pte_update(struct bridge_dev_context *dev_ctxt, u32 pa,
static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,
u32 size, struct hw_mmu_map_attrs_t *attrs);
static int mem_map_vmalloc(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr,
u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes,
struct hw_mmu_map_attrs_t *hw_attrs);
......@@ -305,7 +305,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt)
*/
static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;
......@@ -322,7 +322,7 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
offset = dsp_addr - dev_context->dw_dsp_start_add;
} else {
status = read_ext_dsp_data(dev_context, host_buff, dsp_addr,
ul_num_bytes, ulMemType);
ul_num_bytes, mem_type);
return status;
}
/* copy the data from DSP memory, */
......@@ -336,12 +336,12 @@ static int bridge_brd_read(struct bridge_dev_context *dev_ctxt,
* This routine updates the Board status.
*/
static int bridge_brd_set_state(struct bridge_dev_context *dev_ctxt,
u32 ulBrdState)
u32 brd_state)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;
dev_context->dw_brd_state = ulBrdState;
dev_context->dw_brd_state = brd_state;
return status;
}
......@@ -766,7 +766,7 @@ static int bridge_brd_status(struct bridge_dev_context *dev_ctxt,
*/
static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;
......@@ -778,10 +778,10 @@ static int bridge_brd_write(struct bridge_dev_context *dev_ctxt,
if ((dsp_addr - dev_context->dw_dsp_start_add) <
dev_context->dw_internal_size) {
status = write_dsp_data(dev_ctxt, host_buff, dsp_addr,
ul_num_bytes, ulMemType);
ul_num_bytes, mem_type);
} else {
status = write_ext_dsp_data(dev_context, host_buff, dsp_addr,
ul_num_bytes, ulMemType, false);
ul_num_bytes, mem_type, false);
}
return status;
......@@ -1107,12 +1107,12 @@ static int bridge_dev_destroy(struct bridge_dev_context *dev_ctxt)
}
static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
u32 ulDspDestAddr, u32 ulDspSrcAddr,
u32 ul_num_bytes, u32 ulMemType)
u32 dsp_dest_addr, u32 dsp_src_addr,
u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
u32 src_addr = ulDspSrcAddr;
u32 dest_addr = ulDspDestAddr;
u32 src_addr = dsp_src_addr;
u32 dest_addr = dsp_dest_addr;
u32 copy_bytes = 0;
u32 total_bytes = ul_num_bytes;
u8 host_buf[BUFFERSIZE];
......@@ -1122,20 +1122,20 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
total_bytes > BUFFERSIZE ? BUFFERSIZE : total_bytes;
/* Read from External memory */
status = read_ext_dsp_data(dev_ctxt, host_buf, src_addr,
copy_bytes, ulMemType);
copy_bytes, mem_type);
if (DSP_SUCCEEDED(status)) {
if (dest_addr < (dev_context->dw_dsp_start_add +
dev_context->dw_internal_size)) {
/* Write to Internal memory */
status = write_dsp_data(dev_ctxt, host_buf,
dest_addr, copy_bytes,
ulMemType);
mem_type);
} else {
/* Write to External memory */
status =
write_ext_dsp_data(dev_ctxt, host_buf,
dest_addr, copy_bytes,
ulMemType, false);
mem_type, false);
}
}
total_bytes -= copy_bytes;
......@@ -1148,7 +1148,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
/* Mem Write does not halt the DSP to write unlike bridge_brd_write */
static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;
......@@ -1162,11 +1162,11 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
dev_context->dw_internal_size)) {
status =
write_dsp_data(dev_ctxt, host_buff, dsp_addr,
ul_bytes, ulMemType);
ul_bytes, mem_type);
} else {
status = write_ext_dsp_data(dev_ctxt, host_buff,
dsp_addr, ul_bytes,
ulMemType, true);
mem_type, true);
}
ul_remain_bytes -= ul_bytes;
dsp_addr += ul_bytes;
......@@ -1185,7 +1185,7 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
* TODO: Disable MMU while updating the page tables (but that'll stall DSP)
*/
static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 ul_mpu_addr, u32 ulVirtAddr,
u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes, u32 ul_map_attr,
struct page **mapped_pages)
{
......@@ -1199,14 +1199,14 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
u32 num_usr_pgs = 0;
struct page *mapped_page, *pg;
s32 pg_num;
u32 va = ulVirtAddr;
u32 va = virt_addr;
struct task_struct *curr_task = current;
u32 pg_i = 0;
u32 mpu_addr, pa;
dev_dbg(bridge,
"%s hDevCtxt %p, pa %x, va %x, size %x, ul_map_attr %x\n",
__func__, dev_ctxt, ul_mpu_addr, ulVirtAddr, ul_num_bytes,
__func__, dev_ctxt, ul_mpu_addr, virt_addr, ul_num_bytes,
ul_map_attr);
if (ul_num_bytes == 0)
return -EINVAL;
......@@ -1253,7 +1253,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
hw_attrs.donotlockmpupage = 0;
if (attrs & DSP_MAPVMALLOCADDR) {
return mem_map_vmalloc(dev_ctxt, ul_mpu_addr, ulVirtAddr,
return mem_map_vmalloc(dev_ctxt, ul_mpu_addr, virt_addr,
ul_num_bytes, &hw_attrs);
}
/*
......@@ -1262,7 +1262,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
* Pass the translated pa to pte_update.
*/
if ((attrs & DSP_MAPPHYSICALADDR)) {
status = pte_update(dev_context, ul_mpu_addr, ulVirtAddr,
status = pte_update(dev_context, ul_mpu_addr, virt_addr,
ul_num_bytes, &hw_attrs);
goto func_cont;
}
......@@ -1383,7 +1383,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
* mapping
*/
if (pg_i) {
bridge_brd_mem_un_map(dev_context, ulVirtAddr,
bridge_brd_mem_un_map(dev_context, virt_addr,
(pg_i * PG_SIZE4K));
}
status = -EPERM;
......@@ -1408,7 +1408,7 @@ static int bridge_brd_mem_map(struct bridge_dev_context *dev_ctxt,
* we clear consecutive PTEs until we unmap all the bytes
*/
static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes)
u32 virt_addr, u32 ul_num_bytes)
{
u32 l1_base_va;
u32 l2_base_va;
......@@ -1430,13 +1430,13 @@ static int bridge_brd_mem_un_map(struct bridge_dev_context *dev_ctxt,
u32 paddr;
u32 numof4k_pages = 0;
va_curr = ulVirtAddr;
va_curr = virt_addr;
rem_bytes = ul_num_bytes;
rem_bytes_l2 = 0;
l1_base_va = pt->l1_base_va;
pte_addr_l1 = hw_mmu_pte_addr_l1(l1_base_va, va_curr);
dev_dbg(bridge, "%s dev_ctxt %p, va %x, NumBytes %x l1_base_va %x, "
"pte_addr_l1 %x\n", __func__, dev_ctxt, ulVirtAddr,
"pte_addr_l1 %x\n", __func__, dev_ctxt, virt_addr,
ul_num_bytes, l1_base_va, pte_addr_l1);
while (rem_bytes && (DSP_SUCCEEDED(status))) {
......@@ -1771,7 +1771,7 @@ static int pte_set(struct pg_table_attrs *pt, u32 pa, u32 va,
/* Memory map kernel VA -- memory allocated with vmalloc */
static int mem_map_vmalloc(struct bridge_dev_context *dev_context,
u32 ul_mpu_addr, u32 ulVirtAddr,
u32 ul_mpu_addr, u32 virt_addr,
u32 ul_num_bytes,
struct hw_mmu_map_attrs_t *hw_attrs)
{
......@@ -1830,7 +1830,7 @@ static int mem_map_vmalloc(struct bridge_dev_context *dev_context,
get_page(PHYS_TO_PAGE(pa));
pa += HW_PAGE_SIZE4KB;
}
status = pte_update(dev_context, pa_curr, ulVirtAddr +
status = pte_update(dev_context, pa_curr, virt_addr +
(va_curr - ul_mpu_addr), size_curr,
hw_attrs);
va_curr += size_curr;
......
......@@ -52,7 +52,7 @@ bool symbols_reloaded = true;
*/
int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType)
u32 ul_num_bytes, u32 mem_type)
{
int status = 0;
struct bridge_dev_context *dev_context = dev_ctxt;
......@@ -180,7 +180,7 @@ int read_ext_dsp_data(struct bridge_dev_context *dev_ctxt,
*/
int write_dsp_data(struct bridge_dev_context *dev_ctxt,
IN u8 *host_buff, u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType)
u32 mem_type)
{
u32 offset;
u32 dw_base_addr = dev_ctxt->dw_dsp_base_addr;
......@@ -226,7 +226,7 @@ int write_dsp_data(struct bridge_dev_context *dev_ctxt,
*/
int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType,
u32 ul_num_bytes, u32 mem_type,
bool dynamic_load)
{
u32 dw_base_addr = dev_context->dw_dsp_ext_base_addr;
......
......@@ -49,14 +49,14 @@
*/
extern int read_ext_dsp_data(struct bridge_dev_context *dev_context,
OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
u32 ul_num_bytes, u32 mem_type);
/*
* ======== write_dsp_data ========
*/
extern int write_dsp_data(struct bridge_dev_context *dev_context,
OUT u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
u32 ul_num_bytes, u32 mem_type);
/*
* ======== write_ext_dsp_data ========
......@@ -66,7 +66,7 @@ extern int write_dsp_data(struct bridge_dev_context *dev_context,
*/
extern int write_ext_dsp_data(struct bridge_dev_context *dev_context,
IN u8 *host_buff, u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType,
u32 ul_num_bytes, u32 mem_type,
bool dynamic_load);
/*
......
......@@ -262,17 +262,17 @@ extern int cmm_un_register_gppsm_seg(struct cmm_object *hcmm_mgr,
* Parameters:
* xlator: Handle to a Xlator object.
* va_buf: Virtual address ptr(client context)
* uPaSize: Size of SM memory to allocate.
* pa_size: Size of SM memory to allocate.
* Returns:
* Ptr to valid physical address(Pa) of uPaSize bytes, NULL if failed.
* Ptr to valid physical address(Pa) of pa_size bytes, NULL if failed.
* Requires:
* va_buf != 0.
* uPaSize != 0.
* pa_size != 0.
* Ensures:
*
*/
extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator,
void *va_buf, u32 uPaSize);
void *va_buf, u32 pa_size);
/*
* ======== cmm_xlator_create ========
......@@ -346,7 +346,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator,
* xlator: handle to translator.
* paddr: Virtual base address of segment.
* ul_size: Size in bytes.
* uSegId: Segment identifier of SM segment(s)
* segm_id: Segment identifier of SM segment(s)
* set_info Set xlator fields if TRUE, else return base addr
* Returns:
* 0: Success.
......@@ -360,7 +360,7 @@ extern int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator,
*/
extern int cmm_xlator_info(struct cmm_xlatorobject *xlator,
IN OUT u8 **paddr,
u32 ul_size, u32 uSegId, bool set_info);
u32 ul_size, u32 segm_id, bool set_info);
/*
* ======== cmm_xlator_translate ========
......
......@@ -49,7 +49,7 @@ struct cod_attrs {
* Function prototypes for writing memory to a DSP system, allocating
* and freeing DSP memory.
*/
typedef u32(*cod_writefxn) (void *priv_ref, u32 ulDspAddr,
typedef u32(*cod_writefxn) (void *priv_ref, u32 dsp_add,
void *pbuf, u32 ul_num_bytes, u32 mem_space);
/*
......
......@@ -45,7 +45,7 @@
* dsp_addr: Address on DSP board (Destination).
* host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer.
* mem_type: Memory space on DSP to which to transfer.
* Returns:
* Number of bytes written. Returns 0 if the DEV_hObject passed in via
* arb is invalid.
......@@ -55,7 +55,7 @@
* Ensures:
*/
extern u32 dev_brd_write_fxn(void *arb,
u32 ulDspAddr,
u32 dsp_add,
void *host_buf, u32 ul_num_bytes, u32 mem_space);
/*
......@@ -622,7 +622,7 @@ extern int dev_remove_proc_object(struct dev_object
* set up by a watchdog timer.
* Parameters:
* hdev_obj: Handle to device object created with dev_create_device().
* ulStatus: A status word, most likely a BRD_STATUS.
* ret: A status word, most likely a BRD_STATUS.
* Returns:
* 0: All registered clients were asynchronously notified.
* -EINVAL: Invalid hdev_obj.
......@@ -633,7 +633,7 @@ extern int dev_remove_proc_object(struct dev_object
* delivered to clients. This function does not ensure that
* the notifications will ever be delivered.
*/
extern int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus);
extern int dev_notify_clients(struct dev_object *hdev_obj, u32 ret);
/*
* ======== dev_remove_device ========
......
......@@ -74,19 +74,19 @@ typedef int(*fxn_brd_monitor) (struct bridge_dev_context *dev_ctxt);
* Sets the Bridge driver state
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device info.
* ulBrdState: Board state
* brd_state: Board state
* Returns:
* 0: Success.
* -EPERM: Other, unspecified error.
* Requires:
* dev_ctxt != NULL;
* ulBrdState <= BRD_LASTSTATE.
* brd_state <= BRD_LASTSTATE.
* Ensures:
* ulBrdState <= BRD_LASTSTATE.
* brd_state <= BRD_LASTSTATE.
* Update the Board state to the specified state.
*/
typedef int(*fxn_brd_setstate) (struct bridge_dev_context
* dev_ctxt, u32 ulBrdState);
* dev_ctxt, u32 brd_state);
/*
* ======== bridge_brd_start ========
......@@ -116,10 +116,10 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context
* Copy memory from one DSP address to another
* Parameters:
* dev_context: Pointer to context handle
* ulDspDestAddr: DSP address to copy to
* ulDspSrcAddr: DSP address to copy from
* dsp_dest_addr: DSP address to copy to
* dsp_src_addr: DSP address to copy from
* ul_num_bytes: Number of bytes to copy
* ulMemType: What section of memory to copy to
* mem_type: What section of memory to copy to
* Returns:
* 0: Success.
* -EPERM: Other, unspecified error.
......@@ -132,9 +132,9 @@ typedef int(*fxn_brd_start) (struct bridge_dev_context
*/
typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* dev_ctxt,
u32 ulDspDestAddr,
u32 ulDspSrcAddr,
u32 ul_num_bytes, u32 ulMemType);
u32 dsp_dest_addr,
u32 dsp_src_addr,
u32 ul_num_bytes, u32 mem_type);
/*
* ======== bridge_brd_mem_write ========
* Purpose:
......@@ -145,7 +145,7 @@ typedef int(*fxn_brd_memcopy) (struct bridge_dev_context
* dsp_addr: Address on DSP board (Destination).
* host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer.
* mem_type: Memory space on DSP to which to transfer.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
......@@ -159,7 +159,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* dev_ctxt,
IN u8 *host_buf,
u32 dsp_addr, u32 ul_num_bytes,
u32 ulMemType);
u32 mem_type);
/*
* ======== bridge_brd_mem_map ========
......@@ -168,7 +168,7 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device info.
* ul_mpu_addr: MPU memory region start address.
* ulVirtAddr: DSP/IVA memory region u8 address.
* virt_addr: DSP/IVA memory region u8 address.
* ul_num_bytes: Number of bytes to map.
* map_attrs: Mapping attributes (e.g. endianness).
* Returns:
......@@ -180,8 +180,8 @@ typedef int(*fxn_brd_memwrite) (struct bridge_dev_context
*/
typedef int(*fxn_brd_memmap) (struct bridge_dev_context
* dev_ctxt, u32 ul_mpu_addr,
u32 ulVirtAddr, u32 ul_num_bytes,
u32 ulMapAttrs,
u32 virt_addr, u32 ul_num_bytes,
u32 map_attr,
struct page **mapped_pages);
/*
......@@ -190,7 +190,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context
* UnMap an MPU memory region from DSP/IVA memory space
* Parameters:
* dev_ctxt: Handle to Bridge driver defined device info.
* ulVirtAddr: DSP/IVA memory region u8 address.
* virt_addr: DSP/IVA memory region u8 address.
* ul_num_bytes: Number of bytes to unmap.
* Returns:
* 0: Success.
......@@ -201,7 +201,7 @@ typedef int(*fxn_brd_memmap) (struct bridge_dev_context
*/
typedef int(*fxn_brd_memunmap) (struct bridge_dev_context
* dev_ctxt,
u32 ulVirtAddr, u32 ul_num_bytes);
u32 virt_addr, u32 ul_num_bytes);
/*
* ======== bridge_brd_stop ========
......@@ -251,7 +251,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
* host_buf: Pointer to host buffer (Destination).
* dsp_addr: Address on DSP board (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP from which to transfer.
* mem_type: Memory space on DSP from which to transfer.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
......@@ -265,7 +265,7 @@ typedef int(*fxn_brd_status) (struct bridge_dev_context *dev_ctxt,
typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
OUT u8 *host_buf,
u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
u32 ul_num_bytes, u32 mem_type);
/*
* ======== bridge_brd_write ========
......@@ -277,7 +277,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
* dsp_addr: Address on DSP board (Destination).
* host_buf: Pointer to host buffer (Source).
* ul_num_bytes: Number of bytes to transfer.
* ulMemType: Memory space on DSP to which to transfer.
* mem_type: Memory space on DSP to which to transfer.
* Returns:
* 0: Success.
* -ETIMEDOUT: Timeout occured waiting for a response from hardware.
......@@ -290,7 +290,7 @@ typedef int(*fxn_brd_read) (struct bridge_dev_context *dev_ctxt,
typedef int(*fxn_brd_write) (struct bridge_dev_context *dev_ctxt,
IN u8 *host_buf,
u32 dsp_addr,
u32 ul_num_bytes, u32 ulMemType);
u32 ul_num_bytes, u32 mem_type);
/*
* ======== bridge_chnl_create ========
......@@ -351,17 +351,17 @@ typedef int(*fxn_chnl_destroy) (struct chnl_mgr *hchnl_mgr);
* When notified of DSP error, take appropriate action.
* Parameters:
* hdeh_mgr: Handle to DEH manager object.
* ulEventMask: Indicate the type of exception
* evnt_mask: Indicate the type of exception
* error_info: Error information
* Returns:
*
* Requires:
* hdeh_mgr != NULL;
* ulEventMask with a valid exception
* evnt_mask with a valid exception
* Ensures:
*/
typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
u32 ulEventMask, u32 error_info);
u32 evnt_mask, u32 error_info);
/*
* ======== bridge_chnl_open ========
......
......@@ -54,13 +54,13 @@ extern u32 vdd1_dsp_freq[6][4];
* Cancel IO on a given channel.
* Parameters:
* hio_mgr: IO Manager.
* ulChnl: Index of channel to cancel IO on.
* chnl: Index of channel to cancel IO on.
* Returns:
* Requires:
* Valid hio_mgr.
* Ensures:
*/
extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 ulChnl);
extern void io_cancel_chnl(struct io_mgr *hio_mgr, u32 chnl);
/*
* ======== io_dpc ========
......@@ -142,20 +142,20 @@ extern void iosm_schedule(struct io_mgr *hio_mgr);
* Parameters:
* hio_mgr: Handle to a I/O manager.
* ddma_chnl_id: DDMA channel identifier.
* uNumDesc: Number of buffer descriptors(equals # of IOReqs &
* num_desc: Number of buffer descriptors(equals # of IOReqs &
* Chirps)
* dsp: Dsp address;
* Returns:
* Requires:
* ddma_chnl_id < DDMA_MAXDDMACHNLS
* uNumDesc > 0
* num_desc > 0
* pVa != NULL
* pDspPa != NULL
*
* Ensures:
*/
extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id,
u32 uNumDesc, void *dsp);
u32 num_desc, void *dsp);
/*
* ======== io_ddma_clear_chnl_desc ========
......@@ -202,14 +202,14 @@ extern void io_ddma_request_chnl(struct io_mgr *hio_mgr,
* Initialize ZCPY channel descriptor.
* Parameters:
* hio_mgr: Handle to a I/O manager.
* uZId: zero-copy channel identifier.
* zid: zero-copy channel identifier.
* Returns:
* Requires:
* ddma_chnl_id < DDMA_MAXZCPYCHNLS
* hio_mgr != Null
* Ensures:
*/
extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 uZId);
extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 zid);
/*
* ======== io_ddzc_clear_chnl_desc ========
......
......@@ -45,8 +45,8 @@ enum nldr_loadtype {
*
* Parameters:
* priv_ref: Handle to identify the node.
* ulDspRunAddr: Run address of code or data.
* ulDspLoadAddr: Load address of code or data.
* dsp_run_addr: Run address of code or data.
* dsp_load_addr: Load address of code or data.
* ul_num_bytes: Number of (GPP) bytes to copy.
* mem_space: RMS_CODE or RMS_DATA.
* Returns:
......@@ -55,15 +55,15 @@ enum nldr_loadtype {
* Requires:
* Ensures:
*/
typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr,
u32 ulDspLoadAddr, u32 ul_num_bytes, u32 mem_space);
typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 dsp_run_addr,
u32 dsp_load_addr, u32 ul_num_bytes, u32 mem_space);
/*
* ======== nldr_writefxn ========
* Write memory function. Used for dynamic load writes.
* Parameters:
* priv_ref: Handle to identify the node.
* ulDspAddr: Address of code or data.
* dsp_add: Address of code or data.
* pbuf: Code or data to be written
* ul_num_bytes: Number of (GPP) bytes to write.
* mem_space: DBLL_DATA or DBLL_CODE.
......@@ -74,7 +74,7 @@ typedef u32(*nldr_ovlyfxn) (void *priv_ref, u32 ulDspRunAddr,
* Ensures:
*/
typedef u32(*nldr_writefxn) (void *priv_ref,
u32 ulDspAddr, void *pbuf,
u32 dsp_add, void *pbuf,
u32 ul_num_bytes, u32 mem_space);
/*
......
......@@ -147,11 +147,11 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* if this is a connection from DSP node to GPP, or a
* node handle returned from a successful call to
* node_allocate().
* uStream1: Output stream index on first node, to be connected
* stream1: Output stream index on first node, to be connected
* to second node's input stream. Value must range from
* 0 <= uStream1 < number of output streams.
* uStream2: Input stream index on second node. Value must range
* from 0 <= uStream2 < number of input streams.
* 0 <= stream1 < number of output streams.
* stream2: Input stream index on second node. Value must range
* from 0 <= stream2 < number of input streams.
* pattrs: Stream attributes (NULL ==> use defaults).
* conn_param: A pointer to a dsp_cbdata structure that defines
* connection parameter for device nodes to pass to DSP
......@@ -167,7 +167,7 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* -ENOMEM: Insufficient host memory.
* -EINVAL: A stream index parameter is invalid.
* -EISCONN: A connection already exists for one of the
* indices uStream1 or uStream2.
* indices stream1 or stream2.
* -EBADR: Either node1 or node2 is not in the
* NODE_ALLOCATED state.
* -ECONNREFUSED: No more connections available.
......@@ -179,9 +179,9 @@ extern int node_close_orphans(struct node_mgr *hnode_mgr,
* Ensures:
*/
extern int node_connect(struct node_object *node1,
u32 uStream1,
u32 stream1,
struct node_object *node2,
u32 uStream2,
u32 stream2,
OPTIONAL IN struct dsp_strmattr *pattrs,
OPTIONAL IN struct dsp_cbdata
*conn_param);
......
......@@ -1008,7 +1008,7 @@ int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool force)
* ======== cmm_xlator_alloc_buf ========
*/
void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
u32 uPaSize)
u32 pa_size)
{
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
void *pbuf = NULL;
......@@ -1018,7 +1018,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
DBC_REQUIRE(xlator != NULL);
DBC_REQUIRE(xlator_obj->hcmm_mgr != NULL);
DBC_REQUIRE(va_buf != NULL);
DBC_REQUIRE(uPaSize > 0);
DBC_REQUIRE(pa_size > 0);
DBC_REQUIRE(xlator_obj->ul_seg_id > 0);
if (xlator_obj) {
......@@ -1026,7 +1026,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
*(volatile u32 *)va_buf = 0;
/* Alloc SM */
pbuf =
cmm_calloc_buf(xlator_obj->hcmm_mgr, uPaSize, &attrs, NULL);
cmm_calloc_buf(xlator_obj->hcmm_mgr, pa_size, &attrs, NULL);
if (pbuf) {
/* convert to translator(node/strm) process Virtual
* address */
......@@ -1076,14 +1076,14 @@ int cmm_xlator_free_buf(struct cmm_xlatorobject *xlator, void *buf_va)
* Set/Get translator info.
*/
int cmm_xlator_info(struct cmm_xlatorobject *xlator, IN OUT u8 ** paddr,
u32 ul_size, u32 uSegId, bool set_info)
u32 ul_size, u32 segm_id, bool set_info)
{
struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
int status = 0;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(paddr != NULL);
DBC_REQUIRE((uSegId > 0) && (uSegId <= CMM_MAXGPPSEGS));
DBC_REQUIRE((segm_id > 0) && (segm_id <= CMM_MAXGPPSEGS));
if (xlator_obj) {
if (set_info) {
......
......@@ -100,7 +100,7 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
* is passed a handle to a DEV_hObject, then calls the
* device's bridge_brd_write() function.
*/
u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *host_buf,
u32 dev_brd_write_fxn(void *arb, u32 dsp_add, void *host_buf,
u32 ul_num_bytes, u32 mem_space)
{
struct dev_object *dev_obj = (struct dev_object *)arb;
......@@ -114,7 +114,7 @@ u32 dev_brd_write_fxn(void *arb, u32 ulDspAddr, void *host_buf,
DBC_ASSERT(dev_obj->hbridge_context != NULL);
status = (*dev_obj->bridge_interface.pfn_brd_write) (
dev_obj->hbridge_context, host_buf,
ulDspAddr, ul_num_bytes, mem_space);
dsp_add, ul_num_bytes, mem_space);
/* Special case of getting the address only */
if (ul_num_bytes == 0)
ul_num_bytes = 1;
......@@ -798,7 +798,7 @@ bool dev_init(void)
* Purpose:
* Notify all clients of this device of a change in device status.
*/
int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus)
int dev_notify_clients(struct dev_object *hdev_obj, u32 ret)
{
int status = 0;
......@@ -809,7 +809,7 @@ int dev_notify_clients(struct dev_object *hdev_obj, u32 ulStatus)
proc_obj != NULL;
proc_obj = (void *)lst_next(dev_obj->proc_list,
(struct list_head *)proc_obj))
proc_notify_clients(proc_obj, (u32) ulStatus);
proc_notify_clients(proc_obj, (u32) ret);
return status;
}
......
......@@ -223,7 +223,7 @@ bool disp_init(void)
*/
int disp_node_change_priority(struct disp_object *disp_obj,
struct node_object *hnode,
u32 ulRMSFxn, nodeenv node_env, s32 prio)
u32 rms_fxn, nodeenv node_env, s32 prio)
{
u32 dw_arg;
struct rms_command *rms_cmd;
......@@ -235,7 +235,7 @@ int disp_node_change_priority(struct disp_object *disp_obj,
/* Send message to RMS to change priority */
rms_cmd = (struct rms_command *)(disp_obj->pbuf);
rms_cmd->fxn = (rms_word) (ulRMSFxn);
rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = prio;
status = send_message(disp_obj, node_get_timeout(hnode),
......@@ -249,7 +249,7 @@ int disp_node_change_priority(struct disp_object *disp_obj,
* Create a node on the DSP by remotely calling the node's create function.
*/
int disp_node_create(struct disp_object *disp_obj,
struct node_object *hnode, u32 ulRMSFxn,
struct node_object *hnode, u32 rms_fxn,
u32 ul_create_fxn,
IN CONST struct node_createargs *pargs,
OUT nodeenv *node_env)
......@@ -351,7 +351,7 @@ int disp_node_create(struct disp_object *disp_obj,
total = 0; /* Total number of words in buffer so far */
pdw_buf = (rms_word *) disp_obj->pbuf;
rms_cmd = (struct rms_command *)pdw_buf;
rms_cmd->fxn = (rms_word) (ulRMSFxn);
rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) (ul_create_fxn);
if (node_get_load_type(hnode) == NLDR_DYNAMICLOAD) {
/* Flush ICACHE on Load */
......@@ -485,7 +485,7 @@ int disp_node_create(struct disp_object *disp_obj,
*
*/
int disp_node_delete(struct disp_object *disp_obj,
struct node_object *hnode, u32 ulRMSFxn,
struct node_object *hnode, u32 rms_fxn,
u32 ul_delete_fxn, nodeenv node_env)
{
u32 dw_arg;
......@@ -507,7 +507,7 @@ int disp_node_delete(struct disp_object *disp_obj,
* Fill in buffer to send to RMS
*/
rms_cmd = (struct rms_command *)disp_obj->pbuf;
rms_cmd->fxn = (rms_word) (ulRMSFxn);
rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = (rms_word) (ul_delete_fxn);
rms_cmd->data = node_get_type(hnode);
......@@ -539,7 +539,7 @@ int disp_node_delete(struct disp_object *disp_obj,
* that has been suspended (via DISP_NodePause()) on the DSP.
*/
int disp_node_run(struct disp_object *disp_obj,
struct node_object *hnode, u32 ulRMSFxn,
struct node_object *hnode, u32 rms_fxn,
u32 ul_execute_fxn, nodeenv node_env)
{
u32 dw_arg;
......@@ -560,7 +560,7 @@ int disp_node_run(struct disp_object *disp_obj,
* Fill in buffer to send to RMS.
*/
rms_cmd = (struct rms_command *)disp_obj->pbuf;
rms_cmd->fxn = (rms_word) (ulRMSFxn);
rms_cmd->fxn = (rms_word) (rms_fxn);
rms_cmd->arg1 = (rms_word) node_env;
rms_cmd->arg2 = (rms_word) (ul_execute_fxn);
rms_cmd->data = node_get_type(hnode);
......
This diff is collapsed.
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