diff options
author | Quinn Jensen <quinn.jensen@freescale.com> | 2007-04-04 17:33:45 -0600 |
---|---|---|
committer | root <root@traveler.zdomain.com> | 2007-04-04 17:33:45 -0600 |
commit | 7c473eb53aa5b3974fc6beeb2e2cdbb4b74f82ce (patch) | |
tree | fd465baf77fa6524c3c1826fcb0cf806e1a6ae19 /arch/arm/mach-mx27/system.c | |
parent | fefcfdd90127b0ad1afa9d33804c62ce030bc9e6 (diff) |
Adds MX27 machine support to the Linux kernel.
http://www.bitshrine.org/gpp/linux-2.6.19.2-mx-mach_mx27-2.patch
Diffstat (limited to 'arch/arm/mach-mx27/system.c')
-rw-r--r-- | arch/arm/mach-mx27/system.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/arm/mach-mx27/system.c b/arch/arm/mach-mx27/system.c new file mode 100644 index 000000000000..b5006aded94e --- /dev/null +++ b/arch/arm/mach-mx27/system.c @@ -0,0 +1,69 @@ +/* + * Copyright (C) 1999 ARM Limited + * Copyright (C) 2000 Deep Blue Solutions Ltd + * Copyright 2006 Freescale Semiconductor, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <asm/io.h> +#include <asm/arch/hardware.h> +#include <asm/proc-fns.h> +#include <asm/system.h> +#include <asm/arch/clock.h> + +/*! + * @defgroup MSL Machine Specific Layer (MSL) + */ + +/*! + * @defgroup System System-wide Misc Files for MSL + * @ingroup MSL + */ + +/*! + * @file system.c + * @brief This file contains idle and reset functions. + * + * @ingroup System + */ + +/*! + * This function puts the CPU into idle mode. It is called by default_idle() + * in process.c file. + */ +void arch_idle(void) +{ + /* + * This should do all the clock switching + * and wait for interrupt tricks. + */ + cpu_do_idle(); +} + +#define WDT_WCR_WDE 0x0004 + +/* + * This function resets the system. It is called by machine_restart(). + * + * @param mode indicates different kinds of resets + */ +void arch_reset(char mode) +{ + volatile u16 v; + mxc_clks_enable(WDOG_CLK); + v = __raw_readw(IO_ADDRESS(WDOG_BASE_ADDR)); + __raw_writew(v | WDT_WCR_WDE, IO_ADDRESS(WDOG_BASE_ADDR)); +} |