Message ID | 1446189498-26549-6-git-send-email-thomas@wytron.com.tw |
---|---|
State | Accepted, archived |
Delegated to: | Thomas Chou |
Headers | show |
On 30 October 2015 at 12:48, Thomas Chou <thomas@wytron.com.tw> wrote: > - 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> > drivers/timer/altera_timer.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c > index 288357c..7952ad7 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,7 +88,7 @@ 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" }, > { } > }; > thanks!
On 2015年10月30日 15:18, Thomas Chou wrote: > - Moved macro definitions to top > - Remove the penultimate comma in of_match ids > > Signed-off-by: Thomas Chou <thomas@wytron.com.tw> > --- > drivers/timer/altera_timer.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > Applied to u-boot-nios. > diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c > index 288357c..7952ad7 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,7 +88,7 @@ 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" }, > { } > }; > >
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c index 288357c..7952ad7 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,7 +88,7 @@ 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" }, { } };
- Moved macro definitions to top - Remove the penultimate comma in of_match ids Signed-off-by: Thomas Chou <thomas@wytron.com.tw> --- drivers/timer/altera_timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)