upstream u-boot with additional patches for our devices/boards:
https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ;
Gbit ethernet patch for some LIME2 revisions ;
with SPI flash support
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
524 B
30 lines
524 B
/*
|
|
* (C) Copyright 2016 Google, Inc
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#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;
|
|
}
|
|
|