OSDN Git Service

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)
commitea151e1915ebef316893f1fdae6c2cd89ae3371b
tree45c196a831c10351b2dd5e1823ff8580c8e57994
parent10d0d3970187551645c7ab363e8c9d29e2122088
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