nuttx/arch
dechao_gong a25fbba5a5 arch/arm/rtl8721dx: add shared Ameba watchdog driver
Add a NuttX watchdog lower-half for the Ameba KM4 non-secure system
watchdog (WDG2), registered as /dev/watchdog0.  The fwlib WDG API is
ROM-resident, so no board.mk change is needed.

The hardware cannot be stopped once enabled, so stop() is emulated via
the early interrupt (EI) auto-refreshing the counter, and capture()
delivers a pre-timeout callback through the same EI.  The EI has a
three-part timing contract, all handled here: it must be armed with
EIMOD=ENABLE at WDG_Init, its EIE gate only takes effect after
WDG_Enable, and -- because the EI is level-based -- a pure capture path
must mask EIE after the one-shot callback to avoid re-entrant storming
while the reset is pending.  The EI flag is cleared twice per the slow
WDG clock.

Per-chip base address and IRQ live in ameba_wdg_chip.h so the shared
driver needs no change to port to another Ameba IC.

Verified on pke8721daf: timeout reset (BOOT REASON WDG2), stop()
suppressing the reset, and capture() firing ~EICNT ms before the reset.

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn>
2026-08-29 00:08:03 +08:00
..
arm arch/arm/rtl8721dx: add shared Ameba watchdog driver 2026-08-29 00:08:03 +08:00
arm64 fs/hostfs: fix pre-existing nxstyle issues in touched files 2026-08-28 18:35:37 +08:00
avr nuttx/atomic: select LIBC_ATOMIC_IRQ for archs without atomic support 2026-08-24 13:20:45 +08:00
ceva !sched/arch/libc: Give fork() and vfork() their real, separate semantics. 2026-08-10 08:57:30 -03:00
dummy
hc tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
mips mips/Makefile: Add nuttx build with CONFIG_ALLSYMS enabled. 2026-08-11 09:53:38 -03:00
misoc tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
or1k tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
renesas nuttx/libc: refine the atomic related Kconfig 2026-08-24 13:20:45 +08:00
risc-v fs/hostfs: fix pre-existing nxstyle issues in touched files 2026-08-28 18:35:37 +08:00
sim arch/sim: make nuttx link target depend on staging libraries 2026-08-28 11:40:08 -03:00
sparc nuttx/atomic: select LIBC_ATOMIC_IRQ for archs without atomic support 2026-08-24 13:20:45 +08:00
tricore arch/tricore: drop iLLD dependency in hwdebug 2026-08-20 01:25:52 +08:00
x86 arch/x86: Provide vfork(). 2026-08-15 09:00:20 -03:00
x86_64 arch/intel64: fix nxstyle issues 2026-08-26 12:17:21 +02:00
xtensa arch/xtensa: Provide vfork(). 2026-08-28 23:08:31 +08:00
z16 tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
z80 style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
CMakeLists.txt cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
Kconfig arch/xtensa: Provide vfork(). 2026-08-28 23:08:31 +08:00