summaryrefslogtreecommitdiff
path: root/drivers/timer/altera_timer.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-11-06 09:21:33 -0500
committerTom Rini <trini@konsulko.com>2015-11-06 09:21:33 -0500
commit4ca0c3c993436cca743ed521e7f3d784d7fe31c8 (patch)
tree4a14903a7134569b12206d439603d9db04647af7 /drivers/timer/altera_timer.c
parent250ea267d875ce3ff0e046308d31f51ff8d3b5e8 (diff)
parent75199d6f722a0f711628194240ee5bf724e31101 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-nios
Diffstat (limited to 'drivers/timer/altera_timer.c')
-rw-r--r--drivers/timer/altera_timer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index 2ef9ad6934e..46a598ae9fc 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -16,6 +16,11 @@
DECLARE_GLOBAL_DATA_PTR;
+/* control register */
+#define ALTERA_TIMER_CONT BIT(1) /* Continuous mode */
+#define ALTERA_TIMER_START BIT(2) /* Start timer */
+#define ALTERA_TIMER_STOP BIT(3) /* Stop timer */
+
struct altera_timer_regs {
u32 status; /* Timer status reg */
u32 control; /* Timer control reg */
@@ -30,11 +35,6 @@ struct altera_timer_platdata {
unsigned long clock_rate;
};
-/* control register */
-#define ALTERA_TIMER_CONT (1 << 1) /* Continuous mode */
-#define ALTERA_TIMER_START (1 << 2) /* Start timer */
-#define ALTERA_TIMER_STOP (1 << 3) /* Stop timer */
-
static int altera_timer_get_count(struct udevice *dev, unsigned long *count)
{
struct altera_timer_platdata *plat = dev->platdata;
@@ -88,8 +88,8 @@ static const struct timer_ops altera_timer_ops = {
};
static const struct udevice_id altera_timer_ids[] = {
- { .compatible = "altr,timer-1.0", },
- { }
+ { .compatible = "altr,timer-1.0" },
+ {}
};
U_BOOT_DRIVER(altera_timer) = {