diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-22 00:29:37 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-22 00:29:37 -0400 |
commit | 5f8371cec93b94a24a55ba1de642ce6eade6d62c (patch) | |
tree | 61b6d2acb10226b3c0f2d31bda3a49288e540eba /include/linux | |
parent | 8e9bb19ef97d6594e735bee64b6d72103e350854 (diff) | |
parent | d8586ba6e1415150e1bab89f0a05447bb6f2d6d5 (diff) |
Merge branches 'sh/stable-updates' and 'sh/sparseirq'
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/clocksource.h | 10 | ||||
-rw-r--r-- | include/linux/serial_sci.h | 3 | ||||
-rw-r--r-- | include/linux/sh_cmt.h | 13 | ||||
-rw-r--r-- | include/linux/sh_timer.h | 13 | ||||
-rw-r--r-- | include/linux/time.h | 15 |
5 files changed, 38 insertions, 16 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 5a40d14daa9f..c56457c8334e 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -288,7 +288,15 @@ static inline cycle_t clocksource_read(struct clocksource *cs) | |||
288 | */ | 288 | */ |
289 | static inline int clocksource_enable(struct clocksource *cs) | 289 | static inline int clocksource_enable(struct clocksource *cs) |
290 | { | 290 | { |
291 | return cs->enable ? cs->enable(cs) : 0; | 291 | int ret = 0; |
292 | |||
293 | if (cs->enable) | ||
294 | ret = cs->enable(cs); | ||
295 | |||
296 | /* save mult_orig on enable */ | ||
297 | cs->mult_orig = cs->mult; | ||
298 | |||
299 | return ret; | ||
292 | } | 300 | } |
293 | 301 | ||
294 | /** | 302 | /** |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 893cc53486bc..1c297ddc9d5a 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -25,8 +25,7 @@ struct plat_sci_port { | |||
25 | unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ | 25 | unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ |
26 | unsigned int type; /* SCI / SCIF / IRDA */ | 26 | unsigned int type; /* SCI / SCIF / IRDA */ |
27 | upf_t flags; /* UPF_* flags */ | 27 | upf_t flags; /* UPF_* flags */ |
28 | char *clk; /* clock string */ | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | int early_sci_setup(struct uart_port *port); | ||
31 | |||
32 | #endif /* __LINUX_SERIAL_SCI_H */ | 31 | #endif /* __LINUX_SERIAL_SCI_H */ |
diff --git a/include/linux/sh_cmt.h b/include/linux/sh_cmt.h deleted file mode 100644 index 68cacde5954f..000000000000 --- a/include/linux/sh_cmt.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __SH_CMT_H__ | ||
2 | #define __SH_CMT_H__ | ||
3 | |||
4 | struct sh_cmt_config { | ||
5 | char *name; | ||
6 | unsigned long channel_offset; | ||
7 | int timer_bit; | ||
8 | char *clk; | ||
9 | unsigned long clockevent_rating; | ||
10 | unsigned long clocksource_rating; | ||
11 | }; | ||
12 | |||
13 | #endif /* __SH_CMT_H__ */ | ||
diff --git a/include/linux/sh_timer.h b/include/linux/sh_timer.h new file mode 100644 index 000000000000..864bd56bd3b0 --- /dev/null +++ b/include/linux/sh_timer.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef __SH_TIMER_H__ | ||
2 | #define __SH_TIMER_H__ | ||
3 | |||
4 | struct sh_timer_config { | ||
5 | char *name; | ||
6 | long channel_offset; | ||
7 | int timer_bit; | ||
8 | char *clk; | ||
9 | unsigned long clockevent_rating; | ||
10 | unsigned long clocksource_rating; | ||
11 | }; | ||
12 | |||
13 | #endif /* __SH_TIMER_H__ */ | ||
diff --git a/include/linux/time.h b/include/linux/time.h index 242f62499bb7..ea16c1a01d51 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -113,6 +113,21 @@ struct timespec current_kernel_time(void); | |||
113 | #define CURRENT_TIME (current_kernel_time()) | 113 | #define CURRENT_TIME (current_kernel_time()) |
114 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) | 114 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) |
115 | 115 | ||
116 | /* Some architectures do not supply their own clocksource. | ||
117 | * This is mainly the case in architectures that get their | ||
118 | * inter-tick times by reading the counter on their interval | ||
119 | * timer. Since these timers wrap every tick, they're not really | ||
120 | * useful as clocksources. Wrapping them to act like one is possible | ||
121 | * but not very efficient. So we provide a callout these arches | ||
122 | * can implement for use with the jiffies clocksource to provide | ||
123 | * finer then tick granular time. | ||
124 | */ | ||
125 | #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET | ||
126 | extern u32 arch_gettimeoffset(void); | ||
127 | #else | ||
128 | static inline u32 arch_gettimeoffset(void) { return 0; } | ||
129 | #endif | ||
130 | |||
116 | extern void do_gettimeofday(struct timeval *tv); | 131 | extern void do_gettimeofday(struct timeval *tv); |
117 | extern int do_settimeofday(struct timespec *tv); | 132 | extern int do_settimeofday(struct timespec *tv); |
118 | extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); | 133 | extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); |