toradex: tdx-cfg-block: rework carrier board name handling
authorMax Krummenacher <max.krummenacher@toradex.com>
Tue, 18 Jul 2023 09:07:33 +0000 (11:07 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 4 Aug 2023 17:32:39 +0000 (13:32 -0400)
commit39e521f75674e640474f9db2b6db8bf68ae59a5f
tree9b6e3ee4ec38c28f72ab10ea9d12678ebf65f132
parent94757b47f1777dc4aee2aa9bf5b6742ce7ddd251
toradex: tdx-cfg-block: rework carrier board name handling

Rework the rather big array of zero length strings with 4 entries of
actual carrier board names to a array of structs which ties a pid4
to its correspondent human readable string.
Provide an accessor to get the string for a given PID4.
Rework the user of the information to use the accessor.

Note that check_pid8_sanity() is used for early samples of Dahlia and
the development board. Yavia isn't affected.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
board/toradex/common/tdx-cfg-block.c
board/toradex/common/tdx-cfg-block.h
board/toradex/common/tdx-common.c