aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c')
-rw-r--r--arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c b/arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c
index 2671d8896bbb..f95ce913fa1e 100644
--- a/arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c
+++ b/arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c
@@ -13,11 +13,11 @@
13*****************************************************************************/ 13*****************************************************************************/
14 14
15/* ---- Include Files ---------------------------------------------------- */ 15/* ---- Include Files ---------------------------------------------------- */
16#include <csp/stdint.h> 16#include <linux/types.h>
17#include <mach/csp/chipcHw_def.h> 17#include <mach/csp/chipcHw_def.h>
18#include <mach/csp/chipcHw_inline.h> 18#include <mach/csp/chipcHw_inline.h>
19#include <csp/intcHw.h> 19#include <mach/csp/intcHw_reg.h>
20#include <csp/cache.h> 20#include <asm/cacheflush.h>
21 21
22/* ---- Private Constants and Types --------------------------------------- */ 22/* ---- Private Constants and Types --------------------------------------- */
23/* ---- Private Variables ------------------------------------------------- */ 23/* ---- Private Variables ------------------------------------------------- */
@@ -50,17 +50,18 @@ void chipcHw_reset(uint32_t mask)
50 chipcHw_softReset(chipcHw_REG_SOFT_RESET_CHIP_SOFT); 50 chipcHw_softReset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
51 } 51 }
52 /* Bypass the PLL clocks before reboot */ 52 /* Bypass the PLL clocks before reboot */
53 pChipcHw->UARTClock |= chipcHw_REG_PLL_CLOCK_BYPASS_SELECT; 53 writel(readl(&pChipcHw->UARTClock) | chipcHw_REG_PLL_CLOCK_BYPASS_SELECT,
54 pChipcHw->SPIClock |= chipcHw_REG_PLL_CLOCK_BYPASS_SELECT; 54 &pChipcHw->UARTClock);
55 writel(readl(&pChipcHw->SPIClock) | chipcHw_REG_PLL_CLOCK_BYPASS_SELECT,
56 &pChipcHw->SPIClock);
55 57
56 /* Copy the chipcHw_warmReset_run_from_aram function into ARAM */ 58 /* Copy the chipcHw_warmReset_run_from_aram function into ARAM */
57 do { 59 do {
58 ((uint32_t *) MM_IO_BASE_ARAM)[i] = 60 writel(((uint32_t *) &chipcHw_reset_run_from_aram)[i], ((uint32_t __iomem *) MM_IO_BASE_ARAM) + i);
59 ((uint32_t *) &chipcHw_reset_run_from_aram)[i];
60 i++; 61 i++;
61 } while (((uint32_t *) MM_IO_BASE_ARAM)[i - 1] != 0xe1a0f00f); /* 0xe1a0f00f == asm ("mov r15, r15"); */ 62 } while (readl(((uint32_t __iomem*) MM_IO_BASE_ARAM) + i - 1) != 0xe1a0f00f); /* 0xe1a0f00f == asm ("mov r15, r15"); */
62 63
63 CSP_CACHE_FLUSH_ALL; 64 flush_cache_all();
64 65
65 /* run the function from ARAM */ 66 /* run the function from ARAM */
66 runFunc(); 67 runFunc();