OSDN Git Service

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)
commitb176f95b5728e355ea6b61725cf240a575621e51
treee1d6299ab93015c5bcc14a768ed51358a7835add
parent1657d8a45823429aabee0a3282b2d249abbd3831
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