]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: move gsi_irq_init() code into setup
authorAlex Elder <elder@linaro.org>
Tue, 3 Aug 2021 14:01:02 +0000 (09:01 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Aug 2021 09:12:05 +0000 (10:12 +0100)
commit2c7b48c54d79590ece76009bdc846b3869547a37
treee1d6299ab93015c5bcc14a768ed51358a7835add
parentae87463d0d489a41b24ba20b65a3a8fae992f167
net: ipa: move gsi_irq_init() code into setup

The GSI IRQ handler could be triggered as soon as it is registered
with request_irq().  The handler function, gsi_isr(), touches
hardware, meaning the IPA clock must be operational.  The IPA clock
is not operating when the handler is registered (in gsi_irq_init()),
so this is a problem.

Move the call to request_irq() for the GSI interrupt handler into
gsi_irq_setup(), which is called when the IPA clock is known to be
operational (and furthermore, the GSI firmware will have been
loaded).  Request the IRQ at the end of that function, after all
interrupt types have been disabled and masked.

Move the matching free_irq() call into gsi_irq_teardown(), and get
rid of the now empty gsi_irq_exit(),

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/gsi.c