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 | |
| 7 | #include <mmio.h> |
| 8 | #include <imx_regs.h> |
| 9 | #include <imx_wdog.h> |
| 10 | |
| 11 | static 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 | |
| 18 | void 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 | } |