summaryrefslogtreecommitdiff
path: root/board/toradex/common/tdx-cfg-block.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/toradex/common/tdx-cfg-block.c')
-rw-r--r--board/toradex/common/tdx-cfg-block.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index 8067ebc1a0..39b4f1d58c 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -158,10 +158,11 @@ const struct pid4list toradex_carrier_boards[] = {
{YAVIA, "Yavia"},
};
-const char * const toradex_display_adapters[] = {
- [0] = "UNKNOWN DISPLAY ADAPTER",
- [157] = "Verdin DSI to HDMI Adapter",
- [159] = "Verdin DSI to LVDS Adapter",
+const struct pid4list toradex_display_adapters[] = {
+ /* the code assumes unknown at index 0 */
+ {0, "UNKNOWN DISPLAY ADAPTER"},
+ {VERDIN_DSI_TO_HDMI_ADAPTER, "Verdin DSI to HDMI Adapter"},
+ {VERDIN_DSI_TO_LVDS_ADAPTER, "Verdin DSI to LVDS Adapter"},
};
const u32 toradex_ouis[] = {
@@ -182,6 +183,19 @@ const char * const get_toradex_carrier_boards(int pid4)
return toradex_carrier_boards[index].name;
}
+const char * const get_toradex_display_adapters(int pid4)
+{
+ int i, index = 0;
+
+ for (i = 1; i < ARRAY_SIZE(toradex_display_adapters); i++) {
+ if (pid4 == toradex_display_adapters[i].pid4) {
+ index = i;
+ break;
+ }
+ }
+ return toradex_display_adapters[index].name;
+}
+
static u32 get_serial_from_mac(struct toradex_eth_addr *eth_addr)
{
int i;