OSDN Git Service

net: ipa: introduce gsi_ring_setup()
authorAlex Elder <elder@linaro.org>
Mon, 21 Jun 2021 17:56:26 +0000 (12:56 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jun 2021 19:30:59 +0000 (12:30 -0700)
commitbae70a803a771d0f1e55cfe1db195d8af2765dd8
tree43b88374b1d539d8840c1a9b7aff2fc2a0d71a96
parent110971d1ee4db10f48374a9303e86db158da354e
net: ipa: introduce gsi_ring_setup()

Prior to IPA v3.5.1, there is no HW_PARAM_2 GSI register, which we
use to determine the number of channels and endpoints per execution
environment.  In that case, we will just assume the number supported
is the maximum supported by the driver.

Introduce gsi_ring_setup() to encapsulate the code that determines
the number of channels and endpoints.

Update GSI_EVT_RING_COUNT_MAX so it is big enough to handle any
available channel for all supported hardware (IPA v4.9 can have 23
channels and 24 event rings).

Signed-off-by: Alex Elder <elder@linaro.org>
Acked-by: AngeloGioacchino Del Regno
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/gsi.c
drivers/net/ipa/gsi.h