Thomas Gleixner | a912e80 | 2019-05-27 08:55:00 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
Lars-Peter Clausen | c863a23 | 2010-06-19 04:08:11 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> |
Lars-Peter Clausen | c863a23 | 2010-06-19 04:08:11 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
Lars-Peter Clausen | c863a23 | 2010-06-19 04:08:11 +0000 | [diff] [blame] | 6 | #include <asm/reboot.h> |
| 7 | |
Maarten ter Huurne | ea3952e | 2012-03-30 16:18:57 +0200 | [diff] [blame] | 8 | #include "reset.h" |
Maarten ter Huurne | ea3952e | 2012-03-30 16:18:57 +0200 | [diff] [blame] | 9 | |
Lars-Peter Clausen | c863a23 | 2010-06-19 04:08:11 +0000 | [diff] [blame] | 10 | static void jz4740_halt(void) |
| 11 | { |
| 12 | while (1) { |
| 13 | __asm__(".set push;\n" |
| 14 | ".set mips3;\n" |
| 15 | "wait;\n" |
| 16 | ".set pop;\n" |
| 17 | ); |
| 18 | } |
| 19 | } |
| 20 | |
Lars-Peter Clausen | c863a23 | 2010-06-19 04:08:11 +0000 | [diff] [blame] | 21 | void jz4740_reset_init(void) |
| 22 | { |
Lars-Peter Clausen | c863a23 | 2010-06-19 04:08:11 +0000 | [diff] [blame] | 23 | _machine_halt = jz4740_halt; |
Lars-Peter Clausen | c863a23 | 2010-06-19 04:08:11 +0000 | [diff] [blame] | 24 | } |