blob: 86813dd0177fb4ccff1bcc743f08c1c6609dd529 [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
7#include <mmio.h>
8#include <imx_regs.h>
9#include <imx_wdog.h>
10
11static void imx_wdog_power_down(unsigned long base)
12{
13 struct wdog_regs *wdog = (struct wdog_regs *)base;
14
15 mmio_write_16((uintptr_t)&wdog->wmcr, 0);
16}
17
18void imx_wdog_init(void)
19{
20 imx_wdog_power_down(WDOG1_BASE);
21 imx_wdog_power_down(WDOG2_BASE);
22 imx_wdog_power_down(WDOG3_BASE);
23 imx_wdog_power_down(WDOG4_BASE);
24}