reset.c 472 字节
Newer Older
1 2 3 4 5 6 7 8 9
/*
 * OMAP1 reset support
 */
#include <linux/kernel.h>
#include <linux/io.h>

#include <mach/hardware.h>
#include <plat/prcm.h>

10
void omap1_restart(char mode, const char *cmd)
11 12 13 14 15 16 17 18 19 20 21 22
{
	/*
	 * 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);
	}

	omap_writew(1, ARM_RSTCT1);
}