Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/25449
Change subject: mb/cavium/cn8100_sff_evb: Be verbose ......................................................................
mb/cavium/cn8100_sff_evb: Be verbose
Print some useful information about the board.
Change-Id: I0acac7a29290bc2eb9f4283317165fa0cf1b24e1 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/cavium/cn8100_sff_evb/mainboard.c 1 file changed, 46 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/25449/1
diff --git a/src/mainboard/cavium/cn8100_sff_evb/mainboard.c b/src/mainboard/cavium/cn8100_sff_evb/mainboard.c index b2b98dd..0887cde 100644 --- a/src/mainboard/cavium/cn8100_sff_evb/mainboard.c +++ b/src/mainboard/cavium/cn8100_sff_evb/mainboard.c @@ -16,6 +16,50 @@
#include <device/device.h> #include <soc/uart.h> +#include <console/console.h> +#include <soc/clock.h> +#include <soc/gpio.h> + +static void mainboard_print_info(void) +{ + printk(BIOS_INFO, "MB: trusted boot : %s\n", + gpio_strap_value(10) ? "yes" : "no"); + + const size_t boot_method = gpio_strap_value(0) | + (gpio_strap_value(1) << 1) | + (gpio_strap_value(2) << 2) | + (gpio_strap_value(3) << 3); + + printk(BIOS_INFO, "MB: boot method : "); + switch (boot_method) { + case 0x2: + case 0x3: + printk(BIOS_INFO, "EMMC\n"); + break; + case 0x5: + case 0x6: + printk(BIOS_INFO, "SPI\n"); + break; + case 0x8: + printk(BIOS_INFO, "REMOTE\n"); + break; + case 0xc: + case 0xd: + printk(BIOS_INFO, "PCIe\n"); + break; + default: + printk(BIOS_INFO, "unknown\n"); + } + + printk(BIOS_INFO, "MB: REFclk : %zu MHz\n", + thunderx_get_ref_clock() / 1000000ULL); + + printk(BIOS_INFO, "MB: IOclk : %zu MHz\n", + thunderx_get_io_clock() / 1000000ULL); + + printk(BIOS_INFO, "MB: COREclk : %zu MHz\n", + thunderx_get_core_clock() / 1000000ULL); +}
static void mainboard_init(device_t dev) { @@ -31,6 +75,8 @@ static void mainboard_enable(device_t dev) { dev->ops->init = &mainboard_init; + + mainboard_print_info(); }
struct chip_operations mainboard_ops = {