Re: [PATCH 20/28] nios2: Time keeping

2014-04-22 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 9:44 PM, Arnd Bergmann wrote: > On Friday 18 April 2014, Ley Foon Tan wrote: >> +static inline unsigned long read_timersnapshot(void) >> +{ >> + unsigned long count; >> + >> + outw(0, timer_membase + ALTERA_TIMER_SNAPL_REG); >> + count = >> +

Re: [PATCH 20/28] nios2: Time keeping

2014-04-22 Thread Arnd Bergmann
On Friday 18 April 2014, Ley Foon Tan wrote: > +static inline unsigned long read_timersnapshot(void) > +{ > + unsigned long count; > + > + outw(0, timer_membase + ALTERA_TIMER_SNAPL_REG); > + count = > + inw(timer_membase + ALTERA_TIMER_SNAPH_REG) << 16 | > +

[PATCH 20/28] nios2: Time keeping

2014-04-18 Thread Ley Foon Tan
Add time keeping code for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/delay.h | 92 + arch/nios2/include/asm/timex.h | 27 arch/nios2/kernel/time.c | 150 + 3 files changed, 269 insertions(+) crea