diff options
author | Thomas Chou <thomas@wytron.com.tw> | 2015-10-31 20:54:16 +0800 |
---|---|---|
committer | Thomas Chou <thomas@wytron.com.tw> | 2015-11-06 09:14:12 +0800 |
commit | 1235e5a56ee61c9e986f4cd1a4e555c1a151e35a (patch) | |
tree | c22eb75bf60e3291d05401fc67d155f2bfdaa655 | |
parent | 430b43e8ee55798232f6e1cdd4f5ae486906c3f9 (diff) | |
download | u-boot-imx-1235e5a56ee61c9e986f4cd1a4e555c1a151e35a.zip u-boot-imx-1235e5a56ee61c9e986f4cd1a4e555c1a151e35a.tar.gz u-boot-imx-1235e5a56ee61c9e986f4cd1a4e555c1a151e35a.tar.bz2 |
timer: altera_timer: minor clean up
- Moved macro definitions to top
- Remove the penultimate comma in of_match ids
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
-rw-r--r-- | drivers/timer/altera_timer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c index 288357c..46a598a 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 BIT(1) /* Continuous mode */ -#define ALTERA_TIMER_START BIT(2) /* Start timer */ -#define ALTERA_TIMER_STOP BIT(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) = { |