]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1f54fb23b81b7757647ebdfe5cf176e922837af5
tree9819c8ac8bd668706aa98a2a45d64de0e702371d
parentffa57c7bb6b312c449106782b021fbd77eade0fa
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