Commit 782d767a authored by Alex Elder's avatar Alex Elder Committed by David S. Miller

net: ipa: use version based configuration for SC7180

Rename the SC7180 configuration data file so that its name is
derived from its IPA version.

Update a few other references to the code that talk about the SC7180
rather than just IPA v4.2.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fc566dab
...@@ -9,4 +9,4 @@ ipa-y := ipa_main.o ipa_clock.o ipa_reg.o ipa_mem.o \ ...@@ -9,4 +9,4 @@ ipa-y := ipa_main.o ipa_clock.o ipa_reg.o ipa_mem.o \
ipa_endpoint.o ipa_cmd.o ipa_modem.o \ ipa_endpoint.o ipa_cmd.o ipa_modem.o \
ipa_resource.o ipa_qmi.o ipa_qmi_msg.o ipa_resource.o ipa_qmi.o ipa_qmi_msg.o
ipa-y += ipa_data-v3.5.1.o ipa_data-sc7180.o ipa-y += ipa_data-v3.5.1.o ipa_data-v4.2.o
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "ipa_endpoint.h" #include "ipa_endpoint.h"
#include "ipa_mem.h" #include "ipa_mem.h"
/** enum ipa_resource_type - IPA resource types */ /** enum ipa_resource_type - IPA resource types for an SoC having IPA v4.2 */
enum ipa_resource_type { enum ipa_resource_type {
/* Source resource types; first must have value 0 */ /* Source resource types; first must have value 0 */
IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS = 0, IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS = 0,
...@@ -23,7 +23,7 @@ enum ipa_resource_type { ...@@ -23,7 +23,7 @@ enum ipa_resource_type {
IPA_RESOURCE_TYPE_DST_DPS_DMARS, IPA_RESOURCE_TYPE_DST_DPS_DMARS,
}; };
/* Resource groups used for the SC7180 SoC */ /* Resource groups used for an SoC having IPA v4.2 */
enum ipa_rsrc_group_id { enum ipa_rsrc_group_id {
/* Source resource group identifiers */ /* Source resource group identifiers */
IPA_RSRC_GROUP_SRC_UL_DL = 0, IPA_RSRC_GROUP_SRC_UL_DL = 0,
...@@ -34,7 +34,7 @@ enum ipa_rsrc_group_id { ...@@ -34,7 +34,7 @@ enum ipa_rsrc_group_id {
IPA_RSRC_GROUP_DST_COUNT, /* Last; not a destination group */ IPA_RSRC_GROUP_DST_COUNT, /* Last; not a destination group */
}; };
/* QSB configuration for the SC7180 SoC. */ /* QSB configuration data for an SoC having IPA v4.2 */
static const struct ipa_qsb_data ipa_qsb_data[] = { static const struct ipa_qsb_data ipa_qsb_data[] = {
[IPA_QSB_MASTER_DDR] = { [IPA_QSB_MASTER_DDR] = {
.max_writes = 8, .max_writes = 8,
...@@ -43,7 +43,7 @@ static const struct ipa_qsb_data ipa_qsb_data[] = { ...@@ -43,7 +43,7 @@ static const struct ipa_qsb_data ipa_qsb_data[] = {
}, },
}; };
/* Endpoint configuration for the SC7180 SoC. */ /* Endpoint configuration data for an SoC having IPA v4.2 */
static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
[IPA_ENDPOINT_AP_COMMAND_TX] = { [IPA_ENDPOINT_AP_COMMAND_TX] = {
.ee_id = GSI_EE_AP, .ee_id = GSI_EE_AP,
...@@ -164,7 +164,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { ...@@ -164,7 +164,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
}, },
}; };
/* Source resource configuration data for the SC7180 SoC */ /* Source resource configuration data for an SoC having IPA v4.2 */
static const struct ipa_resource ipa_resource_src[] = { static const struct ipa_resource ipa_resource_src[] = {
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = { [IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = { .limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
...@@ -193,7 +193,7 @@ static const struct ipa_resource ipa_resource_src[] = { ...@@ -193,7 +193,7 @@ static const struct ipa_resource ipa_resource_src[] = {
}, },
}; };
/* Destination resource configuration data for the SC7180 SoC */ /* Destination resource configuration data for an SoC having IPA v4.2 */
static const struct ipa_resource ipa_resource_dst[] = { static const struct ipa_resource ipa_resource_dst[] = {
[IPA_RESOURCE_TYPE_DST_DATA_SECTORS] = { [IPA_RESOURCE_TYPE_DST_DATA_SECTORS] = {
.limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = { .limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = {
...@@ -207,7 +207,7 @@ static const struct ipa_resource ipa_resource_dst[] = { ...@@ -207,7 +207,7 @@ static const struct ipa_resource ipa_resource_dst[] = {
}, },
}; };
/* Resource configuration for the SC7180 SoC. */ /* Resource configuration data for an SoC having IPA v4.2 */
static const struct ipa_resource_data ipa_resource_data = { static const struct ipa_resource_data ipa_resource_data = {
.rsrc_group_src_count = IPA_RSRC_GROUP_SRC_COUNT, .rsrc_group_src_count = IPA_RSRC_GROUP_SRC_COUNT,
.rsrc_group_dst_count = IPA_RSRC_GROUP_DST_COUNT, .rsrc_group_dst_count = IPA_RSRC_GROUP_DST_COUNT,
...@@ -217,7 +217,7 @@ static const struct ipa_resource_data ipa_resource_data = { ...@@ -217,7 +217,7 @@ static const struct ipa_resource_data ipa_resource_data = {
.resource_dst = ipa_resource_dst, .resource_dst = ipa_resource_dst,
}; };
/* IPA-resident memory region configuration for the SC7180 SoC. */ /* IPA-resident memory region data for an SoC having IPA v4.2 */
static const struct ipa_mem ipa_mem_local_data[] = { static const struct ipa_mem ipa_mem_local_data[] = {
[IPA_MEM_UC_SHARED] = { [IPA_MEM_UC_SHARED] = {
.offset = 0x0000, .offset = 0x0000,
...@@ -311,6 +311,7 @@ static const struct ipa_mem ipa_mem_local_data[] = { ...@@ -311,6 +311,7 @@ static const struct ipa_mem ipa_mem_local_data[] = {
}, },
}; };
/* Memory configuration data for an SoC having IPA v4.2 */
static const struct ipa_mem_data ipa_mem_data = { static const struct ipa_mem_data ipa_mem_data = {
.local_count = ARRAY_SIZE(ipa_mem_local_data), .local_count = ARRAY_SIZE(ipa_mem_local_data),
.local = ipa_mem_local_data, .local = ipa_mem_local_data,
...@@ -320,7 +321,7 @@ static const struct ipa_mem_data ipa_mem_data = { ...@@ -320,7 +321,7 @@ static const struct ipa_mem_data ipa_mem_data = {
.smem_size = 0x00002000, .smem_size = 0x00002000,
}; };
/* Interconnect bandwidths are in 1000 byte/second units */ /* Interconnect rates are in 1000 byte/second units */
static const struct ipa_interconnect_data ipa_interconnect_data[] = { static const struct ipa_interconnect_data ipa_interconnect_data[] = {
{ {
.name = "memory", .name = "memory",
...@@ -340,14 +341,15 @@ static const struct ipa_interconnect_data ipa_interconnect_data[] = { ...@@ -340,14 +341,15 @@ static const struct ipa_interconnect_data ipa_interconnect_data[] = {
}, },
}; };
/* Clock and interconnect configuration data for an SoC having IPA v4.2 */
static const struct ipa_clock_data ipa_clock_data = { static const struct ipa_clock_data ipa_clock_data = {
.core_clock_rate = 100 * 1000 * 1000, /* Hz */ .core_clock_rate = 100 * 1000 * 1000, /* Hz */
.interconnect_count = ARRAY_SIZE(ipa_interconnect_data), .interconnect_count = ARRAY_SIZE(ipa_interconnect_data),
.interconnect_data = ipa_interconnect_data, .interconnect_data = ipa_interconnect_data,
}; };
/* Configuration data for the SC7180 SoC. */ /* Configuration data for an SoC having IPA v4.2 */
const struct ipa_data ipa_data_sc7180 = { const struct ipa_data ipa_data_v4_2 = {
.version = IPA_VERSION_4_2, .version = IPA_VERSION_4_2,
/* backward_compat value is 0 */ /* backward_compat value is 0 */
.qsb_count = ARRAY_SIZE(ipa_qsb_data), .qsb_count = ARRAY_SIZE(ipa_qsb_data),
......
...@@ -301,6 +301,6 @@ struct ipa_data { ...@@ -301,6 +301,6 @@ struct ipa_data {
}; };
extern const struct ipa_data ipa_data_v3_5_1; extern const struct ipa_data ipa_data_v3_5_1;
extern const struct ipa_data ipa_data_sc7180; extern const struct ipa_data ipa_data_v4_2;
#endif /* _IPA_DATA_H_ */ #endif /* _IPA_DATA_H_ */
...@@ -582,7 +582,7 @@ static const struct of_device_id ipa_match[] = { ...@@ -582,7 +582,7 @@ static const struct of_device_id ipa_match[] = {
}, },
{ {
.compatible = "qcom,sc7180-ipa", .compatible = "qcom,sc7180-ipa",
.data = &ipa_data_sc7180, .data = &ipa_data_v4_2,
}, },
{ }, { },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment