blob: af6d7678e96e5c99c9832f620ed4a6f2423997da [file] [log] [blame]
Bryan O'Donoghue5c0c1e72018-05-25 16:45:27 +01001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00007#include <lib/mmio.h>
8
Bryan O'Donoghue5c0c1e72018-05-25 16:45:27 +01009#include <imx_regs.h>
10#include <imx_wdog.h>
11
12static void imx_wdog_power_down(unsigned long base)
13{
14 struct wdog_regs *wdog = (struct wdog_regs *)base;
15
16 mmio_write_16((uintptr_t)&wdog->wmcr, 0);
17}
18
19void imx_wdog_init(void)
20{
21 imx_wdog_power_down(WDOG1_BASE);
22 imx_wdog_power_down(WDOG2_BASE);
23 imx_wdog_power_down(WDOG3_BASE);
24 imx_wdog_power_down(WDOG4_BASE);
25}