1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2016 Google, Inc
8 #include <asm/arch/wdt.h>
11 u32 ast_reset_mode_from_flags(ulong flags)
13 return flags & WDT_CTRL_RESET_MASK;
16 u32 ast_reset_mask_from_flags(ulong flags)
21 ulong ast_flags_from_reset_mode_mask(u32 reset_mode, u32 reset_mask)
23 ulong ret = reset_mode & WDT_CTRL_RESET_MASK;
25 if (ret == WDT_CTRL_RESET_SOC)
26 ret |= (reset_mask << 2);