1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <console/console.h>
7 uint32_t board_id(void)
10 gpio_t pins
[] = {[3] = GPIO(2, A
, 7), [2] = GPIO(2, A
, 2),
11 [1] = GPIO(2, A
, 1), [0] = GPIO(2, A
, 0)}; /* GPIO2_A0 is LSB */
14 id
= gpio_base2_value(pins
, ARRAY_SIZE(pins
));
15 printk(BIOS_SPEW
, "Board ID: %d.\n", id
);
21 uint32_t ram_code(void)
24 gpio_t pins
[] = {[3] = GPIO(8, A
, 3), [2] = GPIO(8, A
, 2),
25 [1] = GPIO(8, A
, 1), [0] = GPIO(8, A
, 0)}; /* GPIO8_A0 is LSB */
27 code
= gpio_binary_first_base3_value(pins
, ARRAY_SIZE(pins
));
28 printk(BIOS_SPEW
, "RAM Config: %u.\n", code
);