Commit 5e2eae57 authored by Rene Sapiens's avatar Rene Sapiens Committed by Greg Kroah-Hartman
Browse files

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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:
+4 −4
Original line number Diff line number Diff line
@@ -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 *)
+37 −37
Original line number Diff line number Diff line
@@ -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;
+3 −3
Original line number Diff line number Diff line
@@ -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;
+3 −3
Original line number Diff line number Diff line
@@ -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);

/*
Loading