diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2010-01-21 16:09:37 +0100 |
---|---|---|
committer | Francois Retief <fgretief@spaceteq.co.za> | 2015-11-13 10:23:33 +0200 |
commit | f2879f5952b35009c76de92ca57d67ab628bac0c (patch) | |
tree | cd79e349a44c8ed6dfc3cead9cf69b7e37fafb52 /include/grlib/gptimer.h | |
parent | cff009ed6ff7da2e87f8213d34ed869be4373604 (diff) | |
download | u-boot-f2879f5952b35009c76de92ca57d67ab628bac0c.tar.gz |
sparc: leon3: Moved GRLIB core header files to common include/grlib directory
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Diffstat (limited to 'include/grlib/gptimer.h')
-rw-r--r-- | include/grlib/gptimer.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/grlib/gptimer.h b/include/grlib/gptimer.h new file mode 100644 index 0000000000..8b2b1651b0 --- /dev/null +++ b/include/grlib/gptimer.h @@ -0,0 +1,34 @@ +/* GRLIB GPTIMER (General Purpose Timer) definitions + * + * (C) Copyright 2010, 2015 + * Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __GRLIB_GPTIMER_H__ +#define __GRLIB_GPTIMER_H__ + +typedef struct { + volatile unsigned int val; + volatile unsigned int rld; + volatile unsigned int ctrl; + volatile unsigned int unused; +} ambapp_dev_gptimer_element; + +#define GPTIMER_CTRL_EN 0x1 /* Timer enable */ +#define GPTIMER_CTRL_RS 0x2 /* Timer reStart */ +#define GPTIMER_CTRL_LD 0x4 /* Timer reLoad */ +#define GPTIMER_CTRL_IE 0x8 /* interrupt enable */ +#define GPTIMER_CTRL_IP 0x10 /* interrupt flag/pending */ +#define GPTIMER_CTRL_CH 0x20 /* Chain with previous timer */ + +typedef struct { + volatile unsigned int scalar; + volatile unsigned int scalar_reload; + volatile unsigned int config; + volatile unsigned int unused; + volatile ambapp_dev_gptimer_element e[8]; +} ambapp_dev_gptimer; + +#endif |