Loading Documentation/devicetree/bindings/platform/msm/ipa.txt +7 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ Optional: - qcom,lan-rx-ring-size: size of LAN rx ring, default is 192 - qcom,arm-smmu: SMMU is present and ARM SMMU driver is used - qcom,msm-smmu: SMMU is present and QSMMU driver is used - qcom,smmu-s1-bypass: Boolean context flag to set SMMU to S1 bypass - qcom,smmu-fast-map: Boolean context flag to set SMMU to fastpath mode - ipa_smmu_ap: AP general purpose SMMU device compatible "qcom,ipa-smmu-ap-cb" Loading Loading @@ -80,8 +79,12 @@ memory allocation over a PCIe bridge - qcom,rx-polling-sleep-ms: Receive Polling Timeout in millisecond, default is 1 millisecond. - qcom,ipa-polling-iteration: IPA Polling Iteration Count,default is 40. - qcom,mhi-event-ring-id-limits: Two elements property. Start and End limits for MHI event rings ids. - 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): Loading Loading @@ -122,6 +125,9 @@ IPA SMMU sub nodes -compatible: "qcom,ipa-smmu-uc-cb" - represents IPA uC context bank (for uC offload scenarios). - qcom,smmu-s1-bypass: Boolean context flag to set SMMU to S1 bypass. - iommus : the phandle and stream IDs for the SMMU used by this root - qcom,iova-mapping: specifies the start address and size of iova space. Loading drivers/platform/msm/gsi/gsi.c +27 −8 Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ #define GSI_CMD_TIMEOUT (5*HZ) #define GSI_STOP_CMD_TIMEOUT_MS 20 #define GSI_MAX_CH_LOW_WEIGHT 15 #define GSI_MHI_ER_START 10 #define GSI_MHI_ER_END 16 #define GSI_RESET_WA_MIN_SLEEP 1000 #define GSI_RESET_WA_MAX_SLEEP 2000 Loading Loading @@ -874,10 +872,23 @@ int gsi_register_device(struct gsi_per_props *props, unsigned long *dev_hdl) return -GSI_STATUS_ERROR; } /* bitmap is max events excludes reserved events */ if (props->mhi_er_id_limits_valid && props->mhi_er_id_limits[0] > (gsi_ctx->max_ev - 1)) { devm_iounmap(gsi_ctx->dev, gsi_ctx->base); gsi_ctx->base = NULL; devm_free_irq(gsi_ctx->dev, props->irq, gsi_ctx); GSIERR("MHI event ring start id %u is beyond max %u\n", props->mhi_er_id_limits[0], gsi_ctx->max_ev); return -GSI_STATUS_ERROR; } gsi_ctx->evt_bmap = ~((1 << gsi_ctx->max_ev) - 1); gsi_ctx->evt_bmap |= ((1 << (GSI_MHI_ER_END + 1)) - 1) ^ ((1 << GSI_MHI_ER_START) - 1); /* exclude reserved mhi events */ if (props->mhi_er_id_limits_valid) gsi_ctx->evt_bmap |= ((1 << (props->mhi_er_id_limits[1] + 1)) - 1) ^ ((1 << (props->mhi_er_id_limits[0])) - 1); /* * enable all interrupts but GSI_BREAK_POINT. Loading Loading @@ -1129,8 +1140,8 @@ static int gsi_validate_evt_ring_props(struct gsi_evt_ring_props *props) if (props->intf == GSI_EVT_CHTYPE_MHI_EV && (!props->evchid_valid || props->evchid > GSI_MHI_ER_END || props->evchid < GSI_MHI_ER_START)) { props->evchid > gsi_ctx->per.mhi_er_id_limits[1] || props->evchid < gsi_ctx->per.mhi_er_id_limits[0])) { GSIERR("MHI requires evchid valid=%d val=%u\n", props->evchid_valid, props->evchid); return -GSI_STATUS_INVALID_PARAMS; Loading Loading @@ -2656,15 +2667,16 @@ int gsi_config_channel_mode(unsigned long chan_hdl, enum gsi_chan_mode mode) if (curr == GSI_CHAN_MODE_CALLBACK && mode == GSI_CHAN_MODE_POLL) { __gsi_config_ieob_irq(gsi_ctx->per.ee, 1 << ctx->evtr->id, 0); atomic_set(&ctx->poll_mode, mode); ctx->stats.callback_to_poll++; } if (curr == GSI_CHAN_MODE_POLL && mode == GSI_CHAN_MODE_CALLBACK) { atomic_set(&ctx->poll_mode, mode); __gsi_config_ieob_irq(gsi_ctx->per.ee, 1 << ctx->evtr->id, ~0); ctx->stats.poll_to_callback++; } atomic_set(&ctx->poll_mode, mode); spin_unlock_irqrestore(&gsi_ctx->slock, flags); return GSI_STATUS_SUCCESS; Loading Loading @@ -2946,6 +2958,13 @@ int gsi_halt_channel_ee(unsigned int chan_idx, unsigned int ee, int *code) gsi_ctx->scratch.word0.val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SCRATCH_0_OFFS(gsi_ctx->per.ee)); if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == GSI_GEN_EE_CMD_RETURN_CODE_RETRY) { GSIDBG("chan_idx=%u ee=%u busy try again\n", chan_idx, ee); *code = GSI_GEN_EE_CMD_RETURN_CODE_RETRY; res = -GSI_STATUS_AGAIN; goto free_lock; } if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == 0) { GSIERR("No response received\n"); res = -GSI_STATUS_ERROR; Loading drivers/platform/msm/gsi/gsi.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2018, 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 @@ -288,6 +288,7 @@ enum gsi_generic_ee_cmd_return_code { GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_DIRECTION = 0x3, GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_TYPE = 0x4, GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_INDEX = 0x5, GSI_GEN_EE_CMD_RETURN_CODE_RETRY = 0x6, }; extern struct gsi_ctx *gsi_ctx; Loading drivers/platform/msm/gsi/gsi_dbg.c +1 −153 Original line number Diff line number Diff line /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2018, 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 @@ -259,135 +259,6 @@ static ssize_t gsi_dump_ch(struct file *file, return count; } static ssize_t gsi_dump_ee(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { uint32_t val; val = gsi_readl(gsi_ctx->base + GSI_GSI_MANAGER_EE_QOS_n_OFFS(gsi_ctx->per.ee)); TERR("EE%2d QOS 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_GSI_STATUS_OFFS(gsi_ctx->per.ee)); TERR("EE%2d STATUS 0x%x\n", gsi_ctx->per.ee, val); if (gsi_ctx->per.ver == GSI_VER_1_0) { val = gsi_readl(gsi_ctx->base + GSI_V1_0_EE_n_GSI_HW_PARAM_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM 0x%x\n", gsi_ctx->per.ee, val); } else if (gsi_ctx->per.ver == GSI_VER_1_2) { val = gsi_readl(gsi_ctx->base + GSI_V1_2_EE_n_GSI_HW_PARAM_0_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_0 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V1_2_EE_n_GSI_HW_PARAM_1_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_1 0x%x\n", gsi_ctx->per.ee, val); } else if (gsi_ctx->per.ver == GSI_VER_1_3) { val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_0_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_0 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_1_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_1 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_2_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_2 0x%x\n", gsi_ctx->per.ee, val); } else if (gsi_ctx->per.ver == GSI_VER_2_0) { val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_0_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_0 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_1_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_1 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V2_0_EE_n_GSI_HW_PARAM_2_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_2 0x%x\n", gsi_ctx->per.ee, val); } else { TERR("EE%2d Invalid Version 0x%x\n", gsi_ctx->per.ee, gsi_ctx->per.ver); } val = gsi_readl(gsi_ctx->base + GSI_EE_n_GSI_SW_VERSION_OFFS(gsi_ctx->per.ee)); TERR("EE%2d SW_VERSION 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_GSI_MCS_CODE_VER_OFFS(gsi_ctx->per.ee)); TERR("EE%2d MCS_CODE_VER 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_TYPE_IRQ_MSK_OFFS(gsi_ctx->per.ee)); TERR("EE%2d TYPE_IRQ_MSK 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SRC_GSI_CH_IRQ_MSK_OFFS(gsi_ctx->per.ee)); TERR("EE%2d CH_IRQ_MSK 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SRC_EV_CH_IRQ_MSK_OFFS(gsi_ctx->per.ee)); TERR("EE%2d EV_IRQ_MSK 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SRC_IEOB_IRQ_MSK_OFFS(gsi_ctx->per.ee)); TERR("EE%2d IEOB_IRQ_MSK 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_GLOB_IRQ_EN_OFFS(gsi_ctx->per.ee)); TERR("EE%2d GLOB_IRQ_EN 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_GSI_IRQ_EN_OFFS(gsi_ctx->per.ee)); TERR("EE%2d GSI_IRQ_EN 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_INTSET_OFFS(gsi_ctx->per.ee)); TERR("EE%2d INTSET 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_MSI_BASE_LSB_OFFS(gsi_ctx->per.ee)); TERR("EE%2d MSI_BASE_LSB 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_MSI_BASE_MSB_OFFS(gsi_ctx->per.ee)); TERR("EE%2d MSI_BASE_MSB 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_INT_VEC_OFFS(gsi_ctx->per.ee)); TERR("EE%2d INT_VEC 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SCRATCH_0_OFFS(gsi_ctx->per.ee)); TERR("EE%2d SCR0 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SCRATCH_1_OFFS(gsi_ctx->per.ee)); TERR("EE%2d SCR1 0x%x\n", gsi_ctx->per.ee, val); return count; } static ssize_t gsi_dump_map(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct gsi_chan_ctx *ctx; uint32_t val1; uint32_t val2; int i; TERR("EVT bitmap 0x%lx\n", gsi_ctx->evt_bmap); for (i = 0; i < gsi_ctx->max_ch; i++) { ctx = &gsi_ctx->chan[i]; if (ctx->allocated) { TERR("VIRT CH%2d -> VIRT EV%2d\n", ctx->props.ch_id, ctx->evtr ? ctx->evtr->id : GSI_NO_EVT_ERINDEX); val1 = gsi_readl(gsi_ctx->base + GSI_GSI_DEBUG_EE_n_CH_k_VP_TABLE_OFFS(i, gsi_ctx->per.ee)); TERR("VIRT CH%2d -> PHYS CH%2d\n", ctx->props.ch_id, val1 & GSI_GSI_DEBUG_EE_n_CH_k_VP_TABLE_PHY_CH_BMSK); if (ctx->evtr) { val2 = gsi_readl(gsi_ctx->base + GSI_GSI_DEBUG_EE_n_EV_k_VP_TABLE_OFFS( ctx->evtr->id, gsi_ctx->per.ee)); TERR("VRT EV%2d -> PHYS EV%2d\n", ctx->evtr->id, val2 & GSI_GSI_DEBUG_EE_n_CH_k_VP_TABLE_PHY_CH_BMSK); } TERR("\n"); } } return count; } static void gsi_dump_ch_stats(struct gsi_chan_ctx *ctx) { if (!ctx->allocated) Loading Loading @@ -795,14 +666,6 @@ const struct file_operations gsi_ch_dump_ops = { .write = gsi_dump_ch, }; const struct file_operations gsi_ee_dump_ops = { .write = gsi_dump_ee, }; const struct file_operations gsi_map_ops = { .write = gsi_dump_map, }; const struct file_operations gsi_stats_ops = { .write = gsi_dump_stats, }; Loading Loading @@ -830,7 +693,6 @@ const struct file_operations gsi_ipc_low_ops = { void gsi_debugfs_init(void) { static struct dentry *dfile; const mode_t read_only_mode = 0444; const mode_t write_only_mode = 0220; dent = debugfs_create_dir("gsi", 0); Loading @@ -853,20 +715,6 @@ void gsi_debugfs_init(void) goto fail; } dfile = debugfs_create_file("ee_dump", read_only_mode, dent, 0, &gsi_ee_dump_ops); if (!dfile || IS_ERR(dfile)) { TERR("fail to create ee_dump file\n"); goto fail; } dfile = debugfs_create_file("map", read_only_mode, dent, 0, &gsi_map_ops); if (!dfile || IS_ERR(dfile)) { TERR("fail to create map file\n"); goto fail; } dfile = debugfs_create_file("stats", write_only_mode, dent, 0, &gsi_stats_ops); if (!dfile || IS_ERR(dfile)) { Loading drivers/platform/msm/ipa/ipa_api.c +232 −7 Original line number Diff line number Diff line /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2018, 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 @@ -1059,7 +1059,7 @@ int ipa_reset_flt(enum ipa_ip_type ip) EXPORT_SYMBOL(ipa_reset_flt); /** * allocate_nat_device() - Allocates memory for the NAT device * ipa_allocate_nat_device() - Allocates memory for the NAT device * @mem: [in/out] memory parameters * * Called by NAT client driver to allocate memory for the NAT entries. Based on Loading @@ -1067,15 +1067,55 @@ EXPORT_SYMBOL(ipa_reset_flt); * * Returns: 0 on success, negative on failure */ int allocate_nat_device(struct ipa_ioc_nat_alloc_mem *mem) int ipa_allocate_nat_device(struct ipa_ioc_nat_alloc_mem *mem) { int ret; IPA_API_DISPATCH_RETURN(allocate_nat_device, mem); IPA_API_DISPATCH_RETURN(ipa_allocate_nat_device, mem); return ret; } EXPORT_SYMBOL(allocate_nat_device); EXPORT_SYMBOL(ipa_allocate_nat_device); /** * ipa_allocate_nat_table() - Allocates memory for the NAT table * @table_alloc: [in/out] memory parameters * * Called by NAT client to allocate memory for the table entries. * Based on the request size either shared or system memory will be used. * * Returns: 0 on success, negative on failure */ int ipa_allocate_nat_table(struct ipa_ioc_nat_ipv6ct_table_alloc *table_alloc) { int ret; IPA_API_DISPATCH_RETURN(ipa_allocate_nat_table, table_alloc); return ret; } EXPORT_SYMBOL(ipa_allocate_nat_table); /** * ipa_allocate_ipv6ct_table() - Allocates memory for the IPv6CT table * @table_alloc: [in/out] memory parameters * * Called by IPv6CT client to allocate memory for the table entries. * Based on the request size either shared or system memory will be used. * * Returns: 0 on success, negative on failure */ int ipa_allocate_ipv6ct_table( struct ipa_ioc_nat_ipv6ct_table_alloc *table_alloc) { int ret; IPA_API_DISPATCH_RETURN(ipa_allocate_ipv6ct_table, table_alloc); return ret; } EXPORT_SYMBOL(ipa_allocate_ipv6ct_table); /** * ipa_nat_init_cmd() - Post IP_V4_NAT_INIT command to IPA HW Loading @@ -1095,6 +1135,25 @@ int ipa_nat_init_cmd(struct ipa_ioc_v4_nat_init *init) } EXPORT_SYMBOL(ipa_nat_init_cmd); /** * ipa_ipv6ct_init_cmd() - Post IP_V6_CONN_TRACK_INIT command to IPA HW * @init: [in] initialization command attributes * * Called by IPv6CT client driver to post IP_V6_CONN_TRACK_INIT command * to IPA HW. * * Returns: 0 on success, negative on failure */ int ipa_ipv6ct_init_cmd(struct ipa_ioc_ipv6ct_init *init) { int ret; IPA_API_DISPATCH_RETURN(ipa_ipv6ct_init_cmd, init); return ret; } EXPORT_SYMBOL(ipa_ipv6ct_init_cmd); /** * ipa_nat_dma_cmd() - Post NAT_DMA command to IPA HW * @dma: [in] initialization command attributes Loading @@ -1114,8 +1173,26 @@ int ipa_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma) EXPORT_SYMBOL(ipa_nat_dma_cmd); /** * ipa_nat_del_cmd() - Delete a NAT table * @del: [in] delete table table table parameters * ipa_table_dma_cmd() - Post TABLE_DMA command to IPA HW * @dma: [in] initialization command attributes * * Called by NAT/IPv6CT client to post TABLE_DMA command to IPA HW * * Returns: 0 on success, negative on failure */ int ipa_table_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma) { int ret; IPA_API_DISPATCH_RETURN(ipa_table_dma_cmd, dma); return ret; } EXPORT_SYMBOL(ipa_table_dma_cmd); /** * ipa_nat_del_cmd() - Delete the NAT table * @del: [in] delete NAT table parameters * * Called by NAT client driver to delete the nat table * Loading @@ -1131,6 +1208,60 @@ int ipa_nat_del_cmd(struct ipa_ioc_v4_nat_del *del) } EXPORT_SYMBOL(ipa_nat_del_cmd); /** * ipa_del_nat_table() - Delete the NAT table * @del: [in] delete table parameters * * Called by NAT client to delete the table * * Returns: 0 on success, negative on failure */ int ipa_del_nat_table(struct ipa_ioc_nat_ipv6ct_table_del *del) { int ret; IPA_API_DISPATCH_RETURN(ipa_del_nat_table, del); return ret; } EXPORT_SYMBOL(ipa_del_nat_table); /** * ipa_del_ipv6ct_table() - Delete the IPv6CT table * @del: [in] delete table parameters * * Called by IPv6CT client to delete the table * * Returns: 0 on success, negative on failure */ int ipa_del_ipv6ct_table(struct ipa_ioc_nat_ipv6ct_table_del *del) { int ret; IPA_API_DISPATCH_RETURN(ipa_del_ipv6ct_table, del); return ret; } EXPORT_SYMBOL(ipa_del_ipv6ct_table); /** * ipa3_nat_mdfy_pdn() - Modify a PDN entry in PDN config table in IPA SRAM * @mdfy_pdn: [in] PDN info to be written to SRAM * * Called by NAT client driver to modify an entry in the PDN config table * * Returns: 0 on success, negative on failure */ int ipa_nat_mdfy_pdn(struct ipa_ioc_nat_pdn_entry *mdfy_pdn) { int ret; IPA_API_DISPATCH_RETURN(ipa_nat_mdfy_pdn, mdfy_pdn); return ret; } EXPORT_SYMBOL(ipa_nat_mdfy_pdn); /** * ipa_send_msg() - Send "message" from kernel client to IPA driver * @meta: [in] message meta-data Loading Loading @@ -2560,6 +2691,26 @@ int ipa_start_gsi_channel(u32 clnt_hdl) } EXPORT_SYMBOL(ipa_start_gsi_channel); /** * ipa_is_vlan_mode - check if a LAN driver should load in VLAN mode * @iface - type of vlan capable device * @res - query result: true for vlan mode, false for non vlan mode * * API must be called after ipa_is_ready() returns true, otherwise it will fail * * Returns: 0 on success, negative on failure */ int ipa_is_vlan_mode(enum ipa_vlan_ifaces iface, bool *res) { int ret; IPA_API_DISPATCH_RETURN(ipa_is_vlan_mode, iface, res); return ret; } EXPORT_SYMBOL(ipa_is_vlan_mode); /** * ipa_get_version_string() - Get string representation of IPA version * @ver: IPA version Loading Loading @@ -2964,6 +3115,80 @@ void ipa_ntn_uc_dereg_rdyCB(void) } EXPORT_SYMBOL(ipa_ntn_uc_dereg_rdyCB); int ipa_get_smmu_params(struct ipa_smmu_in_params *in, struct ipa_smmu_out_params *out) { int ret; IPA_API_DISPATCH_RETURN(ipa_get_smmu_params, in, out); return ret; } EXPORT_SYMBOL(ipa_get_smmu_params); /** * ipa_conn_wdi3_pipes() - connect wdi3 pipes */ int ipa_conn_wdi3_pipes(struct ipa_wdi3_conn_in_params *in, struct ipa_wdi3_conn_out_params *out) { int ret; IPA_API_DISPATCH_RETURN(ipa_conn_wdi3_pipes, in, out); return ret; } /** * ipa_disconn_wdi3_pipes() - disconnect wdi3 pipes */ int ipa_disconn_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx) { int ret; IPA_API_DISPATCH_RETURN(ipa_disconn_wdi3_pipes, ipa_ep_idx_tx, ipa_ep_idx_rx); return ret; } /** * ipa_enable_wdi3_pipes() - enable wdi3 pipes */ int ipa_enable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx) { int ret; IPA_API_DISPATCH_RETURN(ipa_enable_wdi3_pipes, ipa_ep_idx_tx, ipa_ep_idx_rx); return ret; } /** * ipa_disable_wdi3_pipes() - disable wdi3 pipes */ int ipa_disable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx) { int ret; IPA_API_DISPATCH_RETURN(ipa_disable_wdi3_pipes, ipa_ep_idx_tx, ipa_ep_idx_rx); return ret; } /** * ipa_tz_unlock_reg() - Allow AP access to memory regions controlled by TZ */ int ipa_tz_unlock_reg(struct ipa_tz_unlock_reg_info *reg_info, u16 num_regs) { int ret; IPA_API_DISPATCH_RETURN(ipa_tz_unlock_reg, reg_info, num_regs); return ret; } static const struct dev_pm_ops ipa_pm_ops = { .suspend_noirq = ipa_ap_suspend, Loading Loading
Documentation/devicetree/bindings/platform/msm/ipa.txt +7 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ Optional: - qcom,lan-rx-ring-size: size of LAN rx ring, default is 192 - qcom,arm-smmu: SMMU is present and ARM SMMU driver is used - qcom,msm-smmu: SMMU is present and QSMMU driver is used - qcom,smmu-s1-bypass: Boolean context flag to set SMMU to S1 bypass - qcom,smmu-fast-map: Boolean context flag to set SMMU to fastpath mode - ipa_smmu_ap: AP general purpose SMMU device compatible "qcom,ipa-smmu-ap-cb" Loading Loading @@ -80,8 +79,12 @@ memory allocation over a PCIe bridge - qcom,rx-polling-sleep-ms: Receive Polling Timeout in millisecond, default is 1 millisecond. - qcom,ipa-polling-iteration: IPA Polling Iteration Count,default is 40. - qcom,mhi-event-ring-id-limits: Two elements property. Start and End limits for MHI event rings ids. - 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): Loading Loading @@ -122,6 +125,9 @@ IPA SMMU sub nodes -compatible: "qcom,ipa-smmu-uc-cb" - represents IPA uC context bank (for uC offload scenarios). - qcom,smmu-s1-bypass: Boolean context flag to set SMMU to S1 bypass. - iommus : the phandle and stream IDs for the SMMU used by this root - qcom,iova-mapping: specifies the start address and size of iova space. Loading
drivers/platform/msm/gsi/gsi.c +27 −8 Original line number Diff line number Diff line Loading @@ -24,8 +24,6 @@ #define GSI_CMD_TIMEOUT (5*HZ) #define GSI_STOP_CMD_TIMEOUT_MS 20 #define GSI_MAX_CH_LOW_WEIGHT 15 #define GSI_MHI_ER_START 10 #define GSI_MHI_ER_END 16 #define GSI_RESET_WA_MIN_SLEEP 1000 #define GSI_RESET_WA_MAX_SLEEP 2000 Loading Loading @@ -874,10 +872,23 @@ int gsi_register_device(struct gsi_per_props *props, unsigned long *dev_hdl) return -GSI_STATUS_ERROR; } /* bitmap is max events excludes reserved events */ if (props->mhi_er_id_limits_valid && props->mhi_er_id_limits[0] > (gsi_ctx->max_ev - 1)) { devm_iounmap(gsi_ctx->dev, gsi_ctx->base); gsi_ctx->base = NULL; devm_free_irq(gsi_ctx->dev, props->irq, gsi_ctx); GSIERR("MHI event ring start id %u is beyond max %u\n", props->mhi_er_id_limits[0], gsi_ctx->max_ev); return -GSI_STATUS_ERROR; } gsi_ctx->evt_bmap = ~((1 << gsi_ctx->max_ev) - 1); gsi_ctx->evt_bmap |= ((1 << (GSI_MHI_ER_END + 1)) - 1) ^ ((1 << GSI_MHI_ER_START) - 1); /* exclude reserved mhi events */ if (props->mhi_er_id_limits_valid) gsi_ctx->evt_bmap |= ((1 << (props->mhi_er_id_limits[1] + 1)) - 1) ^ ((1 << (props->mhi_er_id_limits[0])) - 1); /* * enable all interrupts but GSI_BREAK_POINT. Loading Loading @@ -1129,8 +1140,8 @@ static int gsi_validate_evt_ring_props(struct gsi_evt_ring_props *props) if (props->intf == GSI_EVT_CHTYPE_MHI_EV && (!props->evchid_valid || props->evchid > GSI_MHI_ER_END || props->evchid < GSI_MHI_ER_START)) { props->evchid > gsi_ctx->per.mhi_er_id_limits[1] || props->evchid < gsi_ctx->per.mhi_er_id_limits[0])) { GSIERR("MHI requires evchid valid=%d val=%u\n", props->evchid_valid, props->evchid); return -GSI_STATUS_INVALID_PARAMS; Loading Loading @@ -2656,15 +2667,16 @@ int gsi_config_channel_mode(unsigned long chan_hdl, enum gsi_chan_mode mode) if (curr == GSI_CHAN_MODE_CALLBACK && mode == GSI_CHAN_MODE_POLL) { __gsi_config_ieob_irq(gsi_ctx->per.ee, 1 << ctx->evtr->id, 0); atomic_set(&ctx->poll_mode, mode); ctx->stats.callback_to_poll++; } if (curr == GSI_CHAN_MODE_POLL && mode == GSI_CHAN_MODE_CALLBACK) { atomic_set(&ctx->poll_mode, mode); __gsi_config_ieob_irq(gsi_ctx->per.ee, 1 << ctx->evtr->id, ~0); ctx->stats.poll_to_callback++; } atomic_set(&ctx->poll_mode, mode); spin_unlock_irqrestore(&gsi_ctx->slock, flags); return GSI_STATUS_SUCCESS; Loading Loading @@ -2946,6 +2958,13 @@ int gsi_halt_channel_ee(unsigned int chan_idx, unsigned int ee, int *code) gsi_ctx->scratch.word0.val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SCRATCH_0_OFFS(gsi_ctx->per.ee)); if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == GSI_GEN_EE_CMD_RETURN_CODE_RETRY) { GSIDBG("chan_idx=%u ee=%u busy try again\n", chan_idx, ee); *code = GSI_GEN_EE_CMD_RETURN_CODE_RETRY; res = -GSI_STATUS_AGAIN; goto free_lock; } if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == 0) { GSIERR("No response received\n"); res = -GSI_STATUS_ERROR; Loading
drivers/platform/msm/gsi/gsi.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2018, 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 @@ -288,6 +288,7 @@ enum gsi_generic_ee_cmd_return_code { GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_DIRECTION = 0x3, GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_TYPE = 0x4, GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_INDEX = 0x5, GSI_GEN_EE_CMD_RETURN_CODE_RETRY = 0x6, }; extern struct gsi_ctx *gsi_ctx; Loading
drivers/platform/msm/gsi/gsi_dbg.c +1 −153 Original line number Diff line number Diff line /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2018, 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 @@ -259,135 +259,6 @@ static ssize_t gsi_dump_ch(struct file *file, return count; } static ssize_t gsi_dump_ee(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { uint32_t val; val = gsi_readl(gsi_ctx->base + GSI_GSI_MANAGER_EE_QOS_n_OFFS(gsi_ctx->per.ee)); TERR("EE%2d QOS 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_GSI_STATUS_OFFS(gsi_ctx->per.ee)); TERR("EE%2d STATUS 0x%x\n", gsi_ctx->per.ee, val); if (gsi_ctx->per.ver == GSI_VER_1_0) { val = gsi_readl(gsi_ctx->base + GSI_V1_0_EE_n_GSI_HW_PARAM_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM 0x%x\n", gsi_ctx->per.ee, val); } else if (gsi_ctx->per.ver == GSI_VER_1_2) { val = gsi_readl(gsi_ctx->base + GSI_V1_2_EE_n_GSI_HW_PARAM_0_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_0 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V1_2_EE_n_GSI_HW_PARAM_1_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_1 0x%x\n", gsi_ctx->per.ee, val); } else if (gsi_ctx->per.ver == GSI_VER_1_3) { val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_0_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_0 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_1_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_1 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_2_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_2 0x%x\n", gsi_ctx->per.ee, val); } else if (gsi_ctx->per.ver == GSI_VER_2_0) { val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_0_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_0 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V1_3_EE_n_GSI_HW_PARAM_1_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_1 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_V2_0_EE_n_GSI_HW_PARAM_2_OFFS(gsi_ctx->per.ee)); TERR("EE%2d HW_PARAM_2 0x%x\n", gsi_ctx->per.ee, val); } else { TERR("EE%2d Invalid Version 0x%x\n", gsi_ctx->per.ee, gsi_ctx->per.ver); } val = gsi_readl(gsi_ctx->base + GSI_EE_n_GSI_SW_VERSION_OFFS(gsi_ctx->per.ee)); TERR("EE%2d SW_VERSION 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_GSI_MCS_CODE_VER_OFFS(gsi_ctx->per.ee)); TERR("EE%2d MCS_CODE_VER 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_TYPE_IRQ_MSK_OFFS(gsi_ctx->per.ee)); TERR("EE%2d TYPE_IRQ_MSK 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SRC_GSI_CH_IRQ_MSK_OFFS(gsi_ctx->per.ee)); TERR("EE%2d CH_IRQ_MSK 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SRC_EV_CH_IRQ_MSK_OFFS(gsi_ctx->per.ee)); TERR("EE%2d EV_IRQ_MSK 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SRC_IEOB_IRQ_MSK_OFFS(gsi_ctx->per.ee)); TERR("EE%2d IEOB_IRQ_MSK 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_GLOB_IRQ_EN_OFFS(gsi_ctx->per.ee)); TERR("EE%2d GLOB_IRQ_EN 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_GSI_IRQ_EN_OFFS(gsi_ctx->per.ee)); TERR("EE%2d GSI_IRQ_EN 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_INTSET_OFFS(gsi_ctx->per.ee)); TERR("EE%2d INTSET 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_MSI_BASE_LSB_OFFS(gsi_ctx->per.ee)); TERR("EE%2d MSI_BASE_LSB 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_MSI_BASE_MSB_OFFS(gsi_ctx->per.ee)); TERR("EE%2d MSI_BASE_MSB 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_INT_VEC_OFFS(gsi_ctx->per.ee)); TERR("EE%2d INT_VEC 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SCRATCH_0_OFFS(gsi_ctx->per.ee)); TERR("EE%2d SCR0 0x%x\n", gsi_ctx->per.ee, val); val = gsi_readl(gsi_ctx->base + GSI_EE_n_CNTXT_SCRATCH_1_OFFS(gsi_ctx->per.ee)); TERR("EE%2d SCR1 0x%x\n", gsi_ctx->per.ee, val); return count; } static ssize_t gsi_dump_map(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct gsi_chan_ctx *ctx; uint32_t val1; uint32_t val2; int i; TERR("EVT bitmap 0x%lx\n", gsi_ctx->evt_bmap); for (i = 0; i < gsi_ctx->max_ch; i++) { ctx = &gsi_ctx->chan[i]; if (ctx->allocated) { TERR("VIRT CH%2d -> VIRT EV%2d\n", ctx->props.ch_id, ctx->evtr ? ctx->evtr->id : GSI_NO_EVT_ERINDEX); val1 = gsi_readl(gsi_ctx->base + GSI_GSI_DEBUG_EE_n_CH_k_VP_TABLE_OFFS(i, gsi_ctx->per.ee)); TERR("VIRT CH%2d -> PHYS CH%2d\n", ctx->props.ch_id, val1 & GSI_GSI_DEBUG_EE_n_CH_k_VP_TABLE_PHY_CH_BMSK); if (ctx->evtr) { val2 = gsi_readl(gsi_ctx->base + GSI_GSI_DEBUG_EE_n_EV_k_VP_TABLE_OFFS( ctx->evtr->id, gsi_ctx->per.ee)); TERR("VRT EV%2d -> PHYS EV%2d\n", ctx->evtr->id, val2 & GSI_GSI_DEBUG_EE_n_CH_k_VP_TABLE_PHY_CH_BMSK); } TERR("\n"); } } return count; } static void gsi_dump_ch_stats(struct gsi_chan_ctx *ctx) { if (!ctx->allocated) Loading Loading @@ -795,14 +666,6 @@ const struct file_operations gsi_ch_dump_ops = { .write = gsi_dump_ch, }; const struct file_operations gsi_ee_dump_ops = { .write = gsi_dump_ee, }; const struct file_operations gsi_map_ops = { .write = gsi_dump_map, }; const struct file_operations gsi_stats_ops = { .write = gsi_dump_stats, }; Loading Loading @@ -830,7 +693,6 @@ const struct file_operations gsi_ipc_low_ops = { void gsi_debugfs_init(void) { static struct dentry *dfile; const mode_t read_only_mode = 0444; const mode_t write_only_mode = 0220; dent = debugfs_create_dir("gsi", 0); Loading @@ -853,20 +715,6 @@ void gsi_debugfs_init(void) goto fail; } dfile = debugfs_create_file("ee_dump", read_only_mode, dent, 0, &gsi_ee_dump_ops); if (!dfile || IS_ERR(dfile)) { TERR("fail to create ee_dump file\n"); goto fail; } dfile = debugfs_create_file("map", read_only_mode, dent, 0, &gsi_map_ops); if (!dfile || IS_ERR(dfile)) { TERR("fail to create map file\n"); goto fail; } dfile = debugfs_create_file("stats", write_only_mode, dent, 0, &gsi_stats_ops); if (!dfile || IS_ERR(dfile)) { Loading
drivers/platform/msm/ipa/ipa_api.c +232 −7 Original line number Diff line number Diff line /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2018, 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 @@ -1059,7 +1059,7 @@ int ipa_reset_flt(enum ipa_ip_type ip) EXPORT_SYMBOL(ipa_reset_flt); /** * allocate_nat_device() - Allocates memory for the NAT device * ipa_allocate_nat_device() - Allocates memory for the NAT device * @mem: [in/out] memory parameters * * Called by NAT client driver to allocate memory for the NAT entries. Based on Loading @@ -1067,15 +1067,55 @@ EXPORT_SYMBOL(ipa_reset_flt); * * Returns: 0 on success, negative on failure */ int allocate_nat_device(struct ipa_ioc_nat_alloc_mem *mem) int ipa_allocate_nat_device(struct ipa_ioc_nat_alloc_mem *mem) { int ret; IPA_API_DISPATCH_RETURN(allocate_nat_device, mem); IPA_API_DISPATCH_RETURN(ipa_allocate_nat_device, mem); return ret; } EXPORT_SYMBOL(allocate_nat_device); EXPORT_SYMBOL(ipa_allocate_nat_device); /** * ipa_allocate_nat_table() - Allocates memory for the NAT table * @table_alloc: [in/out] memory parameters * * Called by NAT client to allocate memory for the table entries. * Based on the request size either shared or system memory will be used. * * Returns: 0 on success, negative on failure */ int ipa_allocate_nat_table(struct ipa_ioc_nat_ipv6ct_table_alloc *table_alloc) { int ret; IPA_API_DISPATCH_RETURN(ipa_allocate_nat_table, table_alloc); return ret; } EXPORT_SYMBOL(ipa_allocate_nat_table); /** * ipa_allocate_ipv6ct_table() - Allocates memory for the IPv6CT table * @table_alloc: [in/out] memory parameters * * Called by IPv6CT client to allocate memory for the table entries. * Based on the request size either shared or system memory will be used. * * Returns: 0 on success, negative on failure */ int ipa_allocate_ipv6ct_table( struct ipa_ioc_nat_ipv6ct_table_alloc *table_alloc) { int ret; IPA_API_DISPATCH_RETURN(ipa_allocate_ipv6ct_table, table_alloc); return ret; } EXPORT_SYMBOL(ipa_allocate_ipv6ct_table); /** * ipa_nat_init_cmd() - Post IP_V4_NAT_INIT command to IPA HW Loading @@ -1095,6 +1135,25 @@ int ipa_nat_init_cmd(struct ipa_ioc_v4_nat_init *init) } EXPORT_SYMBOL(ipa_nat_init_cmd); /** * ipa_ipv6ct_init_cmd() - Post IP_V6_CONN_TRACK_INIT command to IPA HW * @init: [in] initialization command attributes * * Called by IPv6CT client driver to post IP_V6_CONN_TRACK_INIT command * to IPA HW. * * Returns: 0 on success, negative on failure */ int ipa_ipv6ct_init_cmd(struct ipa_ioc_ipv6ct_init *init) { int ret; IPA_API_DISPATCH_RETURN(ipa_ipv6ct_init_cmd, init); return ret; } EXPORT_SYMBOL(ipa_ipv6ct_init_cmd); /** * ipa_nat_dma_cmd() - Post NAT_DMA command to IPA HW * @dma: [in] initialization command attributes Loading @@ -1114,8 +1173,26 @@ int ipa_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma) EXPORT_SYMBOL(ipa_nat_dma_cmd); /** * ipa_nat_del_cmd() - Delete a NAT table * @del: [in] delete table table table parameters * ipa_table_dma_cmd() - Post TABLE_DMA command to IPA HW * @dma: [in] initialization command attributes * * Called by NAT/IPv6CT client to post TABLE_DMA command to IPA HW * * Returns: 0 on success, negative on failure */ int ipa_table_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma) { int ret; IPA_API_DISPATCH_RETURN(ipa_table_dma_cmd, dma); return ret; } EXPORT_SYMBOL(ipa_table_dma_cmd); /** * ipa_nat_del_cmd() - Delete the NAT table * @del: [in] delete NAT table parameters * * Called by NAT client driver to delete the nat table * Loading @@ -1131,6 +1208,60 @@ int ipa_nat_del_cmd(struct ipa_ioc_v4_nat_del *del) } EXPORT_SYMBOL(ipa_nat_del_cmd); /** * ipa_del_nat_table() - Delete the NAT table * @del: [in] delete table parameters * * Called by NAT client to delete the table * * Returns: 0 on success, negative on failure */ int ipa_del_nat_table(struct ipa_ioc_nat_ipv6ct_table_del *del) { int ret; IPA_API_DISPATCH_RETURN(ipa_del_nat_table, del); return ret; } EXPORT_SYMBOL(ipa_del_nat_table); /** * ipa_del_ipv6ct_table() - Delete the IPv6CT table * @del: [in] delete table parameters * * Called by IPv6CT client to delete the table * * Returns: 0 on success, negative on failure */ int ipa_del_ipv6ct_table(struct ipa_ioc_nat_ipv6ct_table_del *del) { int ret; IPA_API_DISPATCH_RETURN(ipa_del_ipv6ct_table, del); return ret; } EXPORT_SYMBOL(ipa_del_ipv6ct_table); /** * ipa3_nat_mdfy_pdn() - Modify a PDN entry in PDN config table in IPA SRAM * @mdfy_pdn: [in] PDN info to be written to SRAM * * Called by NAT client driver to modify an entry in the PDN config table * * Returns: 0 on success, negative on failure */ int ipa_nat_mdfy_pdn(struct ipa_ioc_nat_pdn_entry *mdfy_pdn) { int ret; IPA_API_DISPATCH_RETURN(ipa_nat_mdfy_pdn, mdfy_pdn); return ret; } EXPORT_SYMBOL(ipa_nat_mdfy_pdn); /** * ipa_send_msg() - Send "message" from kernel client to IPA driver * @meta: [in] message meta-data Loading Loading @@ -2560,6 +2691,26 @@ int ipa_start_gsi_channel(u32 clnt_hdl) } EXPORT_SYMBOL(ipa_start_gsi_channel); /** * ipa_is_vlan_mode - check if a LAN driver should load in VLAN mode * @iface - type of vlan capable device * @res - query result: true for vlan mode, false for non vlan mode * * API must be called after ipa_is_ready() returns true, otherwise it will fail * * Returns: 0 on success, negative on failure */ int ipa_is_vlan_mode(enum ipa_vlan_ifaces iface, bool *res) { int ret; IPA_API_DISPATCH_RETURN(ipa_is_vlan_mode, iface, res); return ret; } EXPORT_SYMBOL(ipa_is_vlan_mode); /** * ipa_get_version_string() - Get string representation of IPA version * @ver: IPA version Loading Loading @@ -2964,6 +3115,80 @@ void ipa_ntn_uc_dereg_rdyCB(void) } EXPORT_SYMBOL(ipa_ntn_uc_dereg_rdyCB); int ipa_get_smmu_params(struct ipa_smmu_in_params *in, struct ipa_smmu_out_params *out) { int ret; IPA_API_DISPATCH_RETURN(ipa_get_smmu_params, in, out); return ret; } EXPORT_SYMBOL(ipa_get_smmu_params); /** * ipa_conn_wdi3_pipes() - connect wdi3 pipes */ int ipa_conn_wdi3_pipes(struct ipa_wdi3_conn_in_params *in, struct ipa_wdi3_conn_out_params *out) { int ret; IPA_API_DISPATCH_RETURN(ipa_conn_wdi3_pipes, in, out); return ret; } /** * ipa_disconn_wdi3_pipes() - disconnect wdi3 pipes */ int ipa_disconn_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx) { int ret; IPA_API_DISPATCH_RETURN(ipa_disconn_wdi3_pipes, ipa_ep_idx_tx, ipa_ep_idx_rx); return ret; } /** * ipa_enable_wdi3_pipes() - enable wdi3 pipes */ int ipa_enable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx) { int ret; IPA_API_DISPATCH_RETURN(ipa_enable_wdi3_pipes, ipa_ep_idx_tx, ipa_ep_idx_rx); return ret; } /** * ipa_disable_wdi3_pipes() - disable wdi3 pipes */ int ipa_disable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx) { int ret; IPA_API_DISPATCH_RETURN(ipa_disable_wdi3_pipes, ipa_ep_idx_tx, ipa_ep_idx_rx); return ret; } /** * ipa_tz_unlock_reg() - Allow AP access to memory regions controlled by TZ */ int ipa_tz_unlock_reg(struct ipa_tz_unlock_reg_info *reg_info, u16 num_regs) { int ret; IPA_API_DISPATCH_RETURN(ipa_tz_unlock_reg, reg_info, num_regs); return ret; } static const struct dev_pm_ops ipa_pm_ops = { .suspend_noirq = ipa_ap_suspend, Loading