[PATCH u-boot v2016.07-aspeed-openbmc] Add WD2 reset support for ast-g5

Joel Stanley joel at jms.id.au
Mon Jun 26 20:29:45 AEST 2017


On Thu, May 25, 2017 at 12:58 AM, Mykola Kostenok
<c_mykolak at mellanox.com> wrote:
> Add support for WATCHDOG_RESET macro for aspeed g5 boards

As I understand it, with this change we can have the watchdog enabled
from boot but also have u-boot pat the watchdog when dropping to the
console?

This is great!

>
> Signed-off-by: Mykola Kostenok <c_mykolak at mellanox.com>

Merged to v2016.07-aspeed-openbmc.

Cheers,

Joel

> ---
>  board/aspeed/ast-g5/ast-g5.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/board/aspeed/ast-g5/ast-g5.c b/board/aspeed/ast-g5/ast-g5.c
> index da79d7b79a..412b632a41 100644
> --- a/board/aspeed/ast-g5/ast-g5.c
> +++ b/board/aspeed/ast-g5/ast-g5.c
> @@ -46,3 +46,17 @@ int board_eth_init(bd_t *bd)
>          return aspeednic_initialize(bd);
>  }
>  #endif
> +
> +/*Called by macro WATCHDOG_RESET*/
> +#if defined(CONFIG_HW_WATCHDOG)
> +
> +#define AST_WDT2_RESTART_REG 0x28 /*WDT2 Counter Restart Register*/
> +#define AST_WDT2_RESTART_SET 0x4755 /*WDT2 Restart Counter programming value*/
> +
> +void hw_watchdog_reset(void)
> +{
> +       /*restart WD2 timer*/
> +       writel(AST_WDT2_RESTART_SET, AST_BASE_WD | AST_WDT2_RESTART_REG);
> +}
> +
> +#endif /* CONFIG_WATCHDOG */
> --
> 2.11.0
>


More information about the openbmc mailing list