Loading drivers/platform/msm/ipa/ipa_v3/ipa_client.c +15 −2 Original line number Diff line number Diff line Loading @@ -1666,8 +1666,21 @@ static int ipa3_stop_ul_chan_with_data_drain(u32 qmi_req_id, if (should_force_clear) { result = ipa3_enable_force_clear(qmi_req_id, false, source_pipe_bitmask); if (result) goto exit; if (result) { struct ipahal_ep_cfg_ctrl_scnd ep_ctrl_scnd = { 0 }; /* * assuming here modem SSR\shutdown, AP can remove * the delay in this case */ IPAERR( "failed to force clear %d, remove delay from SCND reg\n" , result); ep_ctrl_scnd.endp_delay = false; ipahal_write_reg_n_fields( IPA_ENDP_INIT_CTRL_SCND_n, clnt_hdl, &ep_ctrl_scnd); } } /* with force clear, wait for emptiness */ for (i = 0; i < IPA_POLL_FOR_EMPTINESS_NUM; i++) { Loading drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c +15 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ static const char *ipareg_name_to_str[IPA_REG_MAX] = { __stringify(IPA_ENDP_INIT_MODE_n), __stringify(IPA_ENDP_INIT_NAT_n), __stringify(IPA_ENDP_INIT_CTRL_n), __stringify(IPA_ENDP_INIT_CTRL_SCND_n), __stringify(IPA_ENDP_INIT_HOL_BLOCK_EN_n), __stringify(IPA_ENDP_INIT_HOL_BLOCK_TIMER_n), __stringify(IPA_ENDP_INIT_DEAGGR_n), Loading Loading @@ -660,6 +661,17 @@ static void ipareg_parse_endp_init_ctrl_n(enum ipahal_reg_name reg, IPA_ENDP_INIT_CTRL_n_ENDP_DELAY_SHFT); } static void ipareg_construct_endp_init_ctrl_scnd_n(enum ipahal_reg_name reg, const void *fields, u32 *val) { struct ipahal_ep_cfg_ctrl_scnd *ep_ctrl_scnd = (struct ipahal_ep_cfg_ctrl_scnd *)fields; IPA_SETFIELD_IN_REG(*val, ep_ctrl_scnd->endp_delay, IPA_ENDP_INIT_CTRL_SCND_n_ENDP_DELAY_SHFT, IPA_ENDP_INIT_CTRL_SCND_n_ENDP_DELAY_BMSK); } static void ipareg_construct_endp_init_nat_n(enum ipahal_reg_name reg, const void *fields, u32 *val) { Loading Loading @@ -1062,6 +1074,9 @@ static struct ipahal_reg_obj ipahal_reg_objs[IPA_HW_MAX][IPA_REG_MAX] = { ipareg_construct_endp_init_ctrl_n, ipareg_parse_endp_init_ctrl_n, 0x00000800, 0x70}, [IPA_HW_v3_0][IPA_ENDP_INIT_CTRL_SCND_n] = { ipareg_construct_endp_init_ctrl_scnd_n, ipareg_parse_dummy, 0x00000804, 0x70}, [IPA_HW_v3_0][IPA_ENDP_INIT_HOL_BLOCK_EN_n] = { ipareg_construct_endp_init_hol_block_en_n, ipareg_parse_dummy, Loading drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.h +9 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ enum ipahal_reg_name { IPA_ENDP_INIT_MODE_n, IPA_ENDP_INIT_NAT_n, IPA_ENDP_INIT_CTRL_n, IPA_ENDP_INIT_CTRL_SCND_n, IPA_ENDP_INIT_HOL_BLOCK_EN_n, IPA_ENDP_INIT_HOL_BLOCK_TIMER_n, IPA_ENDP_INIT_DEAGGR_n, Loading Loading @@ -342,6 +343,14 @@ struct ipahal_reg_idle_indication_cfg { bool const_non_idle_enable; }; /* * struct ipa_ep_cfg_ctrl_scnd - PA_ENDP_INIT_CTRL_SCND_n register * @endp_delay: delay endpoint */ struct ipahal_ep_cfg_ctrl_scnd { bool endp_delay; }; /* * ipahal_reg_name_str() - returns string that represent the register * @reg_name: [in] register name Loading drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg_i.h +5 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -122,6 +122,10 @@ int ipahal_reg_init(enum ipa_hw_type ipa_hw_type); #define IPA_ENDP_INIT_CTRL_n_ENDP_DELAY_BMSK 0x2 #define IPA_ENDP_INIT_CTRL_n_ENDP_DELAY_SHFT 0x1 /* IPA_ENDP_INIT_CTRL_SCND_n register */ #define IPA_ENDP_INIT_CTRL_SCND_n_ENDP_DELAY_BMSK 0x2 #define IPA_ENDP_INIT_CTRL_SCND_n_ENDP_DELAY_SHFT 0x1 /* IPA_ENDP_INIT_HOL_BLOCK_EN_n register */ #define IPA_ENDP_INIT_HOL_BLOCK_EN_n_RMSK 0x1 #define IPA_ENDP_INIT_HOL_BLOCK_EN_n_MAX 19 Loading Loading
drivers/platform/msm/ipa/ipa_v3/ipa_client.c +15 −2 Original line number Diff line number Diff line Loading @@ -1666,8 +1666,21 @@ static int ipa3_stop_ul_chan_with_data_drain(u32 qmi_req_id, if (should_force_clear) { result = ipa3_enable_force_clear(qmi_req_id, false, source_pipe_bitmask); if (result) goto exit; if (result) { struct ipahal_ep_cfg_ctrl_scnd ep_ctrl_scnd = { 0 }; /* * assuming here modem SSR\shutdown, AP can remove * the delay in this case */ IPAERR( "failed to force clear %d, remove delay from SCND reg\n" , result); ep_ctrl_scnd.endp_delay = false; ipahal_write_reg_n_fields( IPA_ENDP_INIT_CTRL_SCND_n, clnt_hdl, &ep_ctrl_scnd); } } /* with force clear, wait for emptiness */ for (i = 0; i < IPA_POLL_FOR_EMPTINESS_NUM; i++) { Loading
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c +15 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ static const char *ipareg_name_to_str[IPA_REG_MAX] = { __stringify(IPA_ENDP_INIT_MODE_n), __stringify(IPA_ENDP_INIT_NAT_n), __stringify(IPA_ENDP_INIT_CTRL_n), __stringify(IPA_ENDP_INIT_CTRL_SCND_n), __stringify(IPA_ENDP_INIT_HOL_BLOCK_EN_n), __stringify(IPA_ENDP_INIT_HOL_BLOCK_TIMER_n), __stringify(IPA_ENDP_INIT_DEAGGR_n), Loading Loading @@ -660,6 +661,17 @@ static void ipareg_parse_endp_init_ctrl_n(enum ipahal_reg_name reg, IPA_ENDP_INIT_CTRL_n_ENDP_DELAY_SHFT); } static void ipareg_construct_endp_init_ctrl_scnd_n(enum ipahal_reg_name reg, const void *fields, u32 *val) { struct ipahal_ep_cfg_ctrl_scnd *ep_ctrl_scnd = (struct ipahal_ep_cfg_ctrl_scnd *)fields; IPA_SETFIELD_IN_REG(*val, ep_ctrl_scnd->endp_delay, IPA_ENDP_INIT_CTRL_SCND_n_ENDP_DELAY_SHFT, IPA_ENDP_INIT_CTRL_SCND_n_ENDP_DELAY_BMSK); } static void ipareg_construct_endp_init_nat_n(enum ipahal_reg_name reg, const void *fields, u32 *val) { Loading Loading @@ -1062,6 +1074,9 @@ static struct ipahal_reg_obj ipahal_reg_objs[IPA_HW_MAX][IPA_REG_MAX] = { ipareg_construct_endp_init_ctrl_n, ipareg_parse_endp_init_ctrl_n, 0x00000800, 0x70}, [IPA_HW_v3_0][IPA_ENDP_INIT_CTRL_SCND_n] = { ipareg_construct_endp_init_ctrl_scnd_n, ipareg_parse_dummy, 0x00000804, 0x70}, [IPA_HW_v3_0][IPA_ENDP_INIT_HOL_BLOCK_EN_n] = { ipareg_construct_endp_init_hol_block_en_n, ipareg_parse_dummy, Loading
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.h +9 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ enum ipahal_reg_name { IPA_ENDP_INIT_MODE_n, IPA_ENDP_INIT_NAT_n, IPA_ENDP_INIT_CTRL_n, IPA_ENDP_INIT_CTRL_SCND_n, IPA_ENDP_INIT_HOL_BLOCK_EN_n, IPA_ENDP_INIT_HOL_BLOCK_TIMER_n, IPA_ENDP_INIT_DEAGGR_n, Loading Loading @@ -342,6 +343,14 @@ struct ipahal_reg_idle_indication_cfg { bool const_non_idle_enable; }; /* * struct ipa_ep_cfg_ctrl_scnd - PA_ENDP_INIT_CTRL_SCND_n register * @endp_delay: delay endpoint */ struct ipahal_ep_cfg_ctrl_scnd { bool endp_delay; }; /* * ipahal_reg_name_str() - returns string that represent the register * @reg_name: [in] register name Loading
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg_i.h +5 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -122,6 +122,10 @@ int ipahal_reg_init(enum ipa_hw_type ipa_hw_type); #define IPA_ENDP_INIT_CTRL_n_ENDP_DELAY_BMSK 0x2 #define IPA_ENDP_INIT_CTRL_n_ENDP_DELAY_SHFT 0x1 /* IPA_ENDP_INIT_CTRL_SCND_n register */ #define IPA_ENDP_INIT_CTRL_SCND_n_ENDP_DELAY_BMSK 0x2 #define IPA_ENDP_INIT_CTRL_SCND_n_ENDP_DELAY_SHFT 0x1 /* IPA_ENDP_INIT_HOL_BLOCK_EN_n register */ #define IPA_ENDP_INIT_HOL_BLOCK_EN_n_RMSK 0x1 #define IPA_ENDP_INIT_HOL_BLOCK_EN_n_MAX 19 Loading