diff options
| author | Takashi Iwai <tiwai@suse.de> | 2012-01-31 09:13:14 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2012-01-31 09:13:14 -0500 |
| commit | ea51e5040e24eefe44d70bc654a237ca1f0225b0 (patch) | |
| tree | df2e5922dcdfafae62a10d8cd97f98121064fc23 /include/linux/clocksource.h | |
| parent | 3422a47041b8cb8f14ac1e3926bcf711121df6dc (diff) | |
| parent | 8dbd52daee38adaae4d5a674bcca837e694a4f4c (diff) | |
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'include/linux/clocksource.h')
| -rw-r--r-- | include/linux/clocksource.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 139c4db55f17..081147da0564 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
| @@ -71,7 +71,7 @@ struct timecounter { | |||
| 71 | 71 | ||
| 72 | /** | 72 | /** |
| 73 | * cyclecounter_cyc2ns - converts cycle counter cycles to nanoseconds | 73 | * cyclecounter_cyc2ns - converts cycle counter cycles to nanoseconds |
| 74 | * @tc: Pointer to cycle counter. | 74 | * @cc: Pointer to cycle counter. |
| 75 | * @cycles: Cycles | 75 | * @cycles: Cycles |
| 76 | * | 76 | * |
| 77 | * XXX - This could use some mult_lxl_ll() asm optimization. Same code | 77 | * XXX - This could use some mult_lxl_ll() asm optimization. Same code |
| @@ -114,7 +114,7 @@ extern u64 timecounter_read(struct timecounter *tc); | |||
| 114 | * time base as values returned by | 114 | * time base as values returned by |
| 115 | * timecounter_read() | 115 | * timecounter_read() |
| 116 | * @tc: Pointer to time counter. | 116 | * @tc: Pointer to time counter. |
| 117 | * @cycle: a value returned by tc->cc->read() | 117 | * @cycle_tstamp: a value returned by tc->cc->read() |
| 118 | * | 118 | * |
| 119 | * Cycle counts that are converted correctly as long as they | 119 | * Cycle counts that are converted correctly as long as they |
| 120 | * fall into the interval [-1/2 max cycle count, +1/2 max cycle count], | 120 | * fall into the interval [-1/2 max cycle count, +1/2 max cycle count], |
| @@ -156,10 +156,12 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
| 156 | * @mult: cycle to nanosecond multiplier | 156 | * @mult: cycle to nanosecond multiplier |
| 157 | * @shift: cycle to nanosecond divisor (power of two) | 157 | * @shift: cycle to nanosecond divisor (power of two) |
| 158 | * @max_idle_ns: max idle time permitted by the clocksource (nsecs) | 158 | * @max_idle_ns: max idle time permitted by the clocksource (nsecs) |
| 159 | * @maxadj: maximum adjustment value to mult (~11%) | ||
| 159 | * @flags: flags describing special properties | 160 | * @flags: flags describing special properties |
| 160 | * @archdata: arch-specific data | 161 | * @archdata: arch-specific data |
| 161 | * @suspend: suspend function for the clocksource, if necessary | 162 | * @suspend: suspend function for the clocksource, if necessary |
| 162 | * @resume: resume function for the clocksource, if necessary | 163 | * @resume: resume function for the clocksource, if necessary |
| 164 | * @cycle_last: most recent cycle counter value seen by ::read() | ||
| 163 | */ | 165 | */ |
| 164 | struct clocksource { | 166 | struct clocksource { |
| 165 | /* | 167 | /* |
| @@ -172,7 +174,7 @@ struct clocksource { | |||
| 172 | u32 mult; | 174 | u32 mult; |
| 173 | u32 shift; | 175 | u32 shift; |
| 174 | u64 max_idle_ns; | 176 | u64 max_idle_ns; |
| 175 | 177 | u32 maxadj; | |
| 176 | #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA | 178 | #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA |
| 177 | struct arch_clocksource_data archdata; | 179 | struct arch_clocksource_data archdata; |
| 178 | #endif | 180 | #endif |
| @@ -186,6 +188,7 @@ struct clocksource { | |||
| 186 | void (*suspend)(struct clocksource *cs); | 188 | void (*suspend)(struct clocksource *cs); |
| 187 | void (*resume)(struct clocksource *cs); | 189 | void (*resume)(struct clocksource *cs); |
| 188 | 190 | ||
| 191 | /* private: */ | ||
| 189 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | 192 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG |
| 190 | /* Watchdog related data, used by the framework */ | 193 | /* Watchdog related data, used by the framework */ |
| 191 | struct list_head wd_list; | 194 | struct list_head wd_list; |
| @@ -260,6 +263,9 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant) | |||
| 260 | 263 | ||
| 261 | /** | 264 | /** |
| 262 | * clocksource_cyc2ns - converts clocksource cycles to nanoseconds | 265 | * clocksource_cyc2ns - converts clocksource cycles to nanoseconds |
| 266 | * @cycles: cycles | ||
| 267 | * @mult: cycle to nanosecond multiplier | ||
| 268 | * @shift: cycle to nanosecond divisor (power of two) | ||
| 263 | * | 269 | * |
| 264 | * Converts cycles to nanoseconds, using the given mult and shift. | 270 | * Converts cycles to nanoseconds, using the given mult and shift. |
| 265 | * | 271 | * |
