summaryrefslogtreecommitdiff
path: root/src/soc/ti/am335x/dmtimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/ti/am335x/dmtimer.h')
-rw-r--r--src/soc/ti/am335x/dmtimer.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/soc/ti/am335x/dmtimer.h b/src/soc/ti/am335x/dmtimer.h
index ad8515fbba..56f3d0f011 100644
--- a/src/soc/ti/am335x/dmtimer.h
+++ b/src/soc/ti/am335x/dmtimer.h
@@ -5,9 +5,33 @@
#include <stdint.h>
-#define OSC_HZ 24000000
+#define M_OSC_MHZ (24)
-void dmtimer_start(int num);
-uint64_t dmtimer_raw_value(int num);
+struct am335x_dmtimer {
+ uint32_t tidr;
+ uint8_t res1[12];
+ uint32_t tiocp_cfg;
+ uint8_t res2[12];
+ uint32_t irq_eoi;
+ uint32_t irqstatus_raw;
+ uint32_t irqstatus;
+ uint32_t irqenable_set;
+ uint32_t irqenable_clr;
+ uint32_t irqwakeen;
+ uint32_t tclr;
+ uint32_t tcrr;
+ uint32_t tldr;
+ uint32_t ttgr;
+ uint32_t twps;
+ uint32_t tmar;
+ uint32_t tcar1;
+ uint32_t tsicr;
+ uint32_t tcar2;
+};
+
+#define TCLR_ST (0x01 << 0)
+#define TCLR_AR (0x01 << 1)
+
+#define DMTIMER_2 (0x48040000)
#endif