Loading drivers/platform/msm/gsi/gsi.c +11 −0 Original line number Diff line number Diff line Loading @@ -755,6 +755,8 @@ static void gsi_handle_irq(void) unsigned long cnt = 0; while (1) { if (!gsi_ctx->per.clk_status_cb()) break; type = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_TYPE_IRQ_OFFS(ee)); Loading Loading @@ -2782,6 +2784,15 @@ int gsi_query_channel_db_addr(unsigned long chan_hdl, } EXPORT_SYMBOL(gsi_query_channel_db_addr); int gsi_pending_irq_type(void) { int ee = gsi_ctx->per.ee; return gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_TYPE_IRQ_OFFS(ee)); } EXPORT_SYMBOL(gsi_pending_irq_type); int gsi_start_channel(unsigned long chan_hdl) { enum gsi_ch_cmd_opcode op = GSI_CH_START; Loading drivers/platform/msm/ipa/ipa_v3/ipa.c +13 −0 Original line number Diff line number Diff line Loading @@ -4831,6 +4831,8 @@ void _ipa_disable_clks_v3_0(void) */ void ipa3_disable_clks(void) { int type; if (ipa3_ctx->ipa3_hw_mode != IPA_HW_MODE_NORMAL) { IPAERR("not supported in this mode\n"); return; Loading @@ -4844,6 +4846,17 @@ void ipa3_disable_clks(void) */ atomic_set(&ipa3_ctx->ipa_clk_vote, 0); /* * If there is still pending gsi irq, this indicate * issue on GSI FW side. We need to capture before * turn off the ipa clock. */ type = gsi_pending_irq_type(); if (type) { IPAERR("unexpected gsi irq type: %d\n", type); ipa_assert(); } ipa3_ctx->ctrl->ipa3_disable_clks(); ipa_pm_set_clock_index(0); Loading include/linux/msm_gsi.h +14 −0 Original line number Diff line number Diff line Loading @@ -1316,6 +1316,16 @@ int gsi_write_channel_scratch2_reg(unsigned long chan_hdl, int gsi_read_channel_scratch(unsigned long chan_hdl, union __packed gsi_channel_scratch *val); /** * gsi_pending_irq_type - Peripheral should call this function to * check if there is any pending irq * * This function can sleep * * @Return gsi_irq_type */ int gsi_pending_irq_type(void); /** * gsi_update_mhi_channel_scratch - MHI Peripheral should call this * function to update the scratch area of the channel context. Updating Loading Loading @@ -1790,6 +1800,10 @@ static inline int gsi_read_channel_scratch(unsigned long chan_hdl, return -GSI_STATUS_UNSUPPORTED_OP; } static inline int gsi_pending_irq_type(void) { } static inline int gsi_update_mhi_channel_scratch(unsigned long chan_hdl, struct __packed gsi_mhi_channel_scratch mscr) { Loading Loading
drivers/platform/msm/gsi/gsi.c +11 −0 Original line number Diff line number Diff line Loading @@ -755,6 +755,8 @@ static void gsi_handle_irq(void) unsigned long cnt = 0; while (1) { if (!gsi_ctx->per.clk_status_cb()) break; type = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_TYPE_IRQ_OFFS(ee)); Loading Loading @@ -2782,6 +2784,15 @@ int gsi_query_channel_db_addr(unsigned long chan_hdl, } EXPORT_SYMBOL(gsi_query_channel_db_addr); int gsi_pending_irq_type(void) { int ee = gsi_ctx->per.ee; return gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_TYPE_IRQ_OFFS(ee)); } EXPORT_SYMBOL(gsi_pending_irq_type); int gsi_start_channel(unsigned long chan_hdl) { enum gsi_ch_cmd_opcode op = GSI_CH_START; Loading
drivers/platform/msm/ipa/ipa_v3/ipa.c +13 −0 Original line number Diff line number Diff line Loading @@ -4831,6 +4831,8 @@ void _ipa_disable_clks_v3_0(void) */ void ipa3_disable_clks(void) { int type; if (ipa3_ctx->ipa3_hw_mode != IPA_HW_MODE_NORMAL) { IPAERR("not supported in this mode\n"); return; Loading @@ -4844,6 +4846,17 @@ void ipa3_disable_clks(void) */ atomic_set(&ipa3_ctx->ipa_clk_vote, 0); /* * If there is still pending gsi irq, this indicate * issue on GSI FW side. We need to capture before * turn off the ipa clock. */ type = gsi_pending_irq_type(); if (type) { IPAERR("unexpected gsi irq type: %d\n", type); ipa_assert(); } ipa3_ctx->ctrl->ipa3_disable_clks(); ipa_pm_set_clock_index(0); Loading
include/linux/msm_gsi.h +14 −0 Original line number Diff line number Diff line Loading @@ -1316,6 +1316,16 @@ int gsi_write_channel_scratch2_reg(unsigned long chan_hdl, int gsi_read_channel_scratch(unsigned long chan_hdl, union __packed gsi_channel_scratch *val); /** * gsi_pending_irq_type - Peripheral should call this function to * check if there is any pending irq * * This function can sleep * * @Return gsi_irq_type */ int gsi_pending_irq_type(void); /** * gsi_update_mhi_channel_scratch - MHI Peripheral should call this * function to update the scratch area of the channel context. Updating Loading Loading @@ -1790,6 +1800,10 @@ static inline int gsi_read_channel_scratch(unsigned long chan_hdl, return -GSI_STATUS_UNSUPPORTED_OP; } static inline int gsi_pending_irq_type(void) { } static inline int gsi_update_mhi_channel_scratch(unsigned long chan_hdl, struct __packed gsi_mhi_channel_scratch mscr) { Loading