Loading Documentation/devicetree/bindings/platform/msm/ipa.txt +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ IPA node: Optional: - qcom,wan-rx-ring-size: size of WAN rx ring, default is 32 - qcom,use-a2-service: determine if A2 service will be used - qcom,use-ipa-tethering-bridge: determine if tethering bridge will be used - qcom,use-ipa-bamdma-a2-bridge: determine if a2/ipa hw bridge will be used Loading drivers/platform/msm/ipa/ipa.c +12 −0 Original line number Diff line number Diff line Loading @@ -2961,6 +2961,7 @@ static int ipa_init(const struct ipa_plat_drv_res *resource_p, ipa_ctx->ipa_hw_mode = resource_p->ipa_hw_mode; 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->wan_rx_ring_size = resource_p->wan_rx_ring_size; /* default aggregation parameters */ ipa_ctx->aggregation_type = IPA_MBIM_16; Loading Loading @@ -3458,6 +3459,7 @@ static int get_ipa_dts_configuration(struct platform_device *pdev, ipa_drv_res->ipa_hw_type = 0; ipa_drv_res->ipa_hw_mode = 0; ipa_drv_res->ipa_bam_remote_mode = false; ipa_drv_res->wan_rx_ring_size = IPA_GENERIC_RX_POOL_SZ; /* Get IPA HW Version */ result = of_property_read_u32(pdev->dev.of_node, "qcom,ipa-hw-ver", Loading @@ -3477,6 +3479,16 @@ 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); /* Get IPA WAN RX pool sizee */ result = of_property_read_u32(pdev->dev.of_node, "qcom,wan-rx-ring-size", &ipa_drv_res->wan_rx_ring_size); if (result) IPADBG("using default for wan-rx-ring-size\n"); else IPADBG(": found ipa_drv_res->wan-rx-ring-size = %u", ipa_drv_res->wan_rx_ring_size); ipa_drv_res->use_ipa_teth_bridge = of_property_read_bool(pdev->dev.of_node, "qcom,use-ipa-tethering-bridge"); Loading drivers/platform/msm/ipa/ipa_dp.c +4 −2 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ #define IPA_GENERIC_AGGR_BYTE_LIMIT 6 #define IPA_GENERIC_AGGR_TIME_LIMIT 1 #define IPA_GENERIC_AGGR_PKT_LIMIT 0 #define IPA_GENERIC_RX_POOL_SZ 32 #define IPA_GENERIC_RX_BUFF_BASE_SZ 8192 #define IPA_REAL_GENERIC_RX_BUFF_SZ (SKB_DATA_ALIGN(\ Loading Loading @@ -2494,7 +2493,6 @@ static int ipa_assign_policy(struct ipa_sys_connect_params *in, INIT_WORK(&sys->repl_work, ipa_wq_repl_rx); atomic_set(&sys->curr_polling_state, 0); sys->rx_buff_sz = IPA_GENERIC_RX_BUFF_SZ; sys->rx_pool_sz = IPA_GENERIC_RX_POOL_SZ; sys->get_skb = ipa_get_skb_ipa_rx; sys->free_skb = ipa_free_skb_rx; in->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_AGGR; Loading @@ -2507,9 +2505,13 @@ static int ipa_assign_policy(struct ipa_sys_connect_params *in, IPA_GENERIC_AGGR_PKT_LIMIT; if (in->client == IPA_CLIENT_APPS_LAN_CONS) { sys->pyld_hdlr = ipa_lan_rx_pyld_hdlr; sys->rx_pool_sz = IPA_GENERIC_RX_POOL_SZ; } else if (in->client == IPA_CLIENT_APPS_WAN_CONS) { sys->pyld_hdlr = ipa_wan_rx_pyld_hdlr; sys->rx_pool_sz = ipa_ctx->wan_rx_ring_size; } if (nr_cpu_ids > 1) sys->repl_hdlr = Loading drivers/platform/msm/ipa/ipa_i.h +3 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,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 32 #define IPADBG(fmt, args...) \ pr_debug(DRV_NAME " %s:%d " fmt, __func__, __LINE__, ## args) Loading Loading @@ -1186,6 +1187,7 @@ struct ipa_context { struct ipa_uc_ctx uc_ctx; struct ipa_uc_wdi_ctx uc_wdi_ctx; u32 wan_rx_ring_size; }; /** Loading Loading @@ -1232,6 +1234,7 @@ struct ipa_plat_drv_res { enum ipa_hw_mode ipa_hw_mode; u32 ee; bool ipa_bam_remote_mode; u32 wan_rx_ring_size; }; struct ipa_mem_partition { Loading Loading
Documentation/devicetree/bindings/platform/msm/ipa.txt +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ IPA node: Optional: - qcom,wan-rx-ring-size: size of WAN rx ring, default is 32 - qcom,use-a2-service: determine if A2 service will be used - qcom,use-ipa-tethering-bridge: determine if tethering bridge will be used - qcom,use-ipa-bamdma-a2-bridge: determine if a2/ipa hw bridge will be used Loading
drivers/platform/msm/ipa/ipa.c +12 −0 Original line number Diff line number Diff line Loading @@ -2961,6 +2961,7 @@ static int ipa_init(const struct ipa_plat_drv_res *resource_p, ipa_ctx->ipa_hw_mode = resource_p->ipa_hw_mode; 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->wan_rx_ring_size = resource_p->wan_rx_ring_size; /* default aggregation parameters */ ipa_ctx->aggregation_type = IPA_MBIM_16; Loading Loading @@ -3458,6 +3459,7 @@ static int get_ipa_dts_configuration(struct platform_device *pdev, ipa_drv_res->ipa_hw_type = 0; ipa_drv_res->ipa_hw_mode = 0; ipa_drv_res->ipa_bam_remote_mode = false; ipa_drv_res->wan_rx_ring_size = IPA_GENERIC_RX_POOL_SZ; /* Get IPA HW Version */ result = of_property_read_u32(pdev->dev.of_node, "qcom,ipa-hw-ver", Loading @@ -3477,6 +3479,16 @@ 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); /* Get IPA WAN RX pool sizee */ result = of_property_read_u32(pdev->dev.of_node, "qcom,wan-rx-ring-size", &ipa_drv_res->wan_rx_ring_size); if (result) IPADBG("using default for wan-rx-ring-size\n"); else IPADBG(": found ipa_drv_res->wan-rx-ring-size = %u", ipa_drv_res->wan_rx_ring_size); ipa_drv_res->use_ipa_teth_bridge = of_property_read_bool(pdev->dev.of_node, "qcom,use-ipa-tethering-bridge"); Loading
drivers/platform/msm/ipa/ipa_dp.c +4 −2 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ #define IPA_GENERIC_AGGR_BYTE_LIMIT 6 #define IPA_GENERIC_AGGR_TIME_LIMIT 1 #define IPA_GENERIC_AGGR_PKT_LIMIT 0 #define IPA_GENERIC_RX_POOL_SZ 32 #define IPA_GENERIC_RX_BUFF_BASE_SZ 8192 #define IPA_REAL_GENERIC_RX_BUFF_SZ (SKB_DATA_ALIGN(\ Loading Loading @@ -2494,7 +2493,6 @@ static int ipa_assign_policy(struct ipa_sys_connect_params *in, INIT_WORK(&sys->repl_work, ipa_wq_repl_rx); atomic_set(&sys->curr_polling_state, 0); sys->rx_buff_sz = IPA_GENERIC_RX_BUFF_SZ; sys->rx_pool_sz = IPA_GENERIC_RX_POOL_SZ; sys->get_skb = ipa_get_skb_ipa_rx; sys->free_skb = ipa_free_skb_rx; in->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_AGGR; Loading @@ -2507,9 +2505,13 @@ static int ipa_assign_policy(struct ipa_sys_connect_params *in, IPA_GENERIC_AGGR_PKT_LIMIT; if (in->client == IPA_CLIENT_APPS_LAN_CONS) { sys->pyld_hdlr = ipa_lan_rx_pyld_hdlr; sys->rx_pool_sz = IPA_GENERIC_RX_POOL_SZ; } else if (in->client == IPA_CLIENT_APPS_WAN_CONS) { sys->pyld_hdlr = ipa_wan_rx_pyld_hdlr; sys->rx_pool_sz = ipa_ctx->wan_rx_ring_size; } if (nr_cpu_ids > 1) sys->repl_hdlr = Loading
drivers/platform/msm/ipa/ipa_i.h +3 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,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 32 #define IPADBG(fmt, args...) \ pr_debug(DRV_NAME " %s:%d " fmt, __func__, __LINE__, ## args) Loading Loading @@ -1186,6 +1187,7 @@ struct ipa_context { struct ipa_uc_ctx uc_ctx; struct ipa_uc_wdi_ctx uc_wdi_ctx; u32 wan_rx_ring_size; }; /** Loading Loading @@ -1232,6 +1234,7 @@ struct ipa_plat_drv_res { enum ipa_hw_mode ipa_hw_mode; u32 ee; bool ipa_bam_remote_mode; u32 wan_rx_ring_size; }; struct ipa_mem_partition { Loading