summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-tcc/system.c
blob: cc208fae3e7a5a4bb0d352f893a5d9fd207b800c (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
/*
 * 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)
		;
}
OpenPOWER on IntegriCloud