mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
Merge d71a7a3641 on remote branch
Change-Id: I75878f9dc3c59c5fa671b9fc7215fe22ad29d693
This commit is contained in:
commit
3249d17349
7 changed files with 65 additions and 5 deletions
|
|
@ -591,6 +591,16 @@
|
|||
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_BMSK 0xffffffff
|
||||
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_SHFT 0x0
|
||||
|
||||
#define GSI_EE_n_GSI_CH_k_SCRATCH_6_OFFS(k, n) \
|
||||
(GSI_GSI_REG_BASE_OFFS + 0x0000f048 + 0x4000 * (n) + 0x80 * (k))
|
||||
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_BMSK 0xffffffff
|
||||
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_SHFT 0x0
|
||||
|
||||
#define GSI_EE_n_GSI_CH_k_SCRATCH_7_OFFS(k, n) \
|
||||
(GSI_GSI_REG_BASE_OFFS + 0x0000f04c + 0x4000 * (n) + 0x80 * (k))
|
||||
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_BMSK 0xffffffff
|
||||
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_SHFT 0x0
|
||||
|
||||
#define GSI_EE_n_EV_CH_k_CNTXT_0_OFFS(k, n) \
|
||||
(GSI_GSI_REG_BASE_OFFS + 0x0001d000 + 0x4000 * (n) + 0x80 * (k))
|
||||
#define GSI_EE_n_EV_CH_k_CNTXT_0_ELEMENT_SIZE_BMSK 0xff000000
|
||||
|
|
|
|||
|
|
@ -830,7 +830,9 @@ void ecm_ipa_cleanup(void *priv)
|
|||
ecm_ipa_rules_destroy(ecm_ipa_ctx);
|
||||
ecm_ipa_debugfs_destroy(ecm_ipa_ctx);
|
||||
|
||||
ECM_IPA_DEBUG("ECM_IPA unregister_netdev started\n");
|
||||
unregister_netdev(ecm_ipa_ctx->net);
|
||||
ECM_IPA_DEBUG("ECM_IPA unregister_netdev completed\n");
|
||||
free_netdev(ecm_ipa_ctx->net);
|
||||
|
||||
ECM_IPA_INFO("ECM_IPA was destroyed successfully\n");
|
||||
|
|
|
|||
|
|
@ -1401,8 +1401,9 @@ void rndis_ipa_cleanup(void *private)
|
|||
rndis_ipa_debugfs_destroy(rndis_ipa_ctx);
|
||||
RNDIS_IPA_DEBUG("debugfs remove was done\n");
|
||||
|
||||
RNDIS_IPA_DEBUG("RNDIS_IPA netdev unregister started\n");
|
||||
unregister_netdev(rndis_ipa_ctx->net);
|
||||
RNDIS_IPA_DEBUG("netdev unregistered\n");
|
||||
RNDIS_IPA_DEBUG("RNDIS_IPA netdev unregister completed\n");
|
||||
|
||||
spin_lock_irqsave(&rndis_ipa_ctx->state_lock, flags);
|
||||
next_state = rndis_ipa_next_state(rndis_ipa_ctx->state,
|
||||
|
|
|
|||
|
|
@ -6593,7 +6593,6 @@ static void ipa3_load_ipa_fw(struct work_struct *work)
|
|||
if (result) {
|
||||
IPAERR("IPA FW loading process has failed result=%d\n",
|
||||
result);
|
||||
ipa_assert();
|
||||
return;
|
||||
}
|
||||
mutex_lock(&ipa3_ctx->fw_load_data.lock);
|
||||
|
|
@ -6996,7 +6995,6 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
|
|||
ipa3_ctx->ipa_wrapper_size = resource_p->ipa_mem_size;
|
||||
ipa3_ctx->ipa_hw_type = resource_p->ipa_hw_type;
|
||||
ipa3_ctx->ipa_config_is_mhi = resource_p->ipa_mhi_dynamic_config;
|
||||
ipa3_ctx->hw_type_index = ipa3_get_hw_type_index();
|
||||
ipa3_ctx->ipa3_hw_mode = resource_p->ipa3_hw_mode;
|
||||
ipa3_ctx->platform_type = resource_p->platform_type;
|
||||
ipa3_ctx->use_ipa_teth_bridge = resource_p->use_ipa_teth_bridge;
|
||||
|
|
@ -7053,6 +7051,7 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
|
|||
ipa3_ctx->ipa_config_is_auto = resource_p->ipa_config_is_auto;
|
||||
ipa3_ctx->manual_fw_load = resource_p->manual_fw_load;
|
||||
ipa3_ctx->max_num_smmu_cb = resource_p->max_num_smmu_cb;
|
||||
ipa3_ctx->hw_type_index = ipa3_get_hw_type_index();
|
||||
|
||||
if (resource_p->gsi_fw_file_name) {
|
||||
ipa3_ctx->gsi_fw_file_name =
|
||||
|
|
|
|||
|
|
@ -430,6 +430,49 @@ static ssize_t ipa3_read_ep_reg(struct file *file, char __user *ubuf,
|
|||
return size;
|
||||
}
|
||||
|
||||
static ssize_t ipa3_set_clk_index(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
s8 option = 0;
|
||||
int ret;
|
||||
uint32_t bw_idx = 0;
|
||||
|
||||
ret = kstrtos8_from_user(buf, count, 0, &option);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
switch (option) {
|
||||
case 0:
|
||||
bw_idx = 0;
|
||||
break;
|
||||
case 1:
|
||||
bw_idx = 1;
|
||||
break;
|
||||
case 2:
|
||||
bw_idx = 2;
|
||||
break;
|
||||
case 3:
|
||||
bw_idx = 3;
|
||||
break;
|
||||
case 4:
|
||||
bw_idx = 4;
|
||||
break;
|
||||
default:
|
||||
pr_err("Not support this vote (%d)\n", option);
|
||||
return -EFAULT;
|
||||
}
|
||||
pr_info("Make sure some client connected before scaling the BW\n");
|
||||
ipa3_ctx->enable_clock_scaling = 1;
|
||||
if (ipa3_set_clock_plan_from_pm(bw_idx)) {
|
||||
IPAERR("Failed to vote for bus BW (%u)\n", bw_idx);
|
||||
return -EFAULT;
|
||||
}
|
||||
ipa3_ctx->enable_clock_scaling = 0;
|
||||
IPAERR("Clock scaling is done sucessful\n");
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t ipa3_write_keep_awake(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
|
|
@ -2770,6 +2813,10 @@ static const struct ipa3_debugfs_file debugfs_files[] = {
|
|||
.read = ipa3_read_keep_awake,
|
||||
.write = ipa3_write_keep_awake,
|
||||
}
|
||||
}, {
|
||||
"set_clk_idx", IPA_READ_WRITE_MODE, NULL, {
|
||||
.write = ipa3_set_clk_index,
|
||||
}
|
||||
}, {
|
||||
"holb", IPA_WRITE_ONLY_MODE, NULL, {
|
||||
.write = ipa3_write_ep_holb,
|
||||
|
|
|
|||
|
|
@ -2784,7 +2784,7 @@ static void ipa3_cleanup_rx(struct ipa3_sys_context *sys)
|
|||
tail = atomic_read(&sys->repl->tail_idx);
|
||||
while (head != tail) {
|
||||
rx_pkt = sys->repl->cache[head];
|
||||
if (!ipa3_ctx->ipa_wan_skb_page) {
|
||||
if (sys->repl_hdlr != ipa3_replenish_rx_page_recycle) {
|
||||
dma_unmap_single(ipa3_ctx->pdev,
|
||||
rx_pkt->data.dma_addr,
|
||||
sys->rx_buff_sz,
|
||||
|
|
|
|||
|
|
@ -2764,8 +2764,9 @@ static int ipa3_wwan_remove(struct platform_device *pdev)
|
|||
else
|
||||
rmnet_ipa3_ctx->apps_to_ipa3_hdl = -1;
|
||||
mutex_unlock(&rmnet_ipa3_ctx->pipe_handle_guard);
|
||||
IPAWANINFO("rmnet_ipa unregister_netdev\n");
|
||||
IPAWANDBG("rmnet_ipa unregister_netdev started\n");
|
||||
unregister_netdev(IPA_NETDEV());
|
||||
IPAWANDBG("rmnet_ipa unregister_netdev completed\n");
|
||||
ipa3_wwan_deregister_netdev_pm_client();
|
||||
cancel_work_sync(&ipa3_tx_wakequeue_work);
|
||||
cancel_delayed_work(&ipa_tether_stats_poll_wakequeue_work);
|
||||
|
|
|
|||
Loading…
Reference in a new issue