toradex: tdx-cfg-block: rework modules pid4 handling

The module pid4 currently corresponds to the index of the toradex_module
array. If a new pid4 is introduced that does not follow the sequence of
the previous entries, it will create a gap in the array.

To address this, embed pid4 within the toradex_som structure and
implement a function to retrieve the index corresponding to pid4.

Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 files changed