Lines Matching full:ipa

15 #include "ipa.h"
20 * DOC: IPA SMP2P communication with the modem
23 * the modem. The IPA driver uses this for two purposes: to enable the modem
25 * state of the IPA clock in the event of a crash.
29 * latter case, the modem uses an SMP2P interrupt to tell the AP IPA driver
32 * The modem is also able to inquire about the current state of the IPA
37 * is set, and at that time records whether the AP has the IPA clock enabled.
44 * struct ipa_smp2p - IPA SMP2P information
45 * @ipa: IPA pointer
51 * @clock_query_irq: IPA interrupt triggered by modem for clock query
52 * @setup_ready_irq: IPA interrupt triggered by modem to signal GSI ready
53 * @clock_on: Whether IPA clock is on
60 struct ipa *ipa; member
75 * ipa_smp2p_notify() - use SMP2P to tell modem about IPA clock state
79 * the modem clock query IPA interrupt) or whenever the AP is shutting down
81 * whether the IPA clock is running, and the other indicating the first bit
92 smp2p->clock_on = ipa_clock_get_additional(smp2p->ipa); in ipa_smp2p_notify()
107 /* Threaded IRQ handler for modem "ipa-clock-query" SMP2P interrupt */
127 ipa_uc_panic_notifier(smp2p->ipa); in ipa_smp2p_panic_notifier()
134 /* IPA panic handler needs to run before modem shuts down */ in ipa_smp2p_panic_notifier_register()
148 /* Threaded IRQ handler for modem "ipa-setup-ready" SMP2P interrupt */
158 ret = ipa_setup(smp2p->ipa); in ipa_smp2p_modem_setup_ready_isr()
160 dev_err(&smp2p->ipa->pdev->dev, in ipa_smp2p_modem_setup_ready_isr()
174 struct device *dev = &smp2p->ipa->pdev->dev; in ipa_smp2p_irq_init()
178 ret = platform_get_irq_byname(smp2p->ipa->pdev, name); in ipa_smp2p_irq_init()
201 static void ipa_smp2p_clock_release(struct ipa *ipa) in ipa_smp2p_clock_release() argument
203 if (!ipa->smp2p->clock_on) in ipa_smp2p_clock_release()
206 ipa_clock_put(ipa); in ipa_smp2p_clock_release()
207 ipa->smp2p->clock_on = false; in ipa_smp2p_clock_release()
210 /* Initialize the IPA SMP2P subsystem */
211 int ipa_smp2p_init(struct ipa *ipa, bool modem_init) in ipa_smp2p_init() argument
214 struct device *dev = &ipa->pdev->dev; in ipa_smp2p_init()
221 valid_state = qcom_smem_state_get(dev, "ipa-clock-enabled-valid", in ipa_smp2p_init()
228 enabled_state = qcom_smem_state_get(dev, "ipa-clock-enabled", in ipa_smp2p_init()
239 smp2p->ipa = ipa; in ipa_smp2p_init()
251 ipa->smp2p = smp2p; in ipa_smp2p_init()
253 ret = ipa_smp2p_irq_init(smp2p, "ipa-clock-query", in ipa_smp2p_init()
265 ret = ipa_smp2p_irq_init(smp2p, "ipa-setup-ready", in ipa_smp2p_init()
279 ipa->smp2p = NULL; in ipa_smp2p_init()
286 void ipa_smp2p_exit(struct ipa *ipa) in ipa_smp2p_exit() argument
288 struct ipa_smp2p *smp2p = ipa->smp2p; in ipa_smp2p_exit()
295 ipa_smp2p_clock_release(ipa); in ipa_smp2p_exit()
296 ipa->smp2p = NULL; in ipa_smp2p_exit()
301 void ipa_smp2p_disable(struct ipa *ipa) in ipa_smp2p_disable() argument
303 struct ipa_smp2p *smp2p = ipa->smp2p; in ipa_smp2p_disable()
316 void ipa_smp2p_notify_reset(struct ipa *ipa) in ipa_smp2p_notify_reset() argument
318 struct ipa_smp2p *smp2p = ipa->smp2p; in ipa_smp2p_notify_reset()
324 ipa_smp2p_clock_release(ipa); in ipa_smp2p_notify_reset()