]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: allow arbitrary number of interconnects
authorAlex Elder <elder@linaro.org>
Fri, 15 Jan 2021 12:50:50 +0000 (06:50 -0600)
committerJakub Kicinski <kuba@kernel.org>
Mon, 18 Jan 2021 19:51:06 +0000 (11:51 -0800)
commit91f30aa8e85cf2a29af123c2ed7205b0f91c8efc
tree45c196a831c10351b2dd5e1823ff8580c8e57994
parentb742913d1ca3036b2edead6d7a2ab0d71322b589
net: ipa: allow arbitrary number of interconnects

Currently we assume that the IPA hardware has exactly three
interconnects.  But that won't be guaranteed for all platforms,
so allow any number of interconnects to be specified in the
configuration data.

For each platform, define an array of interconnect data entries
(still associated with the IPA clock structure), and record the
number of entries initialized in that array.

Loop over all entries in this array when initializing, enabling,
disabling, or tearing down the set of interconnects.

With this change we no longer need the ipa_interconnect_id
enumerated type, so get rid of it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/ipa_clock.c
drivers/net/ipa/ipa_data-sc7180.c
drivers/net/ipa/ipa_data-sdm845.c
drivers/net/ipa/ipa_data.h