1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 23d357619SMasahiro Yamada /* 33d357619SMasahiro Yamada * Copyright (C) 2011 DENX Software Engineering GmbH 43d357619SMasahiro Yamada * Heiko Schocher <hs@denx.de> 53d357619SMasahiro Yamada */ 63d357619SMasahiro Yamada #ifndef _TIMER_DEFS_H_ 73d357619SMasahiro Yamada #define _TIMER_DEFS_H_ 83d357619SMasahiro Yamada 93d357619SMasahiro Yamada struct davinci_timer { 103d357619SMasahiro Yamada u_int32_t pid12; 113d357619SMasahiro Yamada u_int32_t emumgt; 123d357619SMasahiro Yamada u_int32_t na1; 133d357619SMasahiro Yamada u_int32_t na2; 143d357619SMasahiro Yamada u_int32_t tim12; 153d357619SMasahiro Yamada u_int32_t tim34; 163d357619SMasahiro Yamada u_int32_t prd12; 173d357619SMasahiro Yamada u_int32_t prd34; 183d357619SMasahiro Yamada u_int32_t tcr; 193d357619SMasahiro Yamada u_int32_t tgcr; 203d357619SMasahiro Yamada u_int32_t wdtcr; 213d357619SMasahiro Yamada }; 223d357619SMasahiro Yamada 233d357619SMasahiro Yamada #define DV_TIMER_TCR_ENAMODE_MASK 3 243d357619SMasahiro Yamada 253d357619SMasahiro Yamada #define DV_TIMER_TCR_ENAMODE12_SHIFT 6 263d357619SMasahiro Yamada #define DV_TIMER_TCR_CLKSRC12_SHIFT 8 273d357619SMasahiro Yamada #define DV_TIMER_TCR_READRSTMODE12_SHIFT 10 283d357619SMasahiro Yamada #define DV_TIMER_TCR_CAPMODE12_SHIFT 11 293d357619SMasahiro Yamada #define DV_TIMER_TCR_CAPVTMODE12_SHIFT 12 303d357619SMasahiro Yamada #define DV_TIMER_TCR_ENAMODE34_SHIFT 22 313d357619SMasahiro Yamada #define DV_TIMER_TCR_CLKSRC34_SHIFT 24 323d357619SMasahiro Yamada #define DV_TIMER_TCR_READRSTMODE34_SHIFT 26 333d357619SMasahiro Yamada #define DV_TIMER_TCR_CAPMODE34_SHIFT 27 343d357619SMasahiro Yamada #define DV_TIMER_TCR_CAPEVTMODE12_SHIFT 28 353d357619SMasahiro Yamada 363d357619SMasahiro Yamada #define DV_WDT_ENABLE_SYS_RESET 0x00020000 373d357619SMasahiro Yamada #define DV_WDT_TRIGGER_SYS_RESET 0x00020002 383d357619SMasahiro Yamada 393d357619SMasahiro Yamada #ifdef CONFIG_HW_WATCHDOG 403d357619SMasahiro Yamada void davinci_hw_watchdog_enable(void); 413d357619SMasahiro Yamada void davinci_hw_watchdog_reset(void); 423d357619SMasahiro Yamada #endif 433d357619SMasahiro Yamada #endif /* _TIMER_DEFS_H_ */ 44