David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* |
| 3 | * reset.c: reset support for PNX833X. |
| 4 | * |
| 5 | * Copyright 2008 NXP Semiconductors |
| 6 | * Chris Steel <chris.steel@nxp.com> |
| 7 | * Daniel Laird <daniel.j.laird@nxp.com> |
| 8 | * |
| 9 | * Based on software written by: |
| 10 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 11 | */ |
| 12 | #include <linux/reboot.h> |
| 13 | #include <pnx833x.h> |
| 14 | |
| 15 | void pnx833x_machine_restart(char *command) |
| 16 | { |
| 17 | PNX833X_RESET_CONTROL_2 = 0; |
| 18 | PNX833X_RESET_CONTROL = 0; |
| 19 | } |
| 20 | |
| 21 | void pnx833x_machine_halt(void) |
| 22 | { |
| 23 | while (1) |
| 24 | __asm__ __volatile__ ("wait"); |
| 25 | |
| 26 | } |
| 27 | |
| 28 | void pnx833x_machine_power_off(void) |
| 29 | { |
| 30 | pnx833x_machine_halt(); |
| 31 | } |