diff mbox

[PATCHv3,3/4] clocksource: dw_apb_timer: Move timer defines to header file.

Message ID 1377118427-20644-3-git-send-email-dinguyen@altera.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dinh Nguyen Aug. 21, 2013, 8:53 p.m. UTC
From: Dinh Nguyen <dinguyen@altera.com>

Move all dw_apb_timer defines to include/linux/dw_apb_timer.h.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
CC: Rob Herring <rob.herring@calxeda.com>
CC: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
CC: Jamie Iles <jamie@jamieiles.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Pavel Machek <pavel@denx.de>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-arm-kernel@lists.infradead.org
---
 include/linux/dw_apb_timer.h |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Pavel Machek Aug. 22, 2013, 11:01 a.m. UTC | #1
Hi!

On Wed 2013-08-21 15:53:46, dinguyen@altera.com wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
> 
> Move all dw_apb_timer defines to include/linux/dw_apb_timer.h.

That makes sense. But the changelog says "move" while the patch only
adds them to second place, which can not be right.

Is there public git tree with the patches somewhere?

Thanks,
								Pavel

> ---
>  include/linux/dw_apb_timer.h |   19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h
> index 1f79b20..1d2b949 100644
> --- a/include/linux/dw_apb_timer.h
> +++ b/include/linux/dw_apb_timer.h
> @@ -19,6 +19,25 @@
>  
>  #define APBTMRS_REG_SIZE       0x14
>  
> +#define APBT_MIN_PERIOD                 4
> +#define APBT_MIN_DELTA_USEC             200
> +
> +#define APBTMR_N_LOAD_COUNT             0x00
> +#define APBTMR_N_CURRENT_VALUE          0x04
> +#define APBTMR_N_CONTROL                0x08
> +#define APBTMR_N_EOI                    0x0c
> +#define APBTMR_N_INT_STATUS             0x10
> +
> +#define APBTMRS_INT_STATUS              0xa0
> +#define APBTMRS_EOI                     0xa4
> +#define APBTMRS_RAW_INT_STATUS          0xa8
> +#define APBTMRS_COMP_VERSION            0xac
> +
> +#define APBTMR_CONTROL_ENABLE           (1 << 0)
> +/* 1: periodic, 0:free running. */
> +#define APBTMR_CONTROL_MODE_PERIODIC    (1 << 1)
> +#define APBTMR_CONTROL_INT              (1 << 2)
> +
>  struct dw_apb_timer {
>  	void __iomem				*base;
>  	unsigned long				freq;
Dinh Nguyen Aug. 22, 2013, 4:19 p.m. UTC | #2
On Thu, 2013-08-22 at 13:01 +0200, ZY - pavel wrote:
> Hi!
> 
> On Wed 2013-08-21 15:53:46, dinguyen@altera.com wrote:
> > From: Dinh Nguyen <dinguyen@altera.com>
> > 
> > Move all dw_apb_timer defines to include/linux/dw_apb_timer.h.
> 
> That makes sense. But the changelog says "move" while the patch only
> adds them to second place, which can not be right.

Oops, must not have saved on one of my shells. Thanks for the review.
Will post a v4 asap.

> 
> Is there public git tree with the patches somewhere?

git://git.rocketboards.org/linux-socfpga-next.git

Dinh
> 
> Thanks,
> 								Pavel
> 
> > ---
> >  include/linux/dw_apb_timer.h |   19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> > 
> > diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h
> > index 1f79b20..1d2b949 100644
> > --- a/include/linux/dw_apb_timer.h
> > +++ b/include/linux/dw_apb_timer.h
> > @@ -19,6 +19,25 @@
> >  
> >  #define APBTMRS_REG_SIZE       0x14
> >  
> > +#define APBT_MIN_PERIOD                 4
> > +#define APBT_MIN_DELTA_USEC             200
> > +
> > +#define APBTMR_N_LOAD_COUNT             0x00
> > +#define APBTMR_N_CURRENT_VALUE          0x04
> > +#define APBTMR_N_CONTROL                0x08
> > +#define APBTMR_N_EOI                    0x0c
> > +#define APBTMR_N_INT_STATUS             0x10
> > +
> > +#define APBTMRS_INT_STATUS              0xa0
> > +#define APBTMRS_EOI                     0xa4
> > +#define APBTMRS_RAW_INT_STATUS          0xa8
> > +#define APBTMRS_COMP_VERSION            0xac
> > +
> > +#define APBTMR_CONTROL_ENABLE           (1 << 0)
> > +/* 1: periodic, 0:free running. */
> > +#define APBTMR_CONTROL_MODE_PERIODIC    (1 << 1)
> > +#define APBTMR_CONTROL_INT              (1 << 2)
> > +
> >  struct dw_apb_timer {
> >  	void __iomem				*base;
> >  	unsigned long				freq;
>
diff mbox

Patch

diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h
index 1f79b20..1d2b949 100644
--- a/include/linux/dw_apb_timer.h
+++ b/include/linux/dw_apb_timer.h
@@ -19,6 +19,25 @@ 
 
 #define APBTMRS_REG_SIZE       0x14
 
+#define APBT_MIN_PERIOD                 4
+#define APBT_MIN_DELTA_USEC             200
+
+#define APBTMR_N_LOAD_COUNT             0x00
+#define APBTMR_N_CURRENT_VALUE          0x04
+#define APBTMR_N_CONTROL                0x08
+#define APBTMR_N_EOI                    0x0c
+#define APBTMR_N_INT_STATUS             0x10
+
+#define APBTMRS_INT_STATUS              0xa0
+#define APBTMRS_EOI                     0xa4
+#define APBTMRS_RAW_INT_STATUS          0xa8
+#define APBTMRS_COMP_VERSION            0xac
+
+#define APBTMR_CONTROL_ENABLE           (1 << 0)
+/* 1: periodic, 0:free running. */
+#define APBTMR_CONTROL_MODE_PERIODIC    (1 << 1)
+#define APBTMR_CONTROL_INT              (1 << 2)
+
 struct dw_apb_timer {
 	void __iomem				*base;
 	unsigned long				freq;