diff options
author | Alex Elder <elder@linaro.org> | 2020-10-28 14:41:47 -0500 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-30 17:20:10 -0700 |
commit | 8c365f747f0218f2bc6bad0740324c92444423fb (patch) | |
tree | 9819c8ac8bd668706aa98a2a45d64de0e702371d /drivers/net/ipa/ipa_data.h | |
parent | 2d2653424ce5c4485978a523db3873f87e196593 (diff) | |
download | linux-8c365f747f0218f2bc6bad0740324c92444423fb.tar.bz2 |
net: ipa: distinguish between resource group types
The number of resource groups supported by the hardware can be
different for source and destination resources. Determine the
number supported for each using separate functions. Make the
functions inline end move their definitions into "ipa_reg.h",
because they determine whether certain register definitions are
valid. Pass just the IPA hardware version as argument.
IPA_RESOURCE_GROUP_COUNT represents the maximum number of resource
groups the driver supports for any hardware version. Change that
symbol to be two separate constants, one for source and the other
for destination resource groups. Rename them to end with "_MAX"
rather than "_COUNT", to reflect their true purpose.
Tested-by: Sujit Kautkar <sujitka@chromium.org>
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa/ipa_data.h')
-rw-r--r-- | drivers/net/ipa/ipa_data.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ipa/ipa_data.h b/drivers/net/ipa/ipa_data.h index d084a83069db..0225d81d8502 100644 --- a/drivers/net/ipa/ipa_data.h +++ b/drivers/net/ipa/ipa_data.h @@ -45,10 +45,10 @@ * the IPA endpoint. */ -/* The maximum value returned by ipa_resource_group_count() */ -#define IPA_RESOURCE_GROUP_COUNT 4 +/* The maximum value returned by ipa_resource_group_{src,dst}_count() */ +#define IPA_RESOURCE_GROUP_SRC_MAX 4 +#define IPA_RESOURCE_GROUP_DST_MAX 4 -/** enum ipa_resource_type_src - source resource types */ /** * struct gsi_channel_data - GSI channel configuration data * @tre_count: number of TREs in the channel ring @@ -208,7 +208,7 @@ struct ipa_resource_limits { */ struct ipa_resource_src { enum ipa_resource_type_src type; - struct ipa_resource_limits limits[IPA_RESOURCE_GROUP_COUNT]; + struct ipa_resource_limits limits[IPA_RESOURCE_GROUP_SRC_MAX]; }; /** @@ -218,7 +218,7 @@ struct ipa_resource_src { */ struct ipa_resource_dst { enum ipa_resource_type_dst type; - struct ipa_resource_limits limits[IPA_RESOURCE_GROUP_COUNT]; + struct ipa_resource_limits limits[IPA_RESOURCE_GROUP_DST_MAX]; }; /** |