]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: add per-version IPA register definition files
authorAlex Elder <elder@linaro.org>
Mon, 26 Sep 2022 22:09:19 +0000 (17:09 -0500)
committerJakub Kicinski <kuba@kernel.org>
Wed, 28 Sep 2022 01:42:49 +0000 (18:42 -0700)
commit07f120bcf76b6f0969a1bc18ce5b7a16555fadad
treea001b0ef812c6f25b8bb4a5c13ae31c0c988b18c
parent6bfb753850d3bad78fc2eb6f4e0fa5675055ad97
net: ipa: add per-version IPA register definition files

Create a new subdirectory "reg", which contains a register
definition file for each supported version of IPA.  Each register
definition contains the register's offset, and for parameterized
registers, the stride (distance between consecutive instances of the
register).  Finally, it includes an all-caps printable register name.

In these files, each IPA version defines an array of IPA register
definition pointers, with unsupported registers defined with a null
pointer.  The array is indexed by the ipa_reg_id enumerated type.

At initialization time, the appropriate register definition array to
use is selected based on the IPA version, and assigned to a new
"regs" field in the IPA structure.

Extend ipa_reg_valid() so it fails if a valid register is not
defined.

This patch simply puts this infrastructure in place; the next will
use it.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/Makefile
drivers/net/ipa/ipa.h
drivers/net/ipa/ipa_reg.c
drivers/net/ipa/ipa_reg.h
drivers/net/ipa/reg/ipa_reg-v3.1.c [new file with mode: 0644]
drivers/net/ipa/reg/ipa_reg-v3.5.1.c [new file with mode: 0644]
drivers/net/ipa/reg/ipa_reg-v4.11.c [new file with mode: 0644]
drivers/net/ipa/reg/ipa_reg-v4.2.c [new file with mode: 0644]
drivers/net/ipa/reg/ipa_reg-v4.5.c [new file with mode: 0644]
drivers/net/ipa/reg/ipa_reg-v4.9.c [new file with mode: 0644]