diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2018-03-28 12:31:40 +0200 |
---|---|---|
committer | Patrick Rudolph <siro@das-labor.org> | 2018-07-10 07:04:40 +0000 |
commit | bbfeb586a6c41e7b70a448fc25014aa0c00ead1d (patch) | |
tree | cb32c5da3eb34e9f280ab64d44abb851d3de81aa /src | |
parent | d0dcf877e4dc85f951e6c8c53702292fff060bc6 (diff) |
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>
Reviewed-on: https://review.coreboot.org/25449
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/cavium/cn8100_sff_evb/mainboard.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/mainboard/cavium/cn8100_sff_evb/mainboard.c b/src/mainboard/cavium/cn8100_sff_evb/mainboard.c index 1c2c4365d2..135d608cdb 100644 --- a/src/mainboard/cavium/cn8100_sff_evb/mainboard.c +++ b/src/mainboard/cavium/cn8100_sff_evb/mainboard.c @@ -23,6 +23,59 @@ #include <soc/gpio.h> #include <delay.h> #include <soc/uart.h> +#include <console/console.h> +#include <soc/clock.h> +#include <soc/gpio.h> +#include <soc/timer.h> +#include <soc/cpu.h> +#include <soc/sdram.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 : %llu MHz\n", + thunderx_get_ref_clock() / 1000000ULL); + + printk(BIOS_INFO, "MB: IOclk : %llu MHz\n", + thunderx_get_io_clock() / 1000000ULL); + + printk(BIOS_INFO, "MB: COREclk : %llu MHz\n", + thunderx_get_core_clock() / 1000000ULL); + + printk(BIOS_INFO, "MB: #CPU cores : %zu\n", + cpu_get_num_cores()); + + printk(BIOS_INFO, "MB: RAM : %zu MiB\n", + sdram_size_mb()); +} extern const struct bdk_devicetree_key_value devtree[]; @@ -215,6 +268,8 @@ static void mainboard_enable(struct device *dev) gpio_output(10, 0); udelay(100); gpio_output(10, 1); + + mainboard_print_info(); } struct chip_operations mainboard_ops = { |