2 * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
13 #include <asm/reboot.h>
15 #include <loongson1.h>
17 static void ls1x_restart(char *command
)
19 __raw_writel(0x1, LS1X_WDT_EN
);
20 __raw_writel(0x5000000, LS1X_WDT_TIMER
);
21 __raw_writel(0x1, LS1X_WDT_SET
);
24 static void ls1x_halt(void)
32 static void ls1x_power_off(void)
37 static int __init
ls1x_reboot_setup(void)
39 _machine_restart
= ls1x_restart
;
40 _machine_halt
= ls1x_halt
;
41 pm_power_off
= ls1x_power_off
;
46 arch_initcall(ls1x_reboot_setup
);