diff options
| -rw-r--r-- | Documentation/devicetree/bindings/platform/msm/ipa.txt | 2 | ||||
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_v2/ipa.c | 11 | ||||
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_v2/ipa_i.h | 4 | ||||
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_v2/ipa_uc.c | 10 | ||||
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_v2/ipa_utils.c | 10 |
5 files changed, 28 insertions, 9 deletions
diff --git a/Documentation/devicetree/bindings/platform/msm/ipa.txt b/Documentation/devicetree/bindings/platform/msm/ipa.txt index 80f2d8f43e35..ed784f7f58a5 100644 --- a/Documentation/devicetree/bindings/platform/msm/ipa.txt +++ b/Documentation/devicetree/bindings/platform/msm/ipa.txt @@ -81,6 +81,8 @@ memory allocation over a PCIe bridge - qcom,ipa-polling-iteration: IPA Polling Iteration Count,default is 40. - qcom,ipa-tz-unlock-reg: Register start addresses and ranges which need to be unlocked by TZ. +- qcom,ipa-uc-monitor-holb: Boolean context flag to indicate whether + monitoring of holb via IPA uc is required. IPA pipe sub nodes (A2 static pipes configurations): diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa.c b/drivers/platform/msm/ipa/ipa_v2/ipa.c index 09ec8458fcad..1e79fd954969 100644 --- a/drivers/platform/msm/ipa/ipa_v2/ipa.c +++ b/drivers/platform/msm/ipa/ipa_v2/ipa.c @@ -3774,6 +3774,8 @@ static int ipa_init(const struct ipa_plat_drv_res *resource_p, ipa_ctx->ipa_wrapper_size = resource_p->ipa_mem_size; ipa_ctx->ipa_hw_type = resource_p->ipa_hw_type; ipa_ctx->ipa_hw_mode = resource_p->ipa_hw_mode; + ipa_ctx->ipa_uc_monitor_holb = + resource_p->ipa_uc_monitor_holb; ipa_ctx->use_ipa_teth_bridge = resource_p->use_ipa_teth_bridge; ipa_ctx->ipa_bam_remote_mode = resource_p->ipa_bam_remote_mode; ipa_ctx->modem_cfg_emb_pipe_flt = resource_p->modem_cfg_emb_pipe_flt; @@ -4316,6 +4318,7 @@ static int get_ipa_dts_configuration(struct platform_device *pdev, ipa_drv_res->ipa_pipe_mem_size = IPA_PIPE_MEM_SIZE; ipa_drv_res->ipa_hw_type = 0; ipa_drv_res->ipa_hw_mode = 0; + ipa_drv_res->ipa_uc_monitor_holb = false; ipa_drv_res->ipa_bam_remote_mode = false; ipa_drv_res->modem_cfg_emb_pipe_flt = false; ipa_drv_res->ipa_wdi2 = false; @@ -4340,6 +4343,14 @@ static int get_ipa_dts_configuration(struct platform_device *pdev, IPADBG(": found ipa_drv_res->ipa_hw_mode = %d", ipa_drv_res->ipa_hw_mode); + /* Check ipa_uc_monitor_holb enabled or disabled */ + ipa_drv_res->ipa_uc_monitor_holb = + of_property_read_bool(pdev->dev.of_node, + "qcom,ipa-uc-monitor-holb"); + IPADBG(": ipa uc monitor holb = %s\n", + ipa_drv_res->ipa_uc_monitor_holb + ? "Enabled" : "Disabled"); + /* Get IPA WAN / LAN RX pool sizes */ result = of_property_read_u32(pdev->dev.of_node, "qcom,wan-rx-ring-size", diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_i.h b/drivers/platform/msm/ipa/ipa_v2/ipa_i.h index 2c2a9c617b16..b45e748b66a6 100644 --- a/drivers/platform/msm/ipa/ipa_v2/ipa_i.h +++ b/drivers/platform/msm/ipa/ipa_v2/ipa_i.h @@ -47,7 +47,7 @@ #define IPA_QMAP_HEADER_LENGTH (4) #define IPA_DL_CHECKSUM_LENGTH (8) #define IPA_NUM_DESC_PER_SW_TX (2) -#define IPA_GENERIC_RX_POOL_SZ 1000 +#define IPA_GENERIC_RX_POOL_SZ 192 #define IPA_UC_FINISH_MAX 6 #define IPA_UC_WAIT_MIN_SLEEP 1000 #define IPA_UC_WAII_MAX_SLEEP 1200 @@ -1174,6 +1174,7 @@ struct ipa_context { u32 ipa_rx_min_timeout_usec; u32 ipa_rx_max_timeout_usec; u32 ipa_polling_iteration; + bool ipa_uc_monitor_holb; }; /** @@ -1229,6 +1230,7 @@ struct ipa_plat_drv_res { bool tethered_flow_control; u32 ipa_rx_polling_sleep_msec; u32 ipa_polling_iteration; + bool ipa_uc_monitor_holb; }; struct ipa_mem_partition { diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_uc.c b/drivers/platform/msm/ipa/ipa_v2/ipa_uc.c index 13db6b08ba9d..3dd2eb093317 100644 --- a/drivers/platform/msm/ipa/ipa_v2/ipa_uc.c +++ b/drivers/platform/msm/ipa/ipa_v2/ipa_uc.c @@ -1,4 +1,4 @@ -/* 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 @@ -768,8 +768,12 @@ int ipa_uc_monitor_holb(enum ipa_client_type ipa_client, bool enable) int ep_idx; int ret; - /* HOLB monitoring is applicable only to 2.6L. */ - if (ipa_ctx->ipa_hw_type != IPA_HW_v2_6L) { + /* + * HOLB monitoring is applicable to 2.6L. + * And also could be enabled from dtsi node. + */ + if (ipa_ctx->ipa_hw_type != IPA_HW_v2_6L || + !ipa_ctx->ipa_uc_monitor_holb) { IPADBG("Not applicable on this target\n"); return 0; } diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_utils.c b/drivers/platform/msm/ipa/ipa_v2/ipa_utils.c index e3d20422d591..2cd8d5c975f4 100644 --- a/drivers/platform/msm/ipa/ipa_v2/ipa_utils.c +++ b/drivers/platform/msm/ipa/ipa_v2/ipa_utils.c @@ -195,7 +195,7 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { [IPA_2_6L][IPA_CLIENT_HSIC1_PROD] = -1, - [IPA_2_6L][IPA_CLIENT_WLAN1_PROD] = -1, + [IPA_2_6L][IPA_CLIENT_WLAN1_PROD] = 18, [IPA_2_6L][IPA_CLIENT_HSIC2_PROD] = -1, [IPA_2_6L][IPA_CLIENT_USB2_PROD] = -1, [IPA_2_6L][IPA_CLIENT_HSIC3_PROD] = -1, @@ -228,16 +228,16 @@ static const int ep_mapping[3][IPA_CLIENT_MAX] = { [IPA_2_6L][IPA_CLIENT_TEST4_PROD] = 14, [IPA_2_6L][IPA_CLIENT_HSIC1_CONS] = -1, - [IPA_2_6L][IPA_CLIENT_WLAN1_CONS] = -1, + [IPA_2_6L][IPA_CLIENT_WLAN1_CONS] = 17, [IPA_2_6L][IPA_CLIENT_HSIC2_CONS] = -1, [IPA_2_6L][IPA_CLIENT_USB2_CONS] = -1, - [IPA_2_6L][IPA_CLIENT_WLAN2_CONS] = -1, + [IPA_2_6L][IPA_CLIENT_WLAN2_CONS] = 16, [IPA_2_6L][IPA_CLIENT_HSIC3_CONS] = -1, [IPA_2_6L][IPA_CLIENT_USB3_CONS] = -1, - [IPA_2_6L][IPA_CLIENT_WLAN3_CONS] = -1, + [IPA_2_6L][IPA_CLIENT_WLAN3_CONS] = 15, [IPA_2_6L][IPA_CLIENT_HSIC4_CONS] = -1, [IPA_2_6L][IPA_CLIENT_USB4_CONS] = -1, - [IPA_2_6L][IPA_CLIENT_WLAN4_CONS] = -1, + [IPA_2_6L][IPA_CLIENT_WLAN4_CONS] = 19, [IPA_2_6L][IPA_CLIENT_HSIC5_CONS] = -1, [IPA_2_6L][IPA_CLIENT_USB_CONS] = 0, [IPA_2_6L][IPA_CLIENT_USB_DPL_CONS] = 10, |
