uboot/arch/arm/include/asm/arch-sunxi/watchdog.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0+ */
   2/*
   3 * (C) Copyright 2014
   4 * Chen-Yu Tsai <wens@csie.org>
   5 *
   6 * Watchdog register definitions
   7 */
   8
   9#ifndef _SUNXI_WATCHDOG_H_
  10#define _SUNXI_WATCHDOG_H_
  11
  12#define WDT_CTRL_RESTART        (0x1 << 0)
  13#define WDT_CTRL_KEY            (0x0a57 << 1)
  14
  15#if defined(CONFIG_MACH_SUN4I) || \
  16    defined(CONFIG_MACH_SUN5I) || \
  17    defined(CONFIG_MACH_SUN7I) || \
  18    defined(CONFIG_MACH_SUN8I_R40)
  19
  20#define WDT_MODE_EN             (0x1 << 0)
  21#define WDT_MODE_RESET_EN       (0x1 << 1)
  22
  23struct sunxi_wdog {
  24        u32 ctl;                /* 0x00 */
  25        u32 mode;               /* 0x04 */
  26        u32 res[2];
  27};
  28
  29#else
  30
  31#define WDT_CFG_RESET           (0x1)
  32#define WDT_MODE_EN             (0x1)
  33
  34struct sunxi_wdog {
  35        u32 irq_en;             /* 0x00 */
  36        u32 irq_sta;            /* 0x04 */
  37        u32 res1[2];
  38        u32 ctl;                /* 0x10 */
  39        u32 cfg;                /* 0x14 */
  40        u32 mode;               /* 0x18 */
  41        u32 res2;
  42};
  43
  44#endif
  45
  46#endif /* _SUNXI_WATCHDOG_H_ */
  47