18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __ASM_ARCH_RESET_H
38c2ecf20Sopenharmony_ci#define __ASM_ARCH_RESET_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#define RESET_STATUS_HARDWARE	(1 << 0)	/* Hardware Reset */
68c2ecf20Sopenharmony_ci#define RESET_STATUS_WATCHDOG	(1 << 1)	/* Watchdog Reset */
78c2ecf20Sopenharmony_ci#define RESET_STATUS_LOWPOWER	(1 << 2)	/* Low Power/Sleep Exit */
88c2ecf20Sopenharmony_ci#define RESET_STATUS_GPIO	(1 << 3)	/* GPIO Reset */
98c2ecf20Sopenharmony_ci#define RESET_STATUS_ALL	(0xf)
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciextern unsigned int reset_status;
128c2ecf20Sopenharmony_ciextern void clear_reset_status(unsigned int mask);
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/**
158c2ecf20Sopenharmony_ci * init_gpio_reset() - register GPIO as reset generator
168c2ecf20Sopenharmony_ci * @gpio: gpio nr
178c2ecf20Sopenharmony_ci * @output: set gpio as output instead of input during normal work
188c2ecf20Sopenharmony_ci * @level: output level
198c2ecf20Sopenharmony_ci */
208c2ecf20Sopenharmony_ciextern int init_gpio_reset(int gpio, int output, int level);
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci#endif /* __ASM_ARCH_RESET_H */
23