summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 18:32:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 18:32:45 -0700
commitac9e7ab32fe42489808c8d9fc89ad413d2805766 (patch)
treed5628b62e23fae6a0acd000a7bb16030c89f2073 /arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c
parent2a2bf85f05e42b12ea6bfe821e2d19221cf93555 (diff)
parentb98138e00d96abc85b100c9b6886f105d9868ab5 (diff)
downloadlinux-ac9e7ab32fe42489808c8d9fc89ad413d2805766.tar.bz2
Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc cleanups, part 2 from Olof Johansson: "A shorter cleanup branch submitted separately due to dependencies with some of the previous topics. Major thing here is that the Broadcom bcmring platform is removed. It's an SoC that's used on some stationary VoIP platforms, and is in desperate need of some cleanup. Broadcom came back and suggested that we just deprecate the platform for now, since they aren't going to spend the resources needed on cleaning it up, and there are no users of the platform directly from mainline." Fix some conflicts due to BCM2835 getting added next to the removed BCMRING, and removal of tegra files that had been converted to devicetree. * tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: Orion5x: ts78xx: Add IOMEM for virtual addresses. ARM: ux500: use __iomem pointers for MMIO ARM: Remove mach-bcmring ARM: clps711x: Remove board support for CEIVA ARM: clps711x: Fix register definitions ARM: clps711x: Fix lowlevel debug-macro ARM: clps711x: Added simple clock framework pinctrl: tegra: move pinconf-tegra.h content into drivers/pinctrl ARM: tegra: delete unused headers ARM: tegra: remove useless includes of <mach/*.h> ARM: tegra: remove dead code
Diffstat (limited to 'arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c')
-rw-r--r--arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c125
1 files changed, 0 insertions, 125 deletions
diff --git a/arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c b/arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c
deleted file mode 100644
index f95ce913fa1e..000000000000
--- a/arch/arm/mach-bcmring/csp/chipc/chipcHw_reset.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*****************************************************************************
-* Copyright 2003 - 2008 Broadcom Corporation. All rights reserved.
-*
-* Unless you and Broadcom execute a separate written software license
-* agreement governing use of this software, this software is licensed to you
-* under the terms of the GNU General Public License version 2, available at
-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
-*
-* Notwithstanding the above, under no circumstances may you combine this
-* software in any way with any other Broadcom software provided under a
-* license other than the GPL, without Broadcom's express prior written
-* consent.
-*****************************************************************************/
-
-/* ---- Include Files ---------------------------------------------------- */
-#include <linux/types.h>
-#include <mach/csp/chipcHw_def.h>
-#include <mach/csp/chipcHw_inline.h>
-#include <mach/csp/intcHw_reg.h>
-#include <asm/cacheflush.h>
-
-/* ---- Private Constants and Types --------------------------------------- */
-/* ---- Private Variables ------------------------------------------------- */
-void chipcHw_reset_run_from_aram(void);
-
-typedef void (*RUNFUNC) (void);
-
-/****************************************************************************/
-/**
-* @brief warmReset
-*
-* @note warmReset configures the clocks which are not reset back to the state
-* required to execute on reset. To do so we need to copy the code into internal
-* memory to change the ARM clock while we are not executing from DDR.
-*/
-/****************************************************************************/
-void chipcHw_reset(uint32_t mask)
-{
- int i = 0;
- RUNFUNC runFunc = (RUNFUNC) (unsigned long)MM_ADDR_IO_ARAM;
-
- /* Disable all interrupts */
- intcHw_irq_disable(INTCHW_INTC0, 0xffffffff);
- intcHw_irq_disable(INTCHW_INTC1, 0xffffffff);
- intcHw_irq_disable(INTCHW_SINTC, 0xffffffff);
-
- {
- REG_LOCAL_IRQ_SAVE;
- if (mask & chipcHw_REG_SOFT_RESET_CHIP_SOFT) {
- chipcHw_softReset(chipcHw_REG_SOFT_RESET_CHIP_SOFT);
- }
- /* Bypass the PLL clocks before reboot */
- writel(readl(&pChipcHw->UARTClock) | chipcHw_REG_PLL_CLOCK_BYPASS_SELECT,
- &pChipcHw->UARTClock);
- writel(readl(&pChipcHw->SPIClock) | chipcHw_REG_PLL_CLOCK_BYPASS_SELECT,
- &pChipcHw->SPIClock);
-
- /* Copy the chipcHw_warmReset_run_from_aram function into ARAM */
- do {
- writel(((uint32_t *) &chipcHw_reset_run_from_aram)[i], ((uint32_t __iomem *) MM_IO_BASE_ARAM) + i);
- i++;
- } while (readl(((uint32_t __iomem*) MM_IO_BASE_ARAM) + i - 1) != 0xe1a0f00f); /* 0xe1a0f00f == asm ("mov r15, r15"); */
-
- flush_cache_all();
-
- /* run the function from ARAM */
- runFunc();
-
- /* Code will never get here, but include it to balance REG_LOCAL_IRQ_SAVE above */
- REG_LOCAL_IRQ_RESTORE;
- }
-}
-
-/* This function must run from internal memory */
-void chipcHw_reset_run_from_aram(void)
-{
-/* Make sure, pipeline is filled with instructions coming from ARAM */
-__asm (" nop \n\t"
- " nop \n\t"
-#if defined(__KERNEL__) && !defined(STANDALONE)
- " MRC p15,#0x0,r0,c1,c0,#0 \n\t"
- " BIC r0,r0,#0xd \n\t"
- " MCR p15,#0x0,r0,c1,c0,#0 \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
-#endif
- " nop \n\t"
- " nop \n\t"
-/* Bypass the ARM clock and switch to XTAL clock */
- " MOV r2,#0x80000000 \n\t"
- " LDR r3,[r2,#8] \n\t"
- " ORR r3,r3,#0x20000 \n\t"
- " STR r3,[r2,#8] \n\t"
-
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
- " nop \n\t"
-/* Issue reset */
- " MOV r3,#0x2 \n\t"
- " STR r3,[r2,#0x80] \n\t"
-/* End here */
- " MOV pc,pc \n\t");
-/* 0xe1a0f00f == asm ("mov r15, r15"); */
-}