[PATCH v3 03/11] clocksource: sp804: add device tree support

Pawel Moll pawel.moll at arm.com
Wed Mar 13 11:49:08 EDT 2013


On Wed, 2013-03-13 at 15:42 +0000, Haojian Zhuang wrote:
> In my current implementation, I need two things to judge whether
> irq is really necessary.
> 
> If the timer contains "arm,sp804-clockevent = <evtoffs>" property,
> I'll check whether the timer irq is specified at the same time.
> 
> TIMINT1 & TIMINTC are not routed. TIMINT2 is used for clock event.

Fine, so simply reverse the logic and drop the "arm,sp804-clock*"
properties. Something like:

if (has_timint1) {
	evtoffs = TIMER_1_BASE;
	irq = irq_of_parse_and_map(np, 1);
	srcoffs = TIMER_2_BASE;
} else (has_timint2) {
	evtoffs = TIMER_2_BASE;
	irq = irq_of_parse_and_map(np, 2);
	srcoffs = TIMER_1_BASE;
} else {
	can't be clockevent, sorry
}

Hope it makes clear what I'd expect from the driver.

Paweł





More information about the linux-arm-kernel mailing list