mirror of
https://xff.cz/git/u-boot/
synced 2025-10-01 23:41:18 +02:00
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commitc8ffd1356d
, reversing changes made to2ee6f3a5f7
. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
30 lines
517 B
C
30 lines
517 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* (C) Copyright 2016 Google, Inc
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <asm/io.h>
|
|
#include <asm/arch/wdt.h>
|
|
#include <linux/err.h>
|
|
|
|
u32 ast_reset_mode_from_flags(ulong flags)
|
|
{
|
|
return flags & WDT_CTRL_RESET_MASK;
|
|
}
|
|
|
|
u32 ast_reset_mask_from_flags(ulong flags)
|
|
{
|
|
return flags >> 2;
|
|
}
|
|
|
|
ulong ast_flags_from_reset_mode_mask(u32 reset_mode, u32 reset_mask)
|
|
{
|
|
ulong ret = reset_mode & WDT_CTRL_RESET_MASK;
|
|
|
|
if (ret == WDT_CTRL_RESET_SOC)
|
|
ret |= (reset_mask << 2);
|
|
|
|
return ret;
|
|
}
|