diff options
author | Antony Pavlov <antonynpavlov at gmail.com> | 2014-01-23 08:00:27 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-30 10:43:55 +0100 |
commit | 0b2b371a554cfa6ef9cdfd01bd450b48118540c5 (patch) | |
tree | d80f2c9240064566dced5dd4462f29f365c4c320 /arch/mips/mach-loongson/loongson1_reset.c | |
parent | 7c0da296139600761700d1e3b16a764372d6d0f6 (diff) | |
download | barebox-0b2b371a554cfa6ef9cdfd01bd450b48118540c5.tar.gz barebox-0b2b371a554cfa6ef9cdfd01bd450b48118540c5.tar.xz |
MIPS: add initial Loongson-1X SoC stuff
This code is based on linux-3.6 code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/mach-loongson/loongson1_reset.c')
-rw-r--r-- | arch/mips/mach-loongson/loongson1_reset.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/mips/mach-loongson/loongson1_reset.c b/arch/mips/mach-loongson/loongson1_reset.c new file mode 100644 index 0000000000..8975392ca6 --- /dev/null +++ b/arch/mips/mach-loongson/loongson1_reset.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2014 Antony Pavlov <antonynpavlov at gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include <common.h> +#include <io.h> +#include <mach/loongson1.h> + +void __noreturn reset_cpu(ulong addr) +{ + __raw_writel(0x1, LS1X_WDT_EN); + __raw_writel(0x1, LS1X_WDT_SET); + __raw_writel(0x1, LS1X_WDT_TIMER); + + unreachable(); +} +EXPORT_SYMBOL(reset_cpu); |