Lines Matching full:ipa
17 #include "ipa.h"
21 * DOC: IPA SMP2P communication with the modem
24 * the modem. The IPA driver uses this for two purposes: to enable the modem
26 * state of IPA power in the event of a crash.
30 * latter case, the modem uses an SMP2P interrupt to tell the AP IPA driver
33 * The modem is also able to inquire about the current state of IPA
38 * at that time records whether the AP has IPA power enabled.
45 * struct ipa_smp2p - IPA SMP2P information
46 * @ipa: IPA pointer
52 * @clock_query_irq: IPA interrupt triggered by modem for power query
53 * @setup_ready_irq: IPA interrupt triggered by modem to signal GSI ready
54 * @power_on: Whether IPA power is on
61 struct ipa *ipa; member
76 * ipa_smp2p_notify() - use SMP2P to tell modem about IPA power state
80 * the modem power query IPA interrupt) or whenever the AP is shutting down
82 * whether the IPA power is on, and the other indicating the first bit
94 dev = &smp2p->ipa->pdev->dev; in ipa_smp2p_notify()
97 /* Signal whether the IPA power is enabled */ in ipa_smp2p_notify()
110 /* Threaded IRQ handler for modem "ipa-clock-query" SMP2P interrupt */
130 ipa_uc_panic_notifier(smp2p->ipa); in ipa_smp2p_panic_notifier()
137 /* IPA panic handler needs to run before modem shuts down */ in ipa_smp2p_panic_notifier_register()
151 /* Threaded IRQ handler for modem "ipa-setup-ready" SMP2P interrupt */
165 dev = &smp2p->ipa->pdev->dev; in ipa_smp2p_modem_setup_ready_isr()
173 ret = ipa_setup(smp2p->ipa); in ipa_smp2p_modem_setup_ready_isr()
189 struct device *dev = &smp2p->ipa->pdev->dev; in ipa_smp2p_irq_init()
193 ret = platform_get_irq_byname(smp2p->ipa->pdev, name); in ipa_smp2p_irq_init()
213 static void ipa_smp2p_power_release(struct ipa *ipa) in ipa_smp2p_power_release() argument
215 struct device *dev = &ipa->pdev->dev; in ipa_smp2p_power_release()
217 if (!ipa->smp2p->power_on) in ipa_smp2p_power_release()
222 ipa->smp2p->power_on = false; in ipa_smp2p_power_release()
225 /* Initialize the IPA SMP2P subsystem */
226 int ipa_smp2p_init(struct ipa *ipa, bool modem_init) in ipa_smp2p_init() argument
229 struct device *dev = &ipa->pdev->dev; in ipa_smp2p_init()
236 valid_state = qcom_smem_state_get(dev, "ipa-clock-enabled-valid", in ipa_smp2p_init()
243 enabled_state = qcom_smem_state_get(dev, "ipa-clock-enabled", in ipa_smp2p_init()
254 smp2p->ipa = ipa; in ipa_smp2p_init()
266 ipa->smp2p = smp2p; in ipa_smp2p_init()
268 ret = ipa_smp2p_irq_init(smp2p, "ipa-clock-query", in ipa_smp2p_init()
280 ret = ipa_smp2p_irq_init(smp2p, "ipa-setup-ready", in ipa_smp2p_init()
294 ipa->smp2p = NULL; in ipa_smp2p_init()
301 void ipa_smp2p_exit(struct ipa *ipa) in ipa_smp2p_exit() argument
303 struct ipa_smp2p *smp2p = ipa->smp2p; in ipa_smp2p_exit()
310 ipa_smp2p_power_release(ipa); in ipa_smp2p_exit()
311 ipa->smp2p = NULL; in ipa_smp2p_exit()
316 void ipa_smp2p_disable(struct ipa *ipa) in ipa_smp2p_disable() argument
318 struct ipa_smp2p *smp2p = ipa->smp2p; in ipa_smp2p_disable()
331 void ipa_smp2p_notify_reset(struct ipa *ipa) in ipa_smp2p_notify_reset() argument
333 struct ipa_smp2p *smp2p = ipa->smp2p; in ipa_smp2p_notify_reset()
339 ipa_smp2p_power_release(ipa); in ipa_smp2p_notify_reset()