RE: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-19 Thread li.xi...@freescale.com
> >>> +static inline u32 ftm_readl(void __iomem *addr) > >>> +{ > >>> + if (big_endian) > >> > >> I am not a big fan of addressing global variables in the functions, so > >> if you can pass the structure pointer around here and the other > >> functions instead that would be nice. > >> > >>

Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-19 Thread Daniel Lezcano
On 05/19/2014 04:26 AM, li.xi...@freescale.com wrote: +#define FTM_CNTIN 0x4C + +static void __iomem *clksrc_base; +static void __iomem *clkevt_base; +static unsigned long peroidic_cyc; +static unsigned long ps; +bool big_endian; + Usually this is encaspulated in a structure. struct

Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-19 Thread Daniel Lezcano
On 05/19/2014 04:26 AM, li.xi...@freescale.com wrote: +#define FTM_CNTIN 0x4C + +static void __iomem *clksrc_base; +static void __iomem *clkevt_base; +static unsigned long peroidic_cyc; +static unsigned long ps; +bool big_endian; + Usually this is encaspulated in a structure. struct

RE: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-19 Thread li.xi...@freescale.com
+static inline u32 ftm_readl(void __iomem *addr) +{ + if (big_endian) I am not a big fan of addressing global variables in the functions, so if you can pass the structure pointer around here and the other functions instead that would be nice. Otherwise the patch sounds ok. Thanks

RE: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-18 Thread li.xi...@freescale.com
> > +#define FTM_CNTIN 0x4C > > + > > +static void __iomem *clksrc_base; > > +static void __iomem *clkevt_base; > > +static unsigned long peroidic_cyc; > > +static unsigned long ps; > > +bool big_endian; > > + > > Usually this is encaspulated in a structure. > > struct ftm_clock_device { >

RE: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-18 Thread li.xi...@freescale.com
> Subject: Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) > timer support > > On 04/28/14 19:18, Xiubo Li wrote: > > +bool big_endian; > > + > > static? > I will fix this. Thanks, BRs Xiubo > -- > Qualcomm Innovation Center

RE: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-18 Thread li.xi...@freescale.com
> > +static void __iomem *clksrc_base; > > +static void __iomem *clkevt_base; > > +static unsigned long peroidic_cyc; > > peroidic_cyc ? Did you mean periodic_cyc ? :) > Yes, I'll fix it. Thanks, BRs Xiubo > > > -- > Linaro.org │ Open source software for ARM

RE: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-18 Thread li.xi...@freescale.com
+static void __iomem *clksrc_base; +static void __iomem *clkevt_base; +static unsigned long peroidic_cyc; peroidic_cyc ? Did you mean periodic_cyc ? :) Yes, I'll fix it. Thanks, BRs Xiubo -- http://www.linaro.org/ Linaro.org │ Open source software for ARM SoCs Follow

RE: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-18 Thread li.xi...@freescale.com
Subject: Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support On 04/28/14 19:18, Xiubo Li wrote: +bool big_endian; + static? I will fix this. Thanks, BRs Xiubo -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted

RE: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-18 Thread li.xi...@freescale.com
+#define FTM_CNTIN 0x4C + +static void __iomem *clksrc_base; +static void __iomem *clkevt_base; +static unsigned long peroidic_cyc; +static unsigned long ps; +bool big_endian; + Usually this is encaspulated in a structure. struct ftm_clock_device { void __iomem

Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-16 Thread Daniel Lezcano
On 04/29/2014 04:18 AM, Xiubo Li wrote: The Freescale FlexTimer Module time reference is a 16-bit counter that can be used as an unsigned or signed increase counter. CNTIN defines the starting value of the count and MOD defines the final value of the count. The value of CNTIN is loaded into the

Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-16 Thread Stephen Boyd
On 04/28/14 19:18, Xiubo Li wrote: > +bool big_endian; > + static? -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-16 Thread Daniel Lezcano
On 04/29/2014 04:18 AM, Xiubo Li wrote: The Freescale FlexTimer Module time reference is a 16-bit counter that can be used as an unsigned or signed increase counter. CNTIN defines the starting value of the count and MOD defines the final value of the count. The value of CNTIN is loaded into the

Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-16 Thread Daniel Lezcano
On 04/29/2014 04:18 AM, Xiubo Li wrote: The Freescale FlexTimer Module time reference is a 16-bit counter that can be used as an unsigned or signed increase counter. CNTIN defines the starting value of the count and MOD defines the final value of the count. The value of CNTIN is loaded into the

Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-16 Thread Stephen Boyd
On 04/28/14 19:18, Xiubo Li wrote: +bool big_endian; + static? -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org

Re: [PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-05-16 Thread Daniel Lezcano
On 04/29/2014 04:18 AM, Xiubo Li wrote: The Freescale FlexTimer Module time reference is a 16-bit counter that can be used as an unsigned or signed increase counter. CNTIN defines the starting value of the count and MOD defines the final value of the count. The value of CNTIN is loaded into the

[PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-04-28 Thread Xiubo Li
The Freescale FlexTimer Module time reference is a 16-bit counter that can be used as an unsigned or signed increase counter. CNTIN defines the starting value of the count and MOD defines the final value of the count. The value of CNTIN is loaded into the FTM counter, and the counter increments

[PATCHv3 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support

2014-04-28 Thread Xiubo Li
The Freescale FlexTimer Module time reference is a 16-bit counter that can be used as an unsigned or signed increase counter. CNTIN defines the starting value of the count and MOD defines the final value of the count. The value of CNTIN is loaded into the FTM counter, and the counter increments