X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=include%2Fasm-arm%2Farch-ixp2000%2Fsystem.h;h=f9eb8ad435fb410cb6aafee1babbf1eb268c71e9;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=ec72ba4e643c1b4e9774e5aec3adcd185252750d;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h index ec72ba4e6..f9eb8ad43 100644 --- a/include/asm-arm/arch-ixp2000/system.h +++ b/include/asm-arm/arch-ixp2000/system.h @@ -1,7 +1,8 @@ /* - * linux/include/asm-arm/arch-ixp2400/system.h + * 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,11 +21,29 @@ 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.