1 Feb 2012 01:02
Re: [PATCH v3 1/2] irq: add irq_domain support to generic-chip
Grant Likely <grant.likely <at> secretlab.ca>
2012-02-01 00:02:32 GMT
2012-02-01 00:02:32 GMT
On Mon, Jan 30, 2012 at 11:31:38AM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring <at> calxeda.com>
>
> Add irq domain support to irq generic-chip. This enables users of
> generic-chip to support dynamic irq assignment needed for DT interrupt
> binding.
>
> Signed-off-by: Rob Herring <rob.herring <at> calxeda.com>
> Cc: Grant Likely <grant.likely <at> secretlab.ca>
> Cc: Thomas Gleixner <tglx <at> linutronix.de>
> ---
> <at> <at> -39,7 +40,7 <at> <at> void irq_gc_noop(struct irq_data *d)
> void irq_gc_mask_disable_reg(struct irq_data *d)
> {
> struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
> - u32 mask = 1 << (d->irq - gc->irq_base);
> + u32 mask = 1 << d->hwirq;
As discussed on IRC, there needs to be a 1:N relationship between
an irq_domain and generic chips, but doing that means that hwirq no
longer directly maps to the bit in the register.
This could be solved however if a mod is applied to the hwirq number
and if we're careful to line up hwirqs to those mod boundaries:
u32 mask = 1 << (d->hwirq % gc->bank_size);
> }
> gc->irq_cnt = i - gc->irq_base;
> }
(Continue reading)
RSS Feed