static int sh_tmu_clocksource_enable(struct clocksource *cs) { struct sh_tmu_priv *p = cs_to_sh_tmu(cs); int ret; ret = sh_tmu_enable(p); if (!ret) __clocksource_updatefreq_hz(cs, p->rate); return ret; }
static int em_sti_clocksource_enable(struct clocksource *cs) { int ret; struct em_sti_priv *p = cs_to_em_sti(cs); ret = em_sti_start(p, USER_CLOCKSOURCE); if (!ret) __clocksource_updatefreq_hz(cs, p->rate); return ret; }
static int sh_cmt_clocksource_enable(struct clocksource *cs) { int ret; struct sh_cmt_priv *p = cs_to_sh_cmt(cs); p->total_cycles = 0; ret = sh_cmt_start(p, FLAG_CLOCKSOURCE); if (!ret) __clocksource_updatefreq_hz(cs, p->rate); return ret; }
static int sh_tmu_clocksource_enable(struct clocksource *cs) { struct sh_tmu_channel *ch = cs_to_sh_tmu(cs); int ret; if (WARN_ON(ch->cs_enabled)) return 0; ret = sh_tmu_enable(ch); if (!ret) { __clocksource_updatefreq_hz(cs, ch->rate); ch->cs_enabled = true; } return ret; }
static int sh_tmu_clocksource_enable(struct clocksource *cs) { struct sh_tmu_priv *p = cs_to_sh_tmu(cs); int ret; if (WARN_ON(p->cs_enabled)) return 0; ret = sh_tmu_enable(p); if (!ret) { __clocksource_updatefreq_hz(cs, p->rate); p->cs_enabled = true; } return ret; }