/* ASB2303-specific timer specifications * * Copyright (C) 2007, 2010 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public Licence * as published by the Free Software Foundation; either version * 2 of the Licence, or (at your option) any later version. */ #ifndef _ASM_UNIT_TIMEX_H #define _ASM_UNIT_TIMEX_H #include <asm/timer-regs.h> #include <unit/clock.h> #include <asm/param.h> /* * jiffies counter specifications */ #define TMJCBR_MAX 0xffff #define TMJCIRQ TM1IRQ #define TMJCICR TM1ICR #ifndef __ASSEMBLY__ #define MN10300_SRC_IOCLK MN10300_IOCLK #ifndef HZ # error HZ undeclared. #endif /* !HZ */ /* use as little prescaling as possible to avoid losing accuracy */ #if (MN10300_SRC_IOCLK + HZ / 2) / HZ - 1 <= TMJCBR_MAX # define IOCLK_PRESCALE 1 # define JC_TIMER_CLKSRC TM0MD_SRC_IOCLK # define TSC_TIMER_CLKSRC TM4MD_SRC_IOCLK #elif (MN10300_SRC_IOCLK / 8 + HZ / 2) / HZ - 1 <= TMJCBR_MAX # define IOCLK_PRESCALE 8 # define JC_TIMER_CLKSRC TM0MD_SRC_IOCLK_8 # define TSC_TIMER_CLKSRC TM4MD_SRC_IOCLK_8 #elif (MN10300_SRC_IOCLK / 32 + HZ / 2) / HZ - 1 <= TMJCBR_MAX # define IOCLK_PRESCALE 32 # define JC_TIMER_CLKSRC TM0MD_SRC_IOCLK_32 # define TSC_TIMER_CLKSRC TM4MD_SRC_IOCLK_32 #else # error You lose. #endif #define MN10300_JCCLK (MN10300_SRC_IOCLK / IOCLK_PRESCALE) #define MN10300_TSCCLK (MN10300_SRC_IOCLK / IOCLK_PRESCALE) #define MN10300_JC_PER_HZ ((MN10300_JCCLK + HZ / 2) / HZ) #define MN10300_TSC_PER_HZ ((MN10300_TSCCLK + HZ / 2) / HZ)
static inline void stop_jiffies_counter(void) { u16 tmp; TM01MD = JC_TIMER_CLKSRC | TM1MD_SRC_TM0CASCADE << 8; tmp = TM01MD; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
David Howells | 13 | 54.17% | 1 | 33.33% |
Mark Salter | 10 | 41.67% | 1 | 33.33% |
Akira Takeuchi | 1 | 4.17% | 1 | 33.33% |
Total | 24 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Mark Salter | 30 | 50.85% | 1 | 50.00% |
David Howells | 29 | 49.15% | 1 | 50.00% |
Total | 59 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
David Howells | 55 | 69.62% | 1 | 50.00% |
Akira Takeuchi | 24 | 30.38% | 1 | 50.00% |
Total | 79 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
David Howells | 17 | 60.71% | 1 | 50.00% |
Akira Takeuchi | 11 | 39.29% | 1 | 50.00% |
Total | 28 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
David Howells | 15 | 93.75% | 1 | 50.00% |
Mark Salter | 1 | 6.25% | 1 | 50.00% |
Total | 16 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
David Howells | 185 | 47.80% | 2 | 50.00% |
Akira Takeuchi | 160 | 41.34% | 1 | 25.00% |
Mark Salter | 42 | 10.85% | 1 | 25.00% |
Total | 387 | 100.00% | 4 | 100.00% |