Path: blob/master/arch/arm/mach-ixp2000/include/mach/system.h
10820 views
/*1* arch/arm/mach-ixp2000/include/mach/system.h2*3* Copyright (C) 2002 Intel Corp.4* Copyricht (C) 2003-2005 MontaVista Software, Inc.5*6* This program is free software; you can redistribute it and/or modify7* it under the terms of the GNU General Public License version 2 as8* published by the Free Software Foundation.9*/1011#include <mach/hardware.h>12#include <asm/mach-types.h>1314static inline void arch_idle(void)15{16cpu_do_idle();17}1819static inline void arch_reset(char mode, const char *cmd)20{21local_irq_disable();2223/*24* Reset flash banking register so that we are pointing at25* RedBoot bank.26*/27if (machine_is_ixdp2401()) {28ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,29((0 >> IXDP2X01_FLASH_WINDOW_BITS)30| IXDP2X01_CPLD_FLASH_INTERN));31ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);32}3334/*35* On IXDP2801 we need to write this magic sequence to the CPLD36* to cause a complete reset of the CPU and all external devices37* and move the flash bank register back to 0.38*/39if (machine_is_ixdp2801() || machine_is_ixdp28x5()) {40unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;4142reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);43ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);44ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);45}4647ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);48}495051