blob: b48e83bf912b305c0573bbdedba23bdc576eff30 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001// SPDX-License-Identifier: GPL-2.0-or-later
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
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 Scullb4b6d4a2019-01-02 15:54:55 +000011 */
12#include <linux/reboot.h>
13#include <pnx833x.h>
14
15void pnx833x_machine_restart(char *command)
16{
17 PNX833X_RESET_CONTROL_2 = 0;
18 PNX833X_RESET_CONTROL = 0;
19}
20
21void pnx833x_machine_halt(void)
22{
23 while (1)
24 __asm__ __volatile__ ("wait");
25
26}
27
28void pnx833x_machine_power_off(void)
29{
30 pnx833x_machine_halt();
31}