summaryrefslogtreecommitdiffstats
path: root/Documentation/mips/time.README
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/mips/time.README')
-rw-r--r--Documentation/mips/time.README49
1 files changed, 13 insertions, 36 deletions
diff --git a/Documentation/mips/time.README b/Documentation/mips/time.README
index 69ddc5c14b79..a4ce603ed3b3 100644
--- a/Documentation/mips/time.README
+++ b/Documentation/mips/time.README
@@ -38,19 +38,14 @@ The new time code provide the following services:
a) Implements functions required by Linux common code:
time_init
- do_gettimeofday
- do_settimeofday
b) provides an abstraction of RTC and null RTC implementation as default.
extern unsigned long (*rtc_get_time)(void);
extern int (*rtc_set_time)(unsigned long);
- c) a set of gettimeoffset functions for different CPUs and different
- needs.
-
- d) high-level and low-level timer interrupt routines where the timer
- interrupt source may or may not be the CPU timer. The high-level
- routine is dispatched through do_IRQ() while the low-level is
+ c) high-level and low-level timer interrupt routines where the timer
+ interrupt source may or may not be the CPU timer. The high-level
+ routine is dispatched through do_IRQ() while the low-level is
dispatched in assemably code (usually int-handler.S)
@@ -63,7 +58,7 @@ the following functions or values:
a) board_time_init - a function pointer. Invoked at the beginnig of
time_init(). It is optional.
1. (optional) set up RTC routines
- 2. (optional) calibrate and set the mips_counter_frequency
+ 2. (optional) calibrate and set the mips_hpt_frequency
b) plat_timer_setup - a function pointer. Invoked at the end of time_init()
1. (optional) over-ride any decisions made in time_init()
@@ -72,9 +67,8 @@ the following functions or values:
c) (optional) board-specific RTC routines.
- d) (optional) mips_counter_frequency - It must be definied if the board
- is using CPU counter for timer interrupt or it is using fixed rate
- gettimeoffset().
+ d) (optional) mips_hpt_frequency - It must be definied if the board
+ is using CPU counter for timer interrupt.
PORTING GUIDE
@@ -89,22 +83,12 @@ Step 1: decide how you like to implement the time services.
If the answer is no, you need a timer to provide the timer interrupt
at 100 HZ speed.
- You cannot use the fast gettimeoffset functions, i.e.,
-
- unsigned long fixed_rate_gettimeoffset(void);
- unsigned long calibrate_div32_gettimeoffset(void);
- unsigned long calibrate_div64_gettimeoffset(void);
-
- You can use null_gettimeoffset() will gives the same time resolution as
- jiffy. Or you can implement your own gettimeoffset (probably based on
- some ad hoc hardware on your machine.)
-
c) The following sub steps assume your CPU has counter register.
Do you plan to use the CPU counter register as the timer interrupt
or use an exnternal timer?
In order to use CPU counter register as the timer interrupt source, you
- must know the counter speed (mips_counter_frequency). It is usually the
+ must know the counter speed (mips_hpt_frequency). It is usually the
same as the CPU speed or an integral divisor of it.
d) decide on whether you want to use high-level or low-level timer
@@ -121,10 +105,10 @@ Step 3: implement rtc routines, board_time_init() and plat_timer_setup()
if needed.
board_time_init() -
- a) (optional) set up RTC routines,
- b) (optional) calibrate and set the mips_counter_frequency
- (only needed if you intended to use fixed_rate_gettimeoffset
- or use cpu counter as timer interrupt source)
+ a) (optional) set up RTC routines,
+ b) (optional) calibrate and set the mips_hpt_frequency
+ (only needed if you intended to use cpu counter as timer interrupt
+ source)
plat_timer_setup() -
a) (optional) over-write any choices made above by time_init().
@@ -154,8 +138,8 @@ for some of the functions in time.c.
For example, you may define your own timer interrupt routine, which does
some of its own processing and then calls timer_interrupt().
-You can also over-ride any of the built-in functions (gettimeoffset,
-RTC routines and/or timer interrupt routine).
+You can also over-ride any of the built-in functions (RTC routines
+and/or timer interrupt routine).
PORTING NOTES FOR SMP
@@ -187,10 +171,3 @@ You need to decide on your timer interrupt sources.
You can also do the low-level version of those interrupt routines,
following similar dispatching routes described above.
-
-Note about do_gettimeoffset():
-
- It is very likely the CPU counter registers are not sync'ed up in a SMP box.
- Therefore you cannot really use the many of the existing routines that
- are based on CPU counter. You should wirte your own gettimeoffset rouinte
- if you want intra-jiffy resolution.
OpenPOWER on IntegriCloud