2005-04-17 06:20:36 +08:00
|
|
|
/*
|
2008-08-05 23:14:15 +08:00
|
|
|
* Copied from arch/arm/mach-sa1100/include/mach/system.h
|
2009-09-14 15:25:28 +08:00
|
|
|
* Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
#ifndef __ASM_ARCH_SYSTEM_H
|
|
|
|
#define __ASM_ARCH_SYSTEM_H
|
2006-01-08 00:15:52 +08:00
|
|
|
#include <linux/clk.h>
|
|
|
|
|
2005-07-11 02:58:06 +08:00
|
|
|
#include <asm/mach-types.h>
|
2008-08-05 23:14:15 +08:00
|
|
|
#include <mach/hardware.h>
|
2005-11-10 22:26:53 +08:00
|
|
|
|
2009-10-21 00:40:47 +08:00
|
|
|
#include <plat/prcm.h>
|
2009-01-28 10:12:50 +08:00
|
|
|
|
2005-11-10 22:26:53 +08:00
|
|
|
#ifndef CONFIG_MACH_VOICEBLUE
|
|
|
|
#define voiceblue_reset() do {} while (0)
|
2009-03-24 09:07:39 +08:00
|
|
|
#else
|
|
|
|
extern void voiceblue_reset(void);
|
2005-11-10 22:26:53 +08:00
|
|
|
#endif
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
static inline void arch_idle(void)
|
|
|
|
{
|
|
|
|
cpu_do_idle();
|
|
|
|
}
|
|
|
|
|
2010-02-26 18:25:28 +08:00
|
|
|
static inline void omap1_arch_reset(char mode, const char *cmd)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2005-07-11 02:58:06 +08:00
|
|
|
/*
|
|
|
|
* 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);
|
|
|
|
}
|
2005-11-10 22:26:53 +08:00
|
|
|
|
2005-07-11 02:58:06 +08:00
|
|
|
if (machine_is_voiceblue())
|
|
|
|
voiceblue_reset();
|
|
|
|
else
|
|
|
|
omap_writew(1, ARM_RSTCT1);
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
|
2009-03-20 00:20:24 +08:00
|
|
|
static inline void arch_reset(char mode, const char *cmd)
|
2005-11-10 22:26:53 +08:00
|
|
|
{
|
2008-10-09 22:51:41 +08:00
|
|
|
if (!cpu_class_is_omap2())
|
2010-02-26 18:25:28 +08:00
|
|
|
omap1_arch_reset(mode, cmd);
|
2005-11-10 22:26:53 +08:00
|
|
|
else
|
2010-02-26 18:25:28 +08:00
|
|
|
omap_prcm_arch_reset(mode, cmd);
|
2005-11-10 22:26:53 +08:00
|
|
|
}
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif
|