ARM: davinci: wrap HW interrupt numbers with a macro
Once we select SPARSE_IRQ, the interrupt numbers defined in mach/irqs.h will only signify the hardware interrupt offsets, not the interrupt numbers seen by linux. Introduce a wrapper macro that translates the hwirq number to virtual numbers. For now it's just a dummy. Use that macro when specifying the interrupts in resources for platform devices. Reviewed-by: David Lechner <david@lechnology.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:

committed by
Sekhar Nori

parent
fb746842f6
commit
a98ca73ee3
@@ -38,7 +38,7 @@ static struct resource usb_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_USBINT,
|
||||
.start = DAVINCI_INTC_IRQ(IRQ_USBINT),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.name = "mc"
|
||||
},
|
||||
@@ -70,8 +70,9 @@ void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
|
||||
|
||||
if (cpu_is_davinci_dm646x()) {
|
||||
/* Override the defaults as DM6467 uses different IRQs. */
|
||||
usb_dev.resource[1].start = IRQ_DM646X_USBINT;
|
||||
usb_dev.resource[2].start = IRQ_DM646X_USBDMAINT;
|
||||
usb_dev.resource[1].start = DAVINCI_INTC_IRQ(IRQ_DM646X_USBINT);
|
||||
usb_dev.resource[2].start = DAVINCI_INTC_IRQ(
|
||||
IRQ_DM646X_USBDMAINT);
|
||||
} else /* other devices don't have dedicated CPPI IRQ */
|
||||
usb_dev.num_resources = 2;
|
||||
|
||||
|
Reference in New Issue
Block a user