]> 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)
commit92787fafbe2770aabc89cc2a29188f4f77c0fcae
tree45c196a831c10351b2dd5e1823ff8580c8e57994
parent64e49fe661a065ed38f5f26a31fe5271e776da98
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