summaryrefslogtreecommitdiff
path: root/include/asm-arm/arch-ep93xx/system.h
blob: f1a5acf519199f3d351804cee2d485b9dc20bc5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * linux/include/asm-arm/arch-ep93xx/system.h
 */

#include <asm/arch/hardware.h>

static inline void arch_idle(void)
{
	cpu_do_idle();
}

static inline void arch_reset(char mode)
{
	u32 devicecfg;

	local_irq_disable();

	devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG);
	__raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
	__raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
	__raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
	__raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);

	while (1)
		;
}