diff options
-rw-r--r-- | arch/arm/common/vic.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index e4df17ca90c7..8f324b99416e 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -206,6 +206,7 @@ static void __init vic_register(void __iomem *base, unsigned int irq, | |||
206 | struct device_node *node) | 206 | struct device_node *node) |
207 | { | 207 | { |
208 | struct vic_device *v; | 208 | struct vic_device *v; |
209 | int i; | ||
209 | 210 | ||
210 | if (vic_id >= ARRAY_SIZE(vic_devices)) { | 211 | if (vic_id >= ARRAY_SIZE(vic_devices)) { |
211 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); | 212 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); |
@@ -220,6 +221,10 @@ static void __init vic_register(void __iomem *base, unsigned int irq, | |||
220 | vic_id++; | 221 | vic_id++; |
221 | v->domain = irq_domain_add_simple(node, fls(valid_sources), irq, | 222 | v->domain = irq_domain_add_simple(node, fls(valid_sources), irq, |
222 | &vic_irqdomain_ops, v); | 223 | &vic_irqdomain_ops, v); |
224 | /* create an IRQ mapping for each valid IRQ */ | ||
225 | for (i = 0; i < fls(valid_sources); i++) | ||
226 | if (valid_sources & (1 << i)) | ||
227 | irq_create_mapping(v->domain, i); | ||
223 | } | 228 | } |
224 | 229 | ||
225 | static void vic_ack_irq(struct irq_data *d) | 230 | static void vic_ack_irq(struct irq_data *d) |
@@ -416,9 +421,9 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent) | |||
416 | return -EIO; | 421 | return -EIO; |
417 | 422 | ||
418 | /* | 423 | /* |
419 | * Passing -1 as first IRQ makes the simple domain allocate descriptors | 424 | * Passing 0 as first IRQ makes the simple domain allocate descriptors |
420 | */ | 425 | */ |
421 | __vic_init(regs, -1, ~0, ~0, node); | 426 | __vic_init(regs, 0, ~0, ~0, node); |
422 | 427 | ||
423 | return 0; | 428 | return 0; |
424 | } | 429 | } |