Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70f08001 authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt
Browse files

sh: tmu disable support



Add TMU disable support so we can use other clockevents.
Also, setup the clockevent rating.

Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 955c0778
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -146,7 +146,14 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dummy)
	_tmu_clear_status(TMU0);
	_tmu_set_irq(TMU0,tmu0_clockevent.mode != CLOCK_EVT_MODE_ONESHOT);

	switch (tmu0_clockevent.mode) {
	case CLOCK_EVT_MODE_ONESHOT:
	case CLOCK_EVT_MODE_PERIODIC:
		evt->event_handler(evt);
		break;
	default:
		break;
	}

	return IRQ_HANDLED;
}
@@ -271,6 +278,7 @@ static int tmu_timer_init(void)
			clockevent_delta2ns(1, &tmu0_clockevent);

	tmu0_clockevent.cpumask = cpumask_of(0);
	tmu0_clockevent.rating = 100;

	clockevents_register_device(&tmu0_clockevent);