Merge branches 'sh/stable-updates' and 'sh/sparseirq'
This commit is contained in:
@@ -288,7 +288,15 @@ static inline cycle_t clocksource_read(struct clocksource *cs)
|
||||
*/
|
||||
static inline int clocksource_enable(struct clocksource *cs)
|
||||
{
|
||||
return cs->enable ? cs->enable(cs) : 0;
|
||||
int ret = 0;
|
||||
|
||||
if (cs->enable)
|
||||
ret = cs->enable(cs);
|
||||
|
||||
/* save mult_orig on enable */
|
||||
cs->mult_orig = cs->mult;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -25,8 +25,7 @@ struct plat_sci_port {
|
||||
unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */
|
||||
unsigned int type; /* SCI / SCIF / IRDA */
|
||||
upf_t flags; /* UPF_* flags */
|
||||
char *clk; /* clock string */
|
||||
};
|
||||
|
||||
int early_sci_setup(struct uart_port *port);
|
||||
|
||||
#endif /* __LINUX_SERIAL_SCI_H */
|
||||
|
@@ -1,13 +0,0 @@
|
||||
#ifndef __SH_CMT_H__
|
||||
#define __SH_CMT_H__
|
||||
|
||||
struct sh_cmt_config {
|
||||
char *name;
|
||||
unsigned long channel_offset;
|
||||
int timer_bit;
|
||||
char *clk;
|
||||
unsigned long clockevent_rating;
|
||||
unsigned long clocksource_rating;
|
||||
};
|
||||
|
||||
#endif /* __SH_CMT_H__ */
|
13
include/linux/sh_timer.h
Normal file
13
include/linux/sh_timer.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef __SH_TIMER_H__
|
||||
#define __SH_TIMER_H__
|
||||
|
||||
struct sh_timer_config {
|
||||
char *name;
|
||||
long channel_offset;
|
||||
int timer_bit;
|
||||
char *clk;
|
||||
unsigned long clockevent_rating;
|
||||
unsigned long clocksource_rating;
|
||||
};
|
||||
|
||||
#endif /* __SH_TIMER_H__ */
|
@@ -113,6 +113,21 @@ struct timespec current_kernel_time(void);
|
||||
#define CURRENT_TIME (current_kernel_time())
|
||||
#define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 })
|
||||
|
||||
/* Some architectures do not supply their own clocksource.
|
||||
* This is mainly the case in architectures that get their
|
||||
* inter-tick times by reading the counter on their interval
|
||||
* timer. Since these timers wrap every tick, they're not really
|
||||
* useful as clocksources. Wrapping them to act like one is possible
|
||||
* but not very efficient. So we provide a callout these arches
|
||||
* can implement for use with the jiffies clocksource to provide
|
||||
* finer then tick granular time.
|
||||
*/
|
||||
#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
|
||||
extern u32 arch_gettimeoffset(void);
|
||||
#else
|
||||
static inline u32 arch_gettimeoffset(void) { return 0; }
|
||||
#endif
|
||||
|
||||
extern void do_gettimeofday(struct timeval *tv);
|
||||
extern int do_settimeofday(struct timespec *tv);
|
||||
extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
|
||||
|
Reference in New Issue
Block a user