Loading dp/wifi3.0/dp_main.c +33 −23 Original line number Diff line number Diff line Loading @@ -2352,6 +2352,7 @@ static void dp_soc_interrupt_detach(struct cdp_soc_t *txrx_soc) if (soc->intr_mode == DP_INTR_POLL) { qdf_timer_free(&soc->int_timer); } else { hif_deconfigure_ext_group_interrupts(soc->hif_handle); hif_deregister_exec_group(soc->hif_handle, "dp_intr"); } Loading Loading @@ -10520,6 +10521,29 @@ static struct cdp_cfr_ops dp_ops_cfr = { #endif #ifdef FEATURE_RUNTIME_PM /** * dp_flush_ring_hptp() - Update ring shadow * register HP/TP address when runtime * resume * @opaque_soc: DP soc context * * Return: None */ static void dp_flush_ring_hptp(struct dp_soc *soc, hal_ring_handle_t hal_srng) { if (hal_srng && hal_srng_get_clear_event(hal_srng, HAL_SRNG_FLUSH_EVENT)) { /* Acquire the lock */ hal_srng_access_start(soc->hal_soc, hal_srng); hal_srng_access_end(soc->hal_soc, hal_srng); hal_srng_set_flush_last_ts(hal_srng); dp_debug("flushed"); } } /** * dp_runtime_suspend() - ensure DP is ready to runtime suspend * @soc_hdl: Datapath soc handle Loading @@ -10533,6 +10557,7 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) { struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl); struct dp_pdev *pdev; uint8_t i; pdev = dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id); if (!pdev) { Loading @@ -10544,6 +10569,14 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) if (dp_get_tx_pending(dp_pdev_to_cdp_pdev(pdev)) > 0) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO, FL("Abort suspend due to pending TX packets")); /* perform a force flush if tx is pending */ for (i = 0; i < soc->num_tcl_data_rings; i++) { hal_srng_set_event(soc->tcl_data_ring[i].hal_srng, HAL_SRNG_FLUSH_EVENT); dp_flush_ring_hptp(soc, soc->tcl_data_ring[i].hal_srng); } return QDF_STATUS_E_AGAIN; } Loading @@ -10559,29 +10592,6 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) return QDF_STATUS_SUCCESS; } /** * dp_flush_ring_hptp() - Update ring shadow * register HP/TP address when runtime * resume * @opaque_soc: DP soc context * * Return: None */ static void dp_flush_ring_hptp(struct dp_soc *soc, hal_ring_handle_t hal_srng) { if (hal_srng && hal_srng_get_clear_event(hal_srng, HAL_SRNG_FLUSH_EVENT)) { /* Acquire the lock */ hal_srng_access_start(soc->hal_soc, hal_srng); hal_srng_access_end(soc->hal_soc, hal_srng); hal_srng_set_flush_last_ts(hal_srng); dp_debug("flushed"); } } #define DP_FLUSH_WAIT_CNT 10 #define DP_RUNTIME_SUSPEND_WAIT_MS 10 /** Loading hif/inc/hif.h +1 −0 Original line number Diff line number Diff line Loading @@ -1238,6 +1238,7 @@ int32_t hif_get_int_ctx_irq_num(struct hif_opaque_softc *softc, uint8_t id); uint32_t hif_configure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx); void hif_deconfigure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx); uint32_t hif_register_ext_group(struct hif_opaque_softc *hif_ctx, uint32_t numirq, uint32_t irq[], ext_intr_handler handler, void *cb_ctx, const char *context_name, Loading hif/src/dispatcher/ahb_api.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2013-2018,2020 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2018,2020-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -49,6 +49,7 @@ int hif_ahb_enable_radio(struct hif_pci_softc *sc, int hif_ahb_configure_irq(struct hif_pci_softc *sc); int hif_ahb_configure_grp_irq(struct hif_softc *scn, struct hif_exec_context *hif_ext_grp); void hif_ahb_deconfigure_grp_irq(struct hif_softc *scn); bool hif_ahb_needs_bmi(struct hif_softc *scn); void hif_ahb_display_stats(struct hif_softc *scn); void hif_ahb_clear_stats(struct hif_softc *scn); Loading hif/src/dispatcher/dummy.c +10 −0 Original line number Diff line number Diff line Loading @@ -262,6 +262,16 @@ int hif_dummy_grp_irq_configure(struct hif_softc *hif_sc, return 0; } /** * hif_dummy_grp_irq_deconfigure - dummy call * hif_sc: hif context * * Return: none */ void hif_dummy_grp_irq_deconfigure(struct hif_softc *hif_sc) { } /** * hif_dummy_dump_registers - dummy call * hif_sc: hif context Loading hif/src/dispatcher/dummy.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ void hif_dummy_grp_irq_enable(struct hif_softc *hif_sc, uint32_t grp_id); void hif_dummy_grp_irq_disable(struct hif_softc *hif_sc, uint32_t grp_id); int hif_dummy_grp_irq_configure(struct hif_softc *hif_sc, struct hif_exec_context *exec); void hif_dummy_grp_irq_deconfigure(struct hif_softc *hif_sc); int hif_dummy_dump_registers(struct hif_softc *hif_sc); void hif_dummy_dump_target_memory(struct hif_softc *hif_sc, void *ramdump_base, uint32_t address, uint32_t size); Loading Loading
dp/wifi3.0/dp_main.c +33 −23 Original line number Diff line number Diff line Loading @@ -2352,6 +2352,7 @@ static void dp_soc_interrupt_detach(struct cdp_soc_t *txrx_soc) if (soc->intr_mode == DP_INTR_POLL) { qdf_timer_free(&soc->int_timer); } else { hif_deconfigure_ext_group_interrupts(soc->hif_handle); hif_deregister_exec_group(soc->hif_handle, "dp_intr"); } Loading Loading @@ -10520,6 +10521,29 @@ static struct cdp_cfr_ops dp_ops_cfr = { #endif #ifdef FEATURE_RUNTIME_PM /** * dp_flush_ring_hptp() - Update ring shadow * register HP/TP address when runtime * resume * @opaque_soc: DP soc context * * Return: None */ static void dp_flush_ring_hptp(struct dp_soc *soc, hal_ring_handle_t hal_srng) { if (hal_srng && hal_srng_get_clear_event(hal_srng, HAL_SRNG_FLUSH_EVENT)) { /* Acquire the lock */ hal_srng_access_start(soc->hal_soc, hal_srng); hal_srng_access_end(soc->hal_soc, hal_srng); hal_srng_set_flush_last_ts(hal_srng); dp_debug("flushed"); } } /** * dp_runtime_suspend() - ensure DP is ready to runtime suspend * @soc_hdl: Datapath soc handle Loading @@ -10533,6 +10557,7 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) { struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl); struct dp_pdev *pdev; uint8_t i; pdev = dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id); if (!pdev) { Loading @@ -10544,6 +10569,14 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) if (dp_get_tx_pending(dp_pdev_to_cdp_pdev(pdev)) > 0) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO, FL("Abort suspend due to pending TX packets")); /* perform a force flush if tx is pending */ for (i = 0; i < soc->num_tcl_data_rings; i++) { hal_srng_set_event(soc->tcl_data_ring[i].hal_srng, HAL_SRNG_FLUSH_EVENT); dp_flush_ring_hptp(soc, soc->tcl_data_ring[i].hal_srng); } return QDF_STATUS_E_AGAIN; } Loading @@ -10559,29 +10592,6 @@ static QDF_STATUS dp_runtime_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id) return QDF_STATUS_SUCCESS; } /** * dp_flush_ring_hptp() - Update ring shadow * register HP/TP address when runtime * resume * @opaque_soc: DP soc context * * Return: None */ static void dp_flush_ring_hptp(struct dp_soc *soc, hal_ring_handle_t hal_srng) { if (hal_srng && hal_srng_get_clear_event(hal_srng, HAL_SRNG_FLUSH_EVENT)) { /* Acquire the lock */ hal_srng_access_start(soc->hal_soc, hal_srng); hal_srng_access_end(soc->hal_soc, hal_srng); hal_srng_set_flush_last_ts(hal_srng); dp_debug("flushed"); } } #define DP_FLUSH_WAIT_CNT 10 #define DP_RUNTIME_SUSPEND_WAIT_MS 10 /** Loading
hif/inc/hif.h +1 −0 Original line number Diff line number Diff line Loading @@ -1238,6 +1238,7 @@ int32_t hif_get_int_ctx_irq_num(struct hif_opaque_softc *softc, uint8_t id); uint32_t hif_configure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx); void hif_deconfigure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx); uint32_t hif_register_ext_group(struct hif_opaque_softc *hif_ctx, uint32_t numirq, uint32_t irq[], ext_intr_handler handler, void *cb_ctx, const char *context_name, Loading
hif/src/dispatcher/ahb_api.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2013-2018,2020 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2018,2020-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -49,6 +49,7 @@ int hif_ahb_enable_radio(struct hif_pci_softc *sc, int hif_ahb_configure_irq(struct hif_pci_softc *sc); int hif_ahb_configure_grp_irq(struct hif_softc *scn, struct hif_exec_context *hif_ext_grp); void hif_ahb_deconfigure_grp_irq(struct hif_softc *scn); bool hif_ahb_needs_bmi(struct hif_softc *scn); void hif_ahb_display_stats(struct hif_softc *scn); void hif_ahb_clear_stats(struct hif_softc *scn); Loading
hif/src/dispatcher/dummy.c +10 −0 Original line number Diff line number Diff line Loading @@ -262,6 +262,16 @@ int hif_dummy_grp_irq_configure(struct hif_softc *hif_sc, return 0; } /** * hif_dummy_grp_irq_deconfigure - dummy call * hif_sc: hif context * * Return: none */ void hif_dummy_grp_irq_deconfigure(struct hif_softc *hif_sc) { } /** * hif_dummy_dump_registers - dummy call * hif_sc: hif context Loading
hif/src/dispatcher/dummy.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ void hif_dummy_grp_irq_enable(struct hif_softc *hif_sc, uint32_t grp_id); void hif_dummy_grp_irq_disable(struct hif_softc *hif_sc, uint32_t grp_id); int hif_dummy_grp_irq_configure(struct hif_softc *hif_sc, struct hif_exec_context *exec); void hif_dummy_grp_irq_deconfigure(struct hif_softc *hif_sc); int hif_dummy_dump_registers(struct hif_softc *hif_sc); void hif_dummy_dump_target_memory(struct hif_softc *hif_sc, void *ramdump_base, uint32_t address, uint32_t size); Loading