OSDN Git Service

net: ipa: distinguish between resource group types
authorAlex Elder <elder@linaro.org>
Wed, 28 Oct 2020 19:41:47 +0000 (14:41 -0500)
committerJakub Kicinski <kuba@kernel.org>
Sat, 31 Oct 2020 00:20:10 +0000 (17:20 -0700)
commit8c365f747f0218f2bc6bad0740324c92444423fb
tree9819c8ac8bd668706aa98a2a45d64de0e702371d
parent2d2653424ce5c4485978a523db3873f87e196593
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>
drivers/net/ipa/ipa_data.h
drivers/net/ipa/ipa_main.c
drivers/net/ipa/ipa_reg.h