]> git.itanic.dy.fi Git - linux-stable/commit
net: ipa: start generalizing "ipa_reg"
authorAlex Elder <elder@linaro.org>
Wed, 8 Feb 2023 20:56:51 +0000 (14:56 -0600)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Feb 2023 08:06:32 +0000 (08:06 +0000)
commit81772e444dbe89ca76d947f6d1e870d00b29c521
tree6a080002f4bad55014e0933f7fa6b4db68a66d25
parent0ec573ef2a1be1437291aa9ce1f752de1b929549
net: ipa: start generalizing "ipa_reg"

IPA register definitions have evolved with each new version.  The
changes required to support more than 32 endpoints in IPA v5.0 made
it best to define a unified mechanism for defining registers and
their fields.

GSI register definitions, meanwhile, have remained fairly stable.
And even as the total number of IPA endpoints goes beyond 32, the
number of GSI channels on a given EE that underly endpoints still
remains 32 or less.

Despite that, GSI v3.0 (which is used with IPA v5.0) extends the
number of channels (and events) it supports to be about 256, and as
a result, many GSI register definitions must change significantly.
To address this, we'll use the same "ipa_reg" mechanism to define
the GSI registers.

As a first step in generalizing the "ipa_reg" to also support GSI
registers, isolate the definitions of the "ipa_reg" and "ipa_regs"
structure types (and some supporting macros) into a new header file,
and remove the "ipa_" and "IPA_" from symbol names.

Separate the IPA register ID validity checking from the generic
check that a register ID is in range.  Aside from that, this is
intended to have no functional effect on the code.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 files changed:
drivers/net/ipa/ipa.h
drivers/net/ipa/ipa_cmd.c
drivers/net/ipa/ipa_endpoint.c
drivers/net/ipa/ipa_interrupt.c
drivers/net/ipa/ipa_main.c
drivers/net/ipa/ipa_mem.c
drivers/net/ipa/ipa_reg.c
drivers/net/ipa/ipa_reg.h
drivers/net/ipa/ipa_resource.c
drivers/net/ipa/ipa_table.c
drivers/net/ipa/ipa_uc.c
drivers/net/ipa/reg.h [new file with mode: 0644]
drivers/net/ipa/reg/ipa_reg-v3.1.c
drivers/net/ipa/reg/ipa_reg-v3.5.1.c
drivers/net/ipa/reg/ipa_reg-v4.11.c
drivers/net/ipa/reg/ipa_reg-v4.2.c
drivers/net/ipa/reg/ipa_reg-v4.5.c
drivers/net/ipa/reg/ipa_reg-v4.7.c
drivers/net/ipa/reg/ipa_reg-v4.9.c