Merge "msm: ipa: fix for common event ring size"
此提交包含在:
@@ -6866,6 +6866,37 @@ void ipa3_notify_clients_registered(void)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ipa3_notify_clients_registered);
|
EXPORT_SYMBOL(ipa3_notify_clients_registered);
|
||||||
|
|
||||||
|
void ipa_gsi_map_unmap_gsi_msi_addr(bool map)
|
||||||
|
{
|
||||||
|
struct ipa_smmu_cb_ctx *cb;
|
||||||
|
u64 rounddown_addr;
|
||||||
|
int res;
|
||||||
|
int prot = IOMMU_READ | IOMMU_WRITE | IOMMU_MMIO;
|
||||||
|
|
||||||
|
cb = ipa3_get_smmu_ctx(IPA_SMMU_CB_AP);
|
||||||
|
rounddown_addr = rounddown(ipa3_ctx->gsi_msi_addr, PAGE_SIZE);
|
||||||
|
if (map) {
|
||||||
|
res = ipa3_iommu_map(cb->iommu_domain,
|
||||||
|
rounddown_addr, rounddown_addr, PAGE_SIZE, prot);
|
||||||
|
if (res) {
|
||||||
|
IPAERR("iommu mapping failed for gsi_msi_addr\n");
|
||||||
|
ipa_assert();
|
||||||
|
}
|
||||||
|
ipa3_ctx->gsi_msi_clear_addr_io_mapped =
|
||||||
|
(u64)ioremap(ipa3_ctx->gsi_msi_clear_addr, 4);
|
||||||
|
ipa3_ctx->gsi_msi_addr_io_mapped =
|
||||||
|
(u64)ioremap(ipa3_ctx->gsi_msi_addr, 4);
|
||||||
|
} else {
|
||||||
|
iounmap((int *) ipa3_ctx->gsi_msi_clear_addr_io_mapped);
|
||||||
|
iounmap((int *) ipa3_ctx->gsi_msi_addr_io_mapped);
|
||||||
|
res = iommu_unmap(cb->iommu_domain, rounddown_addr, PAGE_SIZE);
|
||||||
|
ipa3_ctx->gsi_msi_clear_addr_io_mapped = 0;
|
||||||
|
ipa3_ctx->gsi_msi_addr_io_mapped = 0;
|
||||||
|
if (res)
|
||||||
|
IPAERR("smmu unmap for gsi_msi_addr failed %d\n", res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ipa3_post_init() - Initialize the IPA Driver (Part II).
|
* ipa3_post_init() - Initialize the IPA Driver (Part II).
|
||||||
* This part contains all initialization which requires interaction with
|
* This part contains all initialization which requires interaction with
|
||||||
@@ -7242,6 +7273,12 @@ static int ipa3_post_init(const struct ipa3_plat_drv_res *resource_p,
|
|||||||
|
|
||||||
ipa_ut_module_init();
|
ipa_ut_module_init();
|
||||||
|
|
||||||
|
/* Map the MSI addresses for the GSI to access, for LL and QMAP FC pipe */
|
||||||
|
if (!ipa3_ctx->gsi_msi_addr_io_mapped &&
|
||||||
|
!ipa3_ctx->gsi_msi_clear_addr_io_mapped &&
|
||||||
|
(ipa3_ctx->rmnet_ll_enable || ipa3_ctx->rmnet_ctl_enable))
|
||||||
|
ipa_gsi_map_unmap_gsi_msi_addr(true);
|
||||||
|
|
||||||
pr_info("IPA driver initialization was successful.\n");
|
pr_info("IPA driver initialization was successful.\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -9343,11 +9380,6 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
|
|||||||
ipa_drv_res->gsi_rmnet_ll_evt_ring_intvec =
|
ipa_drv_res->gsi_rmnet_ll_evt_ring_intvec =
|
||||||
gsi_rmnet_ll_evt_ring_intvec;
|
gsi_rmnet_ll_evt_ring_intvec;
|
||||||
|
|
||||||
if (!ipa3_ctx->gsi_msi_addr_io_mapped &&
|
|
||||||
!ipa3_ctx->gsi_msi_clear_addr_io_mapped &&
|
|
||||||
(ipa3_ctx->rmnet_ll_enable || ipa3_ctx->rmnet_ctl_enable))
|
|
||||||
ipa_gsi_map_unmap_gsi_msi_addr(true);
|
|
||||||
|
|
||||||
result = of_property_read_string(pdev->dev.of_node,
|
result = of_property_read_string(pdev->dev.of_node,
|
||||||
"qcom,use-gsi-ipa-fw", &ipa_drv_res->gsi_fw_file_name);
|
"qcom,use-gsi-ipa-fw", &ipa_drv_res->gsi_fw_file_name);
|
||||||
if (!result)
|
if (!result)
|
||||||
@@ -10899,37 +10931,6 @@ int ipa3_pci_drv_probe(struct pci_dev *pci_dev, const struct pci_device_id *ent)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ipa_gsi_map_unmap_gsi_msi_addr(bool map)
|
|
||||||
{
|
|
||||||
struct ipa_smmu_cb_ctx *cb;
|
|
||||||
u64 rounddown_addr;
|
|
||||||
int res;
|
|
||||||
int prot = IOMMU_READ | IOMMU_WRITE | IOMMU_MMIO;
|
|
||||||
|
|
||||||
cb = ipa3_get_smmu_ctx(IPA_SMMU_CB_AP);
|
|
||||||
rounddown_addr = rounddown(ipa3_ctx->gsi_msi_addr, PAGE_SIZE);
|
|
||||||
if (map) {
|
|
||||||
res = ipa3_iommu_map(cb->iommu_domain,
|
|
||||||
rounddown_addr, rounddown_addr, PAGE_SIZE, prot);
|
|
||||||
if (res) {
|
|
||||||
IPAERR("iommu mapping failed for gsi_msi_addr\n");
|
|
||||||
ipa_assert();
|
|
||||||
}
|
|
||||||
ipa3_ctx->gsi_msi_clear_addr_io_mapped =
|
|
||||||
(u64)ioremap(ipa3_ctx->gsi_msi_clear_addr, 4);
|
|
||||||
ipa3_ctx->gsi_msi_addr_io_mapped =
|
|
||||||
(u64)ioremap(ipa3_ctx->gsi_msi_addr, 4);
|
|
||||||
} else {
|
|
||||||
iounmap((int *) ipa3_ctx->gsi_msi_clear_addr_io_mapped);
|
|
||||||
iounmap((int *) ipa3_ctx->gsi_msi_addr_io_mapped);
|
|
||||||
res = iommu_unmap(cb->iommu_domain, rounddown_addr, PAGE_SIZE);
|
|
||||||
ipa3_ctx->gsi_msi_clear_addr_io_mapped = 0;
|
|
||||||
ipa3_ctx->gsi_msi_addr_io_mapped = 0;
|
|
||||||
if (res)
|
|
||||||
IPAERR("smmu unmap for gsi_msi_addr failed %d\n", res);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following returns transport register memory location and
|
* The following returns transport register memory location and
|
||||||
* size...
|
* size...
|
||||||
|
@@ -59,7 +59,8 @@
|
|||||||
#define IPA5_PIPE_REG_NUM 2
|
#define IPA5_PIPE_REG_NUM 2
|
||||||
#define IPA5_MAX_NUM_PIPES (IPA5_PIPES_NUM)
|
#define IPA5_MAX_NUM_PIPES (IPA5_PIPES_NUM)
|
||||||
#define IPA_SYS_DESC_FIFO_SZ 0x800
|
#define IPA_SYS_DESC_FIFO_SZ 0x800
|
||||||
#define IPA_SYS_TX_DATA_DESC_FIFO_SZ 0x2000
|
#define IPA_SYS_TX_DATA_DESC_FIFO_SZ 0x1000
|
||||||
|
#define IPA_SYS_TX_DATA_DESC_FIFO_SZ_8K 0x2000
|
||||||
#define IPA_COMMON_EVENT_RING_SIZE 0x7C00
|
#define IPA_COMMON_EVENT_RING_SIZE 0x7C00
|
||||||
#define IPA_LAN_RX_HEADER_LENGTH (2)
|
#define IPA_LAN_RX_HEADER_LENGTH (2)
|
||||||
#define IPA_QMAP_HEADER_LENGTH (4)
|
#define IPA_QMAP_HEADER_LENGTH (4)
|
||||||
|
@@ -393,7 +393,7 @@ int ipa3_setup_apps_low_lat_prod_pipe(bool rmnet_config,
|
|||||||
ipa_low_lat_ep_cfg->notify =
|
ipa_low_lat_ep_cfg->notify =
|
||||||
apps_rmnet_ctl_tx_complete_notify;
|
apps_rmnet_ctl_tx_complete_notify;
|
||||||
ipa_low_lat_ep_cfg->desc_fifo_sz =
|
ipa_low_lat_ep_cfg->desc_fifo_sz =
|
||||||
IPA_SYS_TX_DATA_DESC_FIFO_SZ;
|
IPA_SYS_TX_DATA_DESC_FIFO_SZ_8K;
|
||||||
ipa_low_lat_ep_cfg->priv = NULL;
|
ipa_low_lat_ep_cfg->priv = NULL;
|
||||||
|
|
||||||
ret = ipa_setup_sys_pipe(ipa_low_lat_ep_cfg,
|
ret = ipa_setup_sys_pipe(ipa_low_lat_ep_cfg,
|
||||||
|
@@ -513,7 +513,7 @@ int ipa3_setup_apps_low_lat_data_prod_pipe(
|
|||||||
apps_rmnet_ll_tx_complete_notify;
|
apps_rmnet_ll_tx_complete_notify;
|
||||||
ipa_low_lat_data_ep_cfg->priv = dev;
|
ipa_low_lat_data_ep_cfg->priv = dev;
|
||||||
ipa_low_lat_data_ep_cfg->desc_fifo_sz =
|
ipa_low_lat_data_ep_cfg->desc_fifo_sz =
|
||||||
IPA_SYS_TX_DATA_DESC_FIFO_SZ;
|
IPA_SYS_TX_DATA_DESC_FIFO_SZ_8K;
|
||||||
|
|
||||||
ret = ipa_setup_sys_pipe(ipa_low_lat_data_ep_cfg,
|
ret = ipa_setup_sys_pipe(ipa_low_lat_data_ep_cfg,
|
||||||
&rmnet_ll_ipa3_ctx->apps_to_ipa3_low_lat_data_hdl);
|
&rmnet_ll_ipa3_ctx->apps_to_ipa3_low_lat_data_hdl);
|
||||||
|
新增問題並參考
封鎖使用者