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
@@ -56,7 +56,7 @@ static struct resource i2c_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_I2C,
|
||||
.start = DAVINCI_INTC_IRQ(IRQ_I2C),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
@@ -84,8 +84,8 @@ static struct resource ide_resources[] = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_IDE,
|
||||
.end = IRQ_IDE,
|
||||
.start = DAVINCI_INTC_IRQ(IRQ_IDE),
|
||||
.end = DAVINCI_INTC_IRQ(IRQ_IDE),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
@@ -133,11 +133,11 @@ static struct resource mmcsd0_resources[] = {
|
||||
},
|
||||
/* IRQs: MMC/SD, then SDIO */
|
||||
{
|
||||
.start = IRQ_MMCINT,
|
||||
.start = DAVINCI_INTC_IRQ(IRQ_MMCINT),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
/* different on dm355 */
|
||||
.start = IRQ_SDIOINT,
|
||||
.start = DAVINCI_INTC_IRQ(IRQ_SDIOINT),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
@@ -163,10 +163,10 @@ static struct resource mmcsd1_resources[] = {
|
||||
},
|
||||
/* IRQs: MMC/SD, then SDIO */
|
||||
{
|
||||
.start = IRQ_DM355_MMCINT1,
|
||||
.start = DAVINCI_INTC_IRQ(IRQ_DM355_MMCINT1),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}, {
|
||||
.start = IRQ_DM355_SDIOINT1,
|
||||
.start = DAVINCI_INTC_IRQ(IRQ_DM355_SDIOINT1),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
@@ -219,7 +219,8 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
|
||||
mmcsd1_resources[0].start = DM365_MMCSD1_BASE;
|
||||
mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
|
||||
SZ_4K - 1;
|
||||
mmcsd1_resources[2].start = IRQ_DM365_SDIOINT1;
|
||||
mmcsd1_resources[2].start = DAVINCI_INTC_IRQ(
|
||||
IRQ_DM365_SDIOINT1);
|
||||
davinci_mmcsd1_device.name = "da830-mmc";
|
||||
} else
|
||||
break;
|
||||
@@ -230,7 +231,8 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
|
||||
if (cpu_is_davinci_dm355()) {
|
||||
mmcsd0_resources[0].start = DM355_MMCSD0_BASE;
|
||||
mmcsd0_resources[0].end = DM355_MMCSD0_BASE + SZ_4K - 1;
|
||||
mmcsd0_resources[2].start = IRQ_DM355_SDIOINT0;
|
||||
mmcsd0_resources[2].start = DAVINCI_INTC_IRQ(
|
||||
IRQ_DM355_SDIOINT0);
|
||||
|
||||
/* expose all 6 MMC0 signals: CLK, CMD, DATA[0..3] */
|
||||
davinci_cfg_reg(DM355_MMCSD0);
|
||||
@@ -241,7 +243,8 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
|
||||
mmcsd0_resources[0].start = DM365_MMCSD0_BASE;
|
||||
mmcsd0_resources[0].end = DM365_MMCSD0_BASE +
|
||||
SZ_4K - 1;
|
||||
mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0;
|
||||
mmcsd0_resources[2].start = DAVINCI_INTC_IRQ(
|
||||
IRQ_DM365_SDIOINT0);
|
||||
davinci_mmcsd0_device.name = "da830-mmc";
|
||||
} else if (cpu_is_davinci_dm644x()) {
|
||||
/* REVISIT: should this be in board-init code? */
|
||||
@@ -313,13 +316,13 @@ int davinci_gpio_register(struct resource *res, int size, void *pdata)
|
||||
struct davinci_timer_instance davinci_timer_instance[2] = {
|
||||
{
|
||||
.base = DAVINCI_TIMER0_BASE,
|
||||
.bottom_irq = IRQ_TINT0_TINT12,
|
||||
.top_irq = IRQ_TINT0_TINT34,
|
||||
.bottom_irq = DAVINCI_INTC_IRQ(IRQ_TINT0_TINT12),
|
||||
.top_irq = DAVINCI_INTC_IRQ(IRQ_TINT0_TINT34),
|
||||
},
|
||||
{
|
||||
.base = DAVINCI_TIMER1_BASE,
|
||||
.bottom_irq = IRQ_TINT1_TINT12,
|
||||
.top_irq = IRQ_TINT1_TINT34,
|
||||
.bottom_irq = DAVINCI_INTC_IRQ(IRQ_TINT1_TINT12),
|
||||
.top_irq = DAVINCI_INTC_IRQ(IRQ_TINT1_TINT34),
|
||||
},
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user