Lines Matching refs:t7xx_dev

64 static unsigned int t7xx_get_interrupt_status(struct t7xx_pci_dev *t7xx_dev)  in t7xx_get_interrupt_status()  argument
66 return t7xx_mhccif_read_sw_int_sts(t7xx_dev) & D2H_SW_INT_MASK; in t7xx_get_interrupt_status()
79 int t7xx_pci_mhccif_isr(struct t7xx_pci_dev *t7xx_dev) in t7xx_pci_mhccif_isr() argument
81 struct t7xx_modem *md = t7xx_dev->md; in t7xx_pci_mhccif_isr()
89 dev_err_ratelimited(&t7xx_dev->pdev->dev, in t7xx_pci_mhccif_isr()
95 int_sta = t7xx_get_interrupt_status(t7xx_dev); in t7xx_pci_mhccif_isr()
112 mask = t7xx_mhccif_mask_get(t7xx_dev); in t7xx_pci_mhccif_isr()
123 static void t7xx_clr_device_irq_via_pcie(struct t7xx_pci_dev *t7xx_dev) in t7xx_clr_device_irq_via_pcie() argument
125 struct t7xx_addr_base *pbase_addr = &t7xx_dev->base_addr; in t7xx_clr_device_irq_via_pcie()
135 void t7xx_clear_rgu_irq(struct t7xx_pci_dev *t7xx_dev) in t7xx_clear_rgu_irq() argument
138 t7xx_clr_device_irq_via_pcie(t7xx_dev); in t7xx_clear_rgu_irq()
140 t7xx_pcie_mac_clear_int_status(t7xx_dev, SAP_RGU_INT); in t7xx_clear_rgu_irq()
143 static int t7xx_acpi_reset(struct t7xx_pci_dev *t7xx_dev, char *fn_name) in t7xx_acpi_reset() argument
147 struct device *dev = &t7xx_dev->pdev->dev; in t7xx_acpi_reset()
174 int t7xx_acpi_fldr_func(struct t7xx_pci_dev *t7xx_dev) in t7xx_acpi_fldr_func() argument
176 return t7xx_acpi_reset(t7xx_dev, "_RST"); in t7xx_acpi_fldr_func()
179 static void t7xx_reset_device_via_pmic(struct t7xx_pci_dev *t7xx_dev) in t7xx_reset_device_via_pmic() argument
183 val = ioread32(IREG_BASE(t7xx_dev) + T7XX_PCIE_MISC_DEV_STATUS); in t7xx_reset_device_via_pmic()
185 t7xx_acpi_reset(t7xx_dev, "MRST._RST"); in t7xx_reset_device_via_pmic()
187 t7xx_acpi_fldr_func(t7xx_dev); in t7xx_reset_device_via_pmic()
192 struct t7xx_pci_dev *t7xx_dev = data; in t7xx_rgu_isr_thread() local
195 t7xx_reset_device_via_pmic(t7xx_dev); in t7xx_rgu_isr_thread()
201 struct t7xx_pci_dev *t7xx_dev = data; in t7xx_rgu_isr_handler() local
204 t7xx_clear_rgu_irq(t7xx_dev); in t7xx_rgu_isr_handler()
205 if (!t7xx_dev->rgu_pci_irq_en) in t7xx_rgu_isr_handler()
208 modem = t7xx_dev->md; in t7xx_rgu_isr_handler()
210 t7xx_pcie_mac_clear_int(t7xx_dev, SAP_RGU_INT); in t7xx_rgu_isr_handler()
214 static void t7xx_pcie_register_rgu_isr(struct t7xx_pci_dev *t7xx_dev) in t7xx_pcie_register_rgu_isr() argument
217 t7xx_pcie_mac_clear_int(t7xx_dev, SAP_RGU_INT); in t7xx_pcie_register_rgu_isr()
218 t7xx_pcie_mac_clear_int_status(t7xx_dev, SAP_RGU_INT); in t7xx_pcie_register_rgu_isr()
220 t7xx_dev->intr_handler[SAP_RGU_INT] = t7xx_rgu_isr_handler; in t7xx_pcie_register_rgu_isr()
221 t7xx_dev->intr_thread[SAP_RGU_INT] = t7xx_rgu_isr_thread; in t7xx_pcie_register_rgu_isr()
222 t7xx_dev->callback_param[SAP_RGU_INT] = t7xx_dev; in t7xx_pcie_register_rgu_isr()
223 t7xx_pcie_mac_set_int(t7xx_dev, SAP_RGU_INT); in t7xx_pcie_register_rgu_isr()
275 t7xx_cldma_hw_reset(md_ctrl->t7xx_dev->base_addr.infracfg_ao_base); in t7xx_cldma_exception()
292 struct t7xx_pci_dev *t7xx_dev = md->t7xx_dev; in t7xx_md_exception() local
303 t7xx_mhccif_h2d_swint_trigger(t7xx_dev, H2D_CH_EXCEPTION_ACK); in t7xx_md_exception()
305 t7xx_mhccif_h2d_swint_trigger(t7xx_dev, H2D_CH_EXCEPTION_CLEARQ_ACK); in t7xx_md_exception()
323 static void t7xx_md_sys_sw_init(struct t7xx_pci_dev *t7xx_dev) in t7xx_md_sys_sw_init() argument
328 t7xx_mhccif_mask_set(t7xx_dev, D2H_SW_INT_MASK); in t7xx_md_sys_sw_init()
329 t7xx_mhccif_mask_clr(t7xx_dev, D2H_INT_PORT_ENUM); in t7xx_md_sys_sw_init()
332 t7xx_dev->rgu_pci_irq_en = true; in t7xx_md_sys_sw_init()
333 t7xx_pcie_register_rgu_isr(t7xx_dev); in t7xx_md_sys_sw_init()
438 struct device *dev = &md->t7xx_dev->pdev->dev; in t7xx_core_reset()
465 struct device *dev = &md->t7xx_dev->pdev->dev; in t7xx_core_hk_handler()
546 t7xx_mhccif_mask_clr(md->t7xx_dev, D2H_INT_PORT_ENUM); in t7xx_md_event_notify()
550 t7xx_mhccif_mask_set(md->t7xx_dev, D2H_INT_PORT_ENUM); in t7xx_md_event_notify()
553 int_sta = t7xx_get_interrupt_status(md->t7xx_dev); in t7xx_md_event_notify()
564 mhccif_base = md->t7xx_dev->base_addr.mhccif_rc_base; in t7xx_md_event_notify()
566 t7xx_mhccif_mask_set(md->t7xx_dev, D2H_INT_ASYNC_MD_HK); in t7xx_md_event_notify()
568 t7xx_mhccif_mask_clr(md->t7xx_dev, D2H_INT_ASYNC_MD_HK); in t7xx_md_event_notify()
572 t7xx_mhccif_mask_clr(md->t7xx_dev, in t7xx_md_event_notify()
580 t7xx_mhccif_mask_set(md->t7xx_dev, D2H_INT_ASYNC_MD_HK); in t7xx_md_event_notify()
590 struct device *dev = &md->t7xx_dev->pdev->dev; in t7xx_md_exception_handshake()
611 static struct t7xx_modem *t7xx_md_alloc(struct t7xx_pci_dev *t7xx_dev) in t7xx_md_alloc() argument
613 struct device *dev = &t7xx_dev->pdev->dev; in t7xx_md_alloc()
620 md->t7xx_dev = t7xx_dev; in t7xx_md_alloc()
621 t7xx_dev->md = md; in t7xx_md_alloc()
635 int t7xx_md_reset(struct t7xx_pci_dev *t7xx_dev) in t7xx_md_reset() argument
637 struct t7xx_modem *md = t7xx_dev->md; in t7xx_md_reset()
659 int t7xx_md_init(struct t7xx_pci_dev *t7xx_dev) in t7xx_md_init() argument
664 md = t7xx_md_alloc(t7xx_dev); in t7xx_md_init()
668 ret = t7xx_cldma_alloc(CLDMA_ID_MD, t7xx_dev); in t7xx_md_init()
676 ret = t7xx_ccmni_init(t7xx_dev); in t7xx_md_init()
692 t7xx_md_sys_sw_init(t7xx_dev); in t7xx_md_init()
703 t7xx_ccmni_exit(t7xx_dev); in t7xx_md_init()
710 dev_err(&t7xx_dev->pdev->dev, "Modem init failed\n"); in t7xx_md_init()
714 void t7xx_md_exit(struct t7xx_pci_dev *t7xx_dev) in t7xx_md_exit() argument
716 struct t7xx_modem *md = t7xx_dev->md; in t7xx_md_exit()
718 t7xx_pcie_mac_clear_int(t7xx_dev, SAP_RGU_INT); in t7xx_md_exit()
726 t7xx_ccmni_exit(t7xx_dev); in t7xx_md_exit()