diff options
| author | Deepak Saxena <dsaxena@net.rmk.(none)> | 2004-12-29 15:25:09 +0000 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2004-12-29 15:25:09 +0000 |
| commit | c0620f451df80ae9cec7a6acf396ae49d7420141 (patch) | |
| tree | 25738b8e559ba6092d80bb344632617a0ab16d61 /include | |
| parent | d94a27bff4adf96618e1e6bd8c3524b924856e9f (diff) | |
[ARM PATCH] 2325/1: Cleanup IXP2000 reset handling
Patch from Deepak Saxena
On IXDP2801 we need to write a magic sequence to the CPLD to ensure
a full system reset instead of just CPU reset. Also cleanup some
comments and copyrights while we are in here.
Signed-off-by: Deepak Saxena
Signed-off-by: Russell King
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-arm/arch-ixp2000/system.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h index 281907bf7afb..f9eb8ad435fb 100644 --- a/include/asm-arm/arch-ixp2000/system.h +++ b/include/asm-arm/arch-ixp2000/system.h @@ -2,6 +2,7 @@ * linux/include/asm-arm/arch-ixp2000/system.h * * Copyright (C) 2002 Intel Corp. + * Copyricht (C) 2003-2005 MontaVista Software, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -20,12 +21,30 @@ static inline void arch_reset(char mode) { cli(); - if (machine_is_ixdp2401() || machine_is_ixdp2801()) { - *IXDP2X01_CPLD_FLASH_REG = ((0 >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN); + /* + * Reset flash banking register so that we are pointing at + * RedBoot bank. + */ + if (machine_is_ixdp2401()) { + *IXDP2X01_CPLD_FLASH_REG = ((0 >> IXDP2X01_FLASH_WINDOW_BITS) + | IXDP2X01_CPLD_FLASH_INTERN); *IXDP2X01_CPLD_RESET_REG = 0xffffffff; } /* + * On IXDP2801 we need to write this magic sequence to the CPLD + * to cause a complete reset of the CPU and all external devices + * and moves the flash bank register back to 0. + */ + if (machine_is_ixdp2801()) { + unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; + reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); + *IXDP2X01_CPLD_RESET_REG = reset_reg; + mb(); + *IXDP2X01_CPLD_RESET_REG = 0x80000000; + } + + /* * We do a reset all if we are PCI master. We could be a slave and we * don't want to do anything funky on the PCI bus. */ |
