https://jxself.org/git/linux-libre.git
Raw File
Tip revision: 2a45f2ac0806d6e9a117d2f4c9f4196797e07c76 authored by Jason Self on 03 December 2012, 20:59:43 UTC
Linux-libre 3.0.54-gnu1
Tip revision: 2a45f2a
system.c
/*
 * System functions for Telechips TCCxxxx SoCs
 *
 * Copyright (C) Hans J. Koch <hjk@linutronix.de>
 *
 * Licensed under the terms of the GPL v2.
 *
 */

#include <linux/io.h>

#include <mach/tcc8k-regs.h>

/* System reboot */
void plat_tcc_reboot(void)
{
	/* Make sure clocks are on */
	__raw_writel(0xffffffff, CKC_BASE + BCLKCTR0_OFFS);

	/* Enable watchdog reset */
	__raw_writel(0x49, TIMER_BASE + TWDCFG_OFFS);
	/* Wait for reset */
	while(1)
		;
}
back to top