blob: 2ed1651ffcfa552f9e3b753473ca7c4fae5ff27e [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Michal Simek952d5142007-03-11 13:42:58 +01002/*
3 * (C) Copyright 2007 Michal Simek
4 *
5 * Michal SIMEK <monstr@monstr.cz>
Michal Simek952d5142007-03-11 13:42:58 +01006 */
7
8#define TIMER_ENABLE_ALL 0x400 /* ENALL */
9#define TIMER_PWM 0x200 /* PWMA0 */
10#define TIMER_INTERRUPT 0x100 /* T0INT */
11#define TIMER_ENABLE 0x080 /* ENT0 */
12#define TIMER_ENABLE_INTR 0x040 /* ENIT0 */
13#define TIMER_RESET 0x020 /* LOAD0 */
14#define TIMER_RELOAD 0x010 /* ARHT0 */
15#define TIMER_EXT_CAPTURE 0x008 /* CAPT0 */
16#define TIMER_EXT_COMPARE 0x004 /* GENT0 */
17#define TIMER_DOWN_COUNT 0x002 /* UDT0 */
18#define TIMER_CAPTURE_MODE 0x001 /* MDT0 */
19
20typedef volatile struct microblaze_timer_t {
21 int control; /* control/statuc register TCSR */
22 int loadreg; /* load register TLR */
23 int counter; /* timer/counter register */
24} microblaze_timer_t;
Michal Simek06ac6512012-06-29 13:46:54 +020025
26int timer_init(void);