1/*
2 * linux/include/asm-arm/arch-sa1100/system.h
3 *
4 * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
5 */
6#include <linux/config.h>
7#include <asm/arch/hardware.h>
8
9static inline void arch_idle(void)
10{
11	if (!hlt_counter) {
12		int flags;
13		local_irq_save(flags);
14		if (!current->need_resched)
15			cpu_do_idle(0);
16		local_irq_restore(flags);
17	}
18}
19
20#ifdef CONFIG_SA1100_VICTOR
21
22/* power off unconditionally */
23#define arch_reset(x) machine_power_off()
24
25#else
26
27static inline void arch_reset(char mode)
28{
29	if (mode == 's') {
30		/* Jump into ROM at address 0 */
31		cpu_reset(0);
32	} else {
33		/* Use on-chip reset capability */
34		RSRR = RSRR_SWR;
35	}
36}
37
38#endif
39