remoteproc: add IPA notification to q6v5 driver
authorAlex Elder <elder@linaro.org>
Fri, 6 Mar 2020 04:28:15 +0000 (22:28 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Mar 2020 05:07:09 +0000 (22:07 -0700)
commitd7f5f3c89c1a2344e88842ba0de327cc0098583e
tree252ea77fe2aaf862b2b103972a8ab4ddecb32d7c
parente2f5cb7280f81aa1f3e4d38f51f89995ac14e502
remoteproc: add IPA notification to q6v5 driver

Set up a subdev in the q6v5 modem remoteproc driver that generates
event notifications for the IPA driver to use for initialization and
recovery following a modem shutdown or crash.

A pair of new functions provides a way for the IPA driver to register
and deregister a notification callback function that will be called
whenever modem events (about to boot, running, about to shut down,
etc.) occur.  A void pointer value (provided by the IPA driver at
registration time) and an event type are supplied to the callback
function.

One event, MODEM_REMOVING, is signaled whenever the q6v5 driver is
about to remove the notification subdevice.  It requires the IPA
driver de-register its callback.

This sub-device is only used by the modem subsystem (MSS) driver,
so the code that adds the new subdev and allows registration and
deregistration of the notifier is found in "qcom_q6v6_mss.c".

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/remoteproc/Kconfig
drivers/remoteproc/Makefile
drivers/remoteproc/qcom_q6v5_ipa_notify.c [new file with mode: 0644]
drivers/remoteproc/qcom_q6v5_mss.c
include/linux/remoteproc/qcom_q6v5_ipa_notify.h [new file with mode: 0644]