]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf726acbe09b92a570f6f294d13214d5ccd85c117
tree43b88374b1d539d8840c1a9b7aff2fc2a0d71a96
parentda2b51eefae8c24653ede7ba935c2bae8ff39915
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