]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Allow a UART to be set up before the FSP is ready
authorSimon Glass <sjg@chromium.org>
Wed, 28 Jan 2015 05:13:42 +0000 (22:13 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 10:59:10 +0000 (12:59 +0200)
Since the FSP is a black box it helps to have some sort of debugging
available to check its inputs. If the debug UART is in use, set it up
after CAR is available.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/include/asm/u-boot-x86.h
arch/x86/lib/fsp/fsp_support.c

index b98afa801d3a60849c58d01d3955965bbc5bc99d..5d7dff534d7e9a65f473a799542201d5a171fbcb 100644 (file)
@@ -45,6 +45,9 @@ ulong board_get_usable_ram_top(ulong total_size);
 void dram_init_banksize(void);
 int default_print_cpuinfo(void);
 
+/* Set up a UART which can be used with printch(), printhex8(), etc. */
+int setup_early_uart(void);
+
 void setup_pcat_compatibility(void);
 
 void isa_unmap_rom(u32 addr);
index 8b639f78197106e0010cb0c32d7b5ecf2e1dae3e..5f96da120ea19d5d429e2834f6963bb6d1a11a88 100644 (file)
@@ -124,6 +124,10 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
        struct fsp_init_params *params_ptr;
        struct upd_region *fsp_upd;
 
+#ifdef CONFIG_DEBUG_UART
+       setup_early_uart();
+#endif
+
        fsp_hdr = find_fsp_header();
        if (fsp_hdr == NULL) {
                /* No valid FSP info header was found */