mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
Revert "gpio/omap: don't create an IRQ mapping for every GPIO on DT"
This reverts commit 0e970cec05
.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
c119fee063
commit
253403b035
@ -1068,50 +1068,24 @@ static void omap_gpio_chip_init(struct gpio_bank *bank)
|
|||||||
|
|
||||||
gpiochip_add(&bank->chip);
|
gpiochip_add(&bank->chip);
|
||||||
|
|
||||||
/*
|
for (j = 0; j < bank->width; j++) {
|
||||||
* REVISIT these explicit calls to irq_create_mapping()
|
int irq = irq_create_mapping(bank->domain, j);
|
||||||
* to do the GPIO to IRQ domain mapping for each GPIO in
|
irq_set_lockdep_class(irq, &gpio_lock_class);
|
||||||
* the bank can be removed once all OMAP platforms have
|
irq_set_chip_data(irq, bank);
|
||||||
* been migrated to Device Tree boot only.
|
if (bank->is_mpuio) {
|
||||||
* Since in DT boot irq_create_mapping() is called from
|
omap_mpuio_alloc_gc(bank, irq, bank->width);
|
||||||
* irq_create_of_mapping() only for the GPIO lines that
|
} else {
|
||||||
* are used as interrupts.
|
irq_set_chip_and_handler(irq, &gpio_irq_chip,
|
||||||
*/
|
handle_simple_irq);
|
||||||
if (!bank->chip.of_node)
|
set_irq_flags(irq, IRQF_VALID);
|
||||||
for (j = 0; j < bank->width; j++)
|
}
|
||||||
irq_create_mapping(bank->domain, j);
|
}
|
||||||
irq_set_chained_handler(bank->irq, gpio_irq_handler);
|
irq_set_chained_handler(bank->irq, gpio_irq_handler);
|
||||||
irq_set_handler_data(bank->irq, bank);
|
irq_set_handler_data(bank->irq, bank);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id omap_gpio_match[];
|
static const struct of_device_id omap_gpio_match[];
|
||||||
|
|
||||||
static int omap_gpio_irq_map(struct irq_domain *d, unsigned int virq,
|
|
||||||
irq_hw_number_t hwirq)
|
|
||||||
{
|
|
||||||
struct gpio_bank *bank = d->host_data;
|
|
||||||
|
|
||||||
if (!bank)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
irq_set_lockdep_class(virq, &gpio_lock_class);
|
|
||||||
irq_set_chip_data(virq, bank);
|
|
||||||
if (bank->is_mpuio) {
|
|
||||||
omap_mpuio_alloc_gc(bank, virq, bank->width);
|
|
||||||
} else {
|
|
||||||
irq_set_chip_and_handler(virq, &gpio_irq_chip,
|
|
||||||
handle_simple_irq);
|
|
||||||
set_irq_flags(virq, IRQF_VALID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct irq_domain_ops omap_gpio_irq_ops = {
|
|
||||||
.xlate = irq_domain_xlate_onetwocell,
|
|
||||||
.map = omap_gpio_irq_map,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int omap_gpio_probe(struct platform_device *pdev)
|
static int omap_gpio_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
@ -1177,10 +1151,10 @@ static int omap_gpio_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bank->domain = irq_domain_add_legacy(node, bank->width, irq_base,
|
bank->domain = irq_domain_add_legacy(node, bank->width, irq_base,
|
||||||
0, &omap_gpio_irq_ops, bank);
|
0, &irq_domain_simple_ops, NULL);
|
||||||
#else
|
#else
|
||||||
bank->domain = irq_domain_add_linear(node, bank->width,
|
bank->domain = irq_domain_add_linear(node, bank->width,
|
||||||
&omap_gpio_irq_ops, bank);
|
&irq_domain_simple_ops, NULL);
|
||||||
#endif
|
#endif
|
||||||
if (!bank->domain) {
|
if (!bank->domain) {
|
||||||
dev_err(dev, "Couldn't register an IRQ domain\n");
|
dev_err(dev, "Couldn't register an IRQ domain\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user