Hans J. Koch | 83ef333 | 2010-09-17 18:13:56 +0200 | [diff] [blame] | 1 | /* |
| 2 | * System functions for Telechips TCCxxxx SoCs |
| 3 | * |
| 4 | * Copyright (C) Hans J. Koch <hjk@linutronix.de> |
| 5 | * |
| 6 | * Licensed under the terms of the GPL v2. |
| 7 | * |
| 8 | */ |
| 9 | |
| 10 | #include <linux/io.h> |
| 11 | |
| 12 | #include <mach/tcc8k-regs.h> |
| 13 | |
| 14 | /* System reboot */ |
| 15 | void plat_tcc_reboot(void) |
| 16 | { |
| 17 | /* Make sure clocks are on */ |
| 18 | __raw_writel(0xffffffff, CKC_BASE + BCLKCTR0_OFFS); |
| 19 | |
| 20 | /* Enable watchdog reset */ |
| 21 | __raw_writel(0x49, TIMER_BASE + TWDCFG_OFFS); |
| 22 | /* Wait for reset */ |
| 23 | while(1) |
| 24 | ; |
| 25 | } |