Bryan O'Donoghue | 5c0c1e7 | 2018-05-25 16:45:27 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 7 | #include <lib/mmio.h> |
| 8 | |
Bryan O'Donoghue | 5c0c1e7 | 2018-05-25 16:45:27 +0100 | [diff] [blame] | 9 | #include <imx_regs.h> |
| 10 | #include <imx_wdog.h> |
| 11 | |
| 12 | static 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 | |
| 19 | void 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 | } |