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

Pawel Moll pawel.moll at arm.com
Wed Mar 13 12:41:15 EDT 2013


On Wed, 2013-03-13 at 16:35 +0000, Arnd Bergmann wrote:
> Makes sense. I guess you can actually derive "has_timint1"
> from the presence of the irq and just try to parse it:
> 
> 	irq = irq_of_parse_and_map(np, 0);
> 	if (irq) {
> 		evtoffs = TIMER_1_BASE;
> 		srcoffs = TIMER_2_BASE;
> 	} else {
> 		irq = irq_of_parse_and_map(np, 1);
> 		if (!irq)
> 			return -ENODEV;
> 		srcoffs = TIMER_1_BASE;
> 		evtoffs = TIMER_2_BASE;
> 	}
> 
> 
> I wonder if we can ever get into the second case though: If the
> first interrupt in not valid, can there be a second one in the
> interrupts property? I don't know of a way to put an "invalid"
> interrupt in there.

The discussion in the "[PATCH v3 03/11] clocksource: sp804: add device
tree support" thread resulted in some ideas how to describe such
situation. I suggested using interrupt-names property to explicitly
describe the numbers, Rob wanted to simply define one or two interrupts
and in the former case have a special property describing which one is
it. Either way you can get this information from the tree. The main
argument is about the clockevent/source aliases - whether they should be
obligatory, optional or banned.

Paweł





More information about the linux-arm-kernel mailing list