]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: davinci: use chained_irq_enter/chained_irq_exit API
authorGrygorii Strashko <grygorii.strashko@ti.com>
Tue, 26 Nov 2013 19:40:09 +0000 (21:40 +0200)
committerSekhar Nori <nsekhar@ti.com>
Wed, 25 Dec 2013 18:32:11 +0000 (00:02 +0530)
commita20cb9d97a55c2cfaaf4ebeca11d5c5b9a8b8aaf
tree777d7403c8ca1589790c85ff716848ff10404c91
parentafc745a6d3822c579d8e4de20b330ea98e872abc
gpio: davinci: use chained_irq_enter/chained_irq_exit API

It's unsafe to call IRQ chip callbacks (.irq_mask/irq_unmask/irq_ack)
from chained IRQ handler directly. Because, Davinci GPIO block is used
by different SoCs, which, in turn, have different Main IRQ controllers
(Davinci - aintc, cp-intc; Keystone - arm-gic) which may introduce
diffrent set of IRQ chip callbacks. As result, call of
gpio_irq_handler() on Keysone will simply cause crash the system,
because ARM-GIC implements .irq_eoi() instead of .irq_ack().

Hence, fix it by using Kernel chained_irq_enter/chained_irq_exit APIs as
they are intended to handle exact such cases.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers/gpio/gpio-davinci.c