system.h 1.0 KB
Newer Older
L
Linus Torvalds 已提交
1
/*
2
 * Copied from arch/arm/mach-sa1100/include/mach/system.h
3
 * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
L
Linus Torvalds 已提交
4 5 6
 */
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
7 8
#include <linux/clk.h>

9
#include <asm/mach-types.h>
10
#include <mach/hardware.h>
11

12
#include <plat/prcm.h>
13

14 15
#ifndef CONFIG_MACH_VOICEBLUE
#define voiceblue_reset()		do {} while (0)
16 17
#else
extern void voiceblue_reset(void);
18
#endif
L
Linus Torvalds 已提交
19 20 21 22 23 24

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

25
static inline void omap1_arch_reset(char mode, const char *cmd)
L
Linus Torvalds 已提交
26
{
27 28 29 30 31 32 33 34 35
	/*
	 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
	 * "Global Software Reset Affects Traffic Controller Frequency".
	 */
	if (cpu_is_omap5912()) {
		omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
				 DPLL_CTL);
		omap_writew(0x8, ARM_RSTCT1);
	}
36

37 38 39 40
	if (machine_is_voiceblue())
		voiceblue_reset();
	else
		omap_writew(1, ARM_RSTCT1);
L
Linus Torvalds 已提交
41 42
}

43
static inline void arch_reset(char mode, const char *cmd)
44
{
45
	if (!cpu_class_is_omap2())
46
		omap1_arch_reset(mode, cmd);
47
	else
48
		omap_prcm_arch_reset(mode, cmd);
49 50
}

L
Linus Torvalds 已提交
51
#endif