aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa_data.h
diff options
context:
space:
mode:
authorAlex Elder2021-03-26 10:11:21 -0500
committerDavid S. Miller2021-03-26 15:02:39 -0700
commit4fd704b3608a4c89260ea33895a694bc5385e00f (patch)
treeab2501657eef882472d8bc14d886289ef9ed25b2 /drivers/net/ipa/ipa_data.h
parent93c03729c548ea30b8bb38f2ab51008f11babe2a (diff)
net: ipa: record number of groups in data
The arrays of source and destination resource limits defined in configuration data are of a fixed size--which is the maximum number of resource groups supported for any platform. Most platforms will use fewer than that many groups. Add new members to the ipa_rsrc_group_id enumerated type to define the number of source and destination resource groups are defined for the platform. (This type is defined for each platform in its data file.) Add a new field to the resource configuration data that indicates how many of the source and destination resource groups are actually used for the platform, and initialize it with the count value. This allows us to determine the number of groups defined for the platform without exposing the ipa_rsrc_group_id enumerated type. As a result, we no longer need ipa_resource_group_src_count() and ipa_resource_group_dst_count(), because each platform now defines its supported number of resource groups. So get rid of those two functions. 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.h')
-rw-r--r--drivers/net/ipa/ipa_data.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_data.h b/drivers/net/ipa/ipa_data.h
index 9060586eb7cb..c5d763a3782f 100644
--- a/drivers/net/ipa/ipa_data.h
+++ b/drivers/net/ipa/ipa_data.h
@@ -213,6 +213,8 @@ struct ipa_resource {
/**
* struct ipa_resource_data - IPA resource configuration data
+ * @rsrc_group_src_count: number of source resource groups supported
+ * @rsrc_group_dst_count: number of destination resource groups supported
* @resource_src_count: number of entries in the resource_src array
* @resource_src: source endpoint group resources
* @resource_dst_count: number of entries in the resource_dst array
@@ -224,6 +226,8 @@ struct ipa_resource {
* programming it at initialization time, so we specify it here.
*/
struct ipa_resource_data {
+ u32 rsrc_group_src_count;
+ u32 rsrc_group_dst_count;
u32 resource_src_count;
const struct ipa_resource *resource_src;
u32 resource_dst_count;