[PATCH] cpm2_pic: Allow correct flow_types for port C interrupts

Scott Wood scottwood at freescale.com
Wed Dec 9 10:09:11 EST 2009


Mark Ware wrote:
> Mark Ware wrote:
>> CPM2 Port C interrupts can be either falling edge, or either edge.
>> Other external interrupts are either falling edge or active low.
[snip]
>> +	/* Port C interrupts are either IRQ_TYPE_EDGE_FALLING or
>> +	 * IRQ_TYPE_EDGE_BOTH (default).  All others are IRQ_TYPE_EDGE_FALLING
>> +	 * or IRQ_TYPE_LEVEL_LOW (default)
>> +	 */
>> +	if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0) {
>> +		if (flow_type == IRQ_TYPE_NONE)
>> +			flow_type = IRQ_TYPE_EDGE_BOTH;
>> +
>> +		if (flow_type & ~IRQ_TYPE_EDGE_BOTH) {
>> +			printk(KERN_ERR "CPM2 PIC: sense type 0x%x not supported\n",
>> +				flow_type);
>> +			return -EINVAL;
>> +		}

The above code looks like it would allow rising-only, which according to 
the changelog isn't supported.

-Scott


More information about the Linuxppc-dev mailing list