summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa_data-sdm845.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2021-03-26 18:11:16 +0300
committerDavid S. Miller <davem@davemloft.net>2021-03-27 01:02:38 +0300
commit4bcfb35e7af9413a4715ec2c74f51e20043c70e2 (patch)
tree92546da444e9958e674e2510f5ac7d2a2a631d8c /drivers/net/ipa/ipa_data-sdm845.c
parentfd2b7bc3211342e003d00625973318613e0aa2fe (diff)
downloadlinux-4bcfb35e7af9413a4715ec2c74f51e20043c70e2.tar.xz
net: ipa: index resource limits with type
Remove the type field from the ipa_resource_src and ipa_resource_dst structures, and instead use that value as the index into the arrays of source and destination resources. Change ipa_resource_config_src() and ipa_resource_config_dst() so the resource type is passed in as an argument. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_data-sdm845.c')
-rw-r--r--drivers/net/ipa/ipa_data-sdm845.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/ipa/ipa_data-sdm845.c b/drivers/net/ipa/ipa_data-sdm845.c
index 3bc5fcfdf960..4a4b3bd8a17c 100644
--- a/drivers/net/ipa/ipa_data-sdm845.c
+++ b/drivers/net/ipa/ipa_data-sdm845.c
@@ -168,8 +168,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
/* Source resource configuration data for the SDM845 SoC */
static const struct ipa_resource_src ipa_resource_src[] = {
- {
- .type = IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS,
+ [IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 1,
.max = 255,
@@ -183,8 +182,7 @@ static const struct ipa_resource_src ipa_resource_src[] = {
.max = 63,
},
},
- {
- .type = IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS,
+ [IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS] = {
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 10,
.max = 10,
@@ -198,8 +196,7 @@ static const struct ipa_resource_src ipa_resource_src[] = {
.max = 8,
},
},
- {
- .type = IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF,
+ [IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF] = {
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 12,
.max = 12,
@@ -213,8 +210,7 @@ static const struct ipa_resource_src ipa_resource_src[] = {
.max = 8,
},
},
- {
- .type = IPA_RESOURCE_TYPE_SRC_HPS_DMARS,
+ [IPA_RESOURCE_TYPE_SRC_HPS_DMARS] = {
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 0,
.max = 63,
@@ -232,8 +228,7 @@ static const struct ipa_resource_src ipa_resource_src[] = {
.max = 63,
},
},
- {
- .type = IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES,
+ [IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES] = {
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 14,
.max = 14,
@@ -251,8 +246,7 @@ static const struct ipa_resource_src ipa_resource_src[] = {
/* Destination resource configuration data for the SDM845 SoC */
static const struct ipa_resource_dst ipa_resource_dst[] = {
- {
- .type = IPA_RESOURCE_TYPE_DST_DATA_SECTORS,
+ [IPA_RESOURCE_TYPE_DST_DATA_SECTORS] = {
.limits[IPA_RSRC_GROUP_DST_LWA_DL] = {
.min = 4,
.max = 4,
@@ -266,8 +260,7 @@ static const struct ipa_resource_dst ipa_resource_dst[] = {
.max = 3,
}
},
- {
- .type = IPA_RESOURCE_TYPE_DST_DPS_DMARS,
+ [IPA_RESOURCE_TYPE_DST_DPS_DMARS] = {
.limits[IPA_RSRC_GROUP_DST_LWA_DL] = {
.min = 2,
.max = 63,