aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/tidspbridge
diff options
context:
space:
mode:
authorErnesto Ramos <ernesto@ti.com>2010-07-28 10:40:51 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-28 11:22:04 -0400
commitb3c8aef0a2334e088c21757d3143954c774c6da0 (patch)
tree86a7783a4a874f68cc17699fa8198bb7d374a6dd /drivers/staging/tidspbridge
parent74ea8ff93b3759f27e6677076fe80c0c9c3f209d (diff)
staging:ti dspbridge: remove unnecessary volatile variables
Remove unnecessary volatile variables; use accessor functions __raw_readl/__raw_writel instead when applicable. Signed-off-by: Ernesto Ramos <ernesto@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/tidspbridge')
-rw-r--r--drivers/staging/tidspbridge/core/tiomap3430.c8
-rw-r--r--drivers/staging/tidspbridge/dynload/tramp.c4
-rw-r--r--drivers/staging/tidspbridge/pmgr/cmm.c7
3 files changed, 10 insertions, 9 deletions
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 08a2f5fcbfb..ae1f394904e 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -404,7 +404,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
404 pr_err("%s: Illegal SM base\n", __func__); 404 pr_err("%s: Illegal SM base\n", __func__);
405 status = -EPERM; 405 status = -EPERM;
406 } else 406 } else
407 *((volatile u32 *)dw_sync_addr) = 0xffffffff; 407 __raw_writel(0xffffffff, dw_sync_addr);
408 408
409 if (DSP_SUCCEEDED(status)) { 409 if (DSP_SUCCEEDED(status)) {
410 resources = dev_context->resources; 410 resources = dev_context->resources;
@@ -584,7 +584,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
584 dev_dbg(bridge, "Waiting for Sync @ 0x%x\n", dw_sync_addr); 584 dev_dbg(bridge, "Waiting for Sync @ 0x%x\n", dw_sync_addr);
585 dev_dbg(bridge, "DSP c_int00 Address = 0x%x\n", dsp_addr); 585 dev_dbg(bridge, "DSP c_int00 Address = 0x%x\n", dsp_addr);
586 if (dsp_debug) 586 if (dsp_debug)
587 while (*((volatile u16 *)dw_sync_addr)) 587 while (__raw_readw(dw_sync_addr))
588 ;; 588 ;;
589 589
590 /* Wait for DSP to clear word in shared memory */ 590 /* Wait for DSP to clear word in shared memory */
@@ -602,7 +602,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
602 /* Write the synchronization bit to indicate the 602 /* Write the synchronization bit to indicate the
603 * completion of OPP table update to DSP 603 * completion of OPP table update to DSP
604 */ 604 */
605 *((volatile u32 *)dw_sync_addr) = 0XCAFECAFE; 605 __raw_writel(0XCAFECAFE, dw_sync_addr);
606 606
607 /* update board state */ 607 /* update board state */
608 dev_context->dw_brd_state = BRD_RUNNING; 608 dev_context->dw_brd_state = BRD_RUNNING;
@@ -1852,7 +1852,7 @@ bool wait_for_start(struct bridge_dev_context *dev_context, u32 dw_sync_addr)
1852 u16 timeout = TIHELEN_ACKTIMEOUT; 1852 u16 timeout = TIHELEN_ACKTIMEOUT;
1853 1853
1854 /* Wait for response from board */ 1854 /* Wait for response from board */
1855 while (*((volatile u16 *)dw_sync_addr) && --timeout) 1855 while (__raw_readw(dw_sync_addr) && --timeout)
1856 udelay(10); 1856 udelay(10);
1857 1857
1858 /* If timed out: return false */ 1858 /* If timed out: return false */
diff --git a/drivers/staging/tidspbridge/dynload/tramp.c b/drivers/staging/tidspbridge/dynload/tramp.c
index 81314d2fd44..60d22ea4705 100644
--- a/drivers/staging/tidspbridge/dynload/tramp.c
+++ b/drivers/staging/tidspbridge/dynload/tramp.c
@@ -86,8 +86,8 @@ static u8 priv_h2a(u8 value)
86static void priv_tramp_sym_gen_name(u32 value, char *dst) 86static void priv_tramp_sym_gen_name(u32 value, char *dst)
87{ 87{
88 u32 i; 88 u32 i;
89 volatile char *prefix = TRAMP_SYM_PREFIX; 89 char *prefix = TRAMP_SYM_PREFIX;
90 volatile char *dst_local = dst; 90 char *dst_local = dst;
91 u8 tmp; 91 u8 tmp;
92 92
93 /* Clear out the destination, including the ending NULL */ 93 /* Clear out the destination, including the ending NULL */
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index 874ed646d6d..b7cba1bc627 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -1008,6 +1008,7 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
1008{ 1008{
1009 struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator; 1009 struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
1010 void *pbuf = NULL; 1010 void *pbuf = NULL;
1011 void *tmp_va_buff;
1011 struct cmm_attrs attrs; 1012 struct cmm_attrs attrs;
1012 1013
1013 DBC_REQUIRE(refs > 0); 1014 DBC_REQUIRE(refs > 0);
@@ -1019,16 +1020,16 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
1019 1020
1020 if (xlator_obj) { 1021 if (xlator_obj) {
1021 attrs.ul_seg_id = xlator_obj->ul_seg_id; 1022 attrs.ul_seg_id = xlator_obj->ul_seg_id;
1022 *(volatile u32 *)va_buf = 0; 1023 __raw_writel(0, va_buf);
1023 /* Alloc SM */ 1024 /* Alloc SM */
1024 pbuf = 1025 pbuf =
1025 cmm_calloc_buf(xlator_obj->hcmm_mgr, pa_size, &attrs, NULL); 1026 cmm_calloc_buf(xlator_obj->hcmm_mgr, pa_size, &attrs, NULL);
1026 if (pbuf) { 1027 if (pbuf) {
1027 /* convert to translator(node/strm) process Virtual 1028 /* convert to translator(node/strm) process Virtual
1028 * address */ 1029 * address */
1029 *(volatile u32 **)va_buf = 1030 tmp_va_buff = cmm_xlator_translate(xlator,
1030 (u32 *) cmm_xlator_translate(xlator,
1031 pbuf, CMM_PA2VA); 1031 pbuf, CMM_PA2VA);
1032 __raw_writel((u32)tmp_va_buff, va_buf);
1032 } 1033 }
1033 } 1034 }
1034 return pbuf; 1035 return pbuf;