162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef __ASM_ARCH_RESET_H
362306a36Sopenharmony_ci#define __ASM_ARCH_RESET_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include "hardware.h"
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#define RESET_STATUS_HARDWARE	(1 << 0)	/* Hardware Reset */
862306a36Sopenharmony_ci#define RESET_STATUS_WATCHDOG	(1 << 1)	/* Watchdog Reset */
962306a36Sopenharmony_ci#define RESET_STATUS_LOWPOWER	(1 << 2)	/* Exit from Low Power/Sleep */
1062306a36Sopenharmony_ci#define RESET_STATUS_GPIO	(1 << 3)	/* GPIO Reset */
1162306a36Sopenharmony_ci#define RESET_STATUS_ALL	(0xf)
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_cistatic inline void clear_reset_status(unsigned int mask)
1462306a36Sopenharmony_ci{
1562306a36Sopenharmony_ci	RCSR = mask;
1662306a36Sopenharmony_ci}
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci#endif /* __ASM_ARCH_RESET_H */
19