summaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa/ipa_data-sc7180.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2021-03-26 10:11:17 -0500
committerDavid S. Miller <davem@davemloft.net>2021-03-26 15:02:38 -0700
commitcf9a10bd7c49ab59ef476711e8c8467ce738b6d9 (patch)
tree6e6c301146a023511698348f7a04b4cbf3cf2ede /drivers/net/ipa/ipa_data-sc7180.c
parent4bcfb35e7af9413a4715ec2c74f51e20043c70e2 (diff)
downloadlinux-cf9a10bd7c49ab59ef476711e8c8467ce738b6d9.tar.bz2
net: ipa: move ipa_resource_type definition
Most platforms have the same set of source and destination resource types. But some older platforms have some additional ones, and it's possible different resources will be used in the future. Move the definition of the ipa_resource_type enumerated type so it is defined for each platform in its configuration data file. This permits each to have a distinct set of resources. Shorten the data files slightly, by putting the min and max limit values on the same line. 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-sc7180.c')
-rw-r--r--drivers/net/ipa/ipa_data-sc7180.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/drivers/net/ipa/ipa_data-sc7180.c b/drivers/net/ipa/ipa_data-sc7180.c
index eba14d7bc8ac..24ff31517565 100644
--- a/drivers/net/ipa/ipa_data-sc7180.c
+++ b/drivers/net/ipa/ipa_data-sc7180.c
@@ -9,6 +9,20 @@
#include "ipa_endpoint.h"
#include "ipa_mem.h"
+/** enum ipa_resource_type - IPA resource types */
+enum ipa_resource_type {
+ /* Source resource types; first must have value 0 */
+ IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS = 0,
+ IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS,
+ IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF,
+ IPA_RESOURCE_TYPE_SRC_HPS_DMARS,
+ IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES,
+
+ /* Destination resource types; first must have value 0 */
+ IPA_RESOURCE_TYPE_DST_DATA_SECTORS = 0,
+ IPA_RESOURCE_TYPE_DST_DPS_DMARS,
+};
+
/* Resource groups used for the SC7180 SoC */
enum ipa_rsrc_group_id {
/* Source resource group identifiers */
@@ -152,32 +166,27 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
static const struct ipa_resource_src ipa_resource_src[] = {
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
- .min = 3,
- .max = 63,
+ .min = 3, .max = 63,
},
},
[IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
- .min = 3,
- .max = 3,
+ .min = 3, .max = 3,
},
},
[IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
- .min = 10,
- .max = 10,
+ .min = 10, .max = 10,
},
},
[IPA_RESOURCE_TYPE_SRC_HPS_DMARS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
- .min = 1,
- .max = 1,
+ .min = 1, .max = 1,
},
},
[IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
- .min = 5,
- .max = 5,
+ .min = 5, .max = 5,
},
},
};
@@ -186,14 +195,12 @@ static const struct ipa_resource_src ipa_resource_src[] = {
static const struct ipa_resource_dst ipa_resource_dst[] = {
[IPA_RESOURCE_TYPE_DST_DATA_SECTORS] = {
.limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = {
- .min = 3,
- .max = 3,
+ .min = 3, .max = 3,
},
},
[IPA_RESOURCE_TYPE_DST_DPS_DMARS] = {
.limits[IPA_RSRC_GROUP_DST_UL_DL_DPL] = {
- .min = 1,
- .max = 63,
+ .min = 1, .max = 63,
},
},
};