imx_wdog.c 512 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <lib/mmio.h>
  7. #include <imx_regs.h>
  8. #include <imx_wdog.h>
  9. static void imx_wdog_power_down(unsigned long base)
  10. {
  11. struct wdog_regs *wdog = (struct wdog_regs *)base;
  12. mmio_write_16((uintptr_t)&wdog->wmcr, 0);
  13. }
  14. void imx_wdog_init(void)
  15. {
  16. imx_wdog_power_down(WDOG1_BASE);
  17. imx_wdog_power_down(WDOG2_BASE);
  18. imx_wdog_power_down(WDOG3_BASE);
  19. imx_wdog_power_down(WDOG4_BASE);
  20. }