]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
event: Use an event to replace last_stage_init()
authorSimon Glass <sjg@chromium.org>
Tue, 22 Aug 2023 03:17:01 +0000 (21:17 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 31 Aug 2023 17:16:55 +0000 (13:16 -0400)
Add a new event which handles this function. Convert existing use of
the function to use the new event instead.

Make sure that EVENT is enabled by affected boards, by selecting it from
the LAST_STAGE_INIT option. For x86, enable it by default since all boards
need it.

For controlcenterdc, inline the get_tpm() function and make sure the event
is not built in SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
54 files changed:
arch/Kconfig
arch/mips/mach-mtmips/cpu.c
arch/mips/mach-pic32/cpu.c
arch/x86/cpu/coreboot/coreboot.c
arch/x86/cpu/cpu.c
arch/x86/cpu/efi/payload.c
arch/x86/cpu/quark/quark.c
board/CZ.NIC/turris_mox/turris_mox.c
board/Marvell/mvebu_armada-37xx/board.c
board/Marvell/octeon_nic23/board.c
board/Marvell/octeontx2/board.c
board/cortina/presidio-asic/presidio.c
board/emulation/qemu-ppce500/qemu-ppce500.c
board/gdsys/a38x/controlcenterdc.c
board/gdsys/mpc8308/gazerbeam.c
board/ge/bx50v3/bx50v3.c
board/keymile/km83xx/km83xx.c
board/keymile/kmcent2/kmcent2.c
board/keymile/pg-wcom-ls102xa/pg-wcom-ls102xa.c
board/phytium/durian/durian.c
board/phytium/pomelo/pomelo.c
common/Kconfig
common/board_r.c
common/event.c
configs/bayleybay_defconfig
configs/cherryhill_defconfig
configs/chromebook_coral_defconfig
configs/chromebook_link64_defconfig
configs/chromebook_link_defconfig
configs/chromebook_samus_defconfig
configs/chromebook_samus_tpl_defconfig
configs/chromebox_panther_defconfig
configs/conga-qeval20-qa3-e3845-internal-uart_defconfig
configs/conga-qeval20-qa3-e3845_defconfig
configs/coreboot64_defconfig
configs/coreboot_defconfig
configs/cougarcanyon2_defconfig
configs/crownbay_defconfig
configs/dfi-bt700-q7x-151_defconfig
configs/edison_defconfig
configs/efi-x86_app32_defconfig
configs/efi-x86_app64_defconfig
configs/efi-x86_payload32_defconfig
configs/efi-x86_payload64_defconfig
configs/galileo_defconfig
configs/minnowmax_defconfig
configs/qemu-x86_64_defconfig
configs/qemu-x86_defconfig
configs/som-db5800-som-6867_defconfig
configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig
configs/theadorable-x86-conga-qa3-e3845_defconfig
configs/theadorable-x86-dfi-bt700_defconfig
include/event.h
include/init.h

index c9a3359225288bb08bbcc7c54e39457c19630efc..90345cbee0d848397a4b8a189adc605c8b046036 100644 (file)
@@ -252,6 +252,7 @@ config X86
        imply DM_SPI
        imply DM_SPI_FLASH
        imply DM_USB
+       imply LAST_STAGE_INIT
        imply VIDEO
        imply SYSRESET
        imply SPL_SYSRESET
index f1e90227386337c12b670509dd935950d6fe2e36..e88dab10c76e5b6fb9b0ff54c15374be18a69eae 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <event.h>
 #include <init.h>
 #include <malloc.h>
 #include <asm/addrspace.h>
@@ -21,7 +22,8 @@ int dram_init(void)
        return 0;
 }
 
-int last_stage_init(void)
+#ifndef CONFIG_SPL_BUILD
+static int last_stage_init(void)
 {
        void *src, *dst;
 
@@ -46,3 +48,5 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
+#endif
index 785a87b618b651fc78c93d695155a032f7f149fc..7ed306e045ea762e44530a6042250930a54730a0 100644 (file)
@@ -57,7 +57,7 @@ static ulong clk_get_cpu_rate(void)
 }
 
 /* initialize prefetch module related to cpu_clk */
-static void prefetch_init(void)
+static int prefetch_init(void)
 {
        struct pic32_reg_atomic *regs;
        const void __iomem *base;
@@ -93,6 +93,8 @@ static void prefetch_init(void)
        /* Enable prefetch for all */
        writel(0x30, &regs->set);
        iounmap(regs);
+
+       return 0;
 }
 
 /* arch-specific CPU init after DM: flash prefetch */
index d7eedbd7436ef6a01c486319f19bf13be66199df..835b2c777462786af8ee4df87ca05d5a63e09047 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <event.h>
 #include <fdtdec.h>
 #include <init.h>
 #include <usb.h>
@@ -74,8 +75,11 @@ static void board_final_init(void)
        }
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
+       if (IS_ENABLED(CONFIG_SPL_BUILD))
+               return 0;
+
        /* start usb so that usb keyboard can be used as input device */
        if (IS_ENABLED(CONFIG_USB_KEYBOARD))
                usb_init();
@@ -84,3 +88,4 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
index dddd281e966cbea276b183d99ce857a681953864..ce55efc454bfa35b7939e300737b9ddb8bcb26fc 100644 (file)
@@ -26,6 +26,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <event.h>
 #include <init.h>
 #include <irq.h>
 #include <log.h>
@@ -185,7 +186,8 @@ void show_boot_progress(int val)
 }
 #endif
 
-#if !defined(CONFIG_SYS_COREBOOT) && !defined(CONFIG_EFI_STUB)
+#if !defined(CONFIG_SYS_COREBOOT) && !defined(CONFIG_EFI_STUB) && \
+       !defined(CONFIG_SPL_BUILD)
 /*
  * Implement a weak default function for boards that need to do some final init
  * before the system is ready.
@@ -202,7 +204,7 @@ __weak void board_final_cleanup(void)
 {
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        struct acpi_fadt __maybe_unused *fadt;
        int ret;
@@ -245,7 +247,9 @@ int last_stage_init(void)
 
        return 0;
 }
-#endif
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
+
+#endif  /* !SYS_COREBOOT && !EFI_STUB && !SPL_BUILD */
 
 static int x86_init_cpus(void)
 {
index d8920effd3987f92b13ca5f9bced939545f4efeb..708bfbe7ee488d6f6e8a9915a9eb89bcdd8238e8 100644 (file)
@@ -9,6 +9,7 @@
 #include <efi.h>
 #include <efi_api.h>
 #include <errno.h>
+#include <event.h>
 #include <init.h>
 #include <log.h>
 #include <usb.h>
@@ -168,7 +169,7 @@ int reserve_arch(void)
        return 0;
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        /* start usb so that usb keyboard can be used as input device */
        if (IS_ENABLED(CONFIG_USB_KEYBOARD))
@@ -176,6 +177,7 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
 unsigned int install_e820_map(unsigned int max_entries,
                              struct e820_entry *entries)
index 86d90d84ddba6224736aaa2d48ed59be5c823cd1..62b83c228cfba3ac22f344bce947eb457343dd4a 100644 (file)
@@ -107,7 +107,7 @@ static void quark_setup_bars(void)
                       CONFIG_PCIE_ECAM_BASE | MEM_BAR_EN);
 }
 
-static void quark_pcie_early_init(void)
+static int quark_pcie_early_init(void)
 {
        /*
         * Step1: Assert PCIe signal PERST#
@@ -146,6 +146,8 @@ static void quark_pcie_early_init(void)
        /* Mixer Load Lane 1 */
        msg_port_io_clrbits(MSG_PORT_PCIE_AFE, PCIE_RXPICTRL0_L1,
                            (1 << 6) | (1 << 7));
+
+       return 0;
 }
 
 static void quark_usb_early_init(void)
index a52a032e4d5d1674427e398ddfb1e181e68e1633..370c2668b081e68f5d94483fce0515846d30b7e1 100644 (file)
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <dm/of_extra.h>
 #include <env.h>
+#include <event.h>
 #include <fdt_support.h>
 #include <init.h>
 #include <led.h>
@@ -667,7 +668,7 @@ err:
        return NULL;
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        struct gpio_desc reset_gpio = {};
 
@@ -712,6 +713,7 @@ handle_reset_btn:
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 
index 3ab6e8873d8464e53daa31f078b308cf8e9747c3..3fe5319437ea739f096bef6f210fe3c19a6b1b48 100644 (file)
@@ -8,6 +8,7 @@
 #include <dm/device-internal.h>
 #include <env.h>
 #include <env_internal.h>
+#include <event.h>
 #include <i2c.h>
 #include <init.h>
 #include <mmc.h>
@@ -301,7 +302,7 @@ static int mii_multi_chip_mode_write(struct udevice *bus, int dev_smi_addr,
 }
 
 /* Bring-up board-specific network stuff */
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        struct udevice *bus;
        ofnode node;
@@ -356,6 +357,8 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
+
 #endif
 
 #ifdef CONFIG_OF_BOARD_SETUP
index 08b1aa4b6efe0c8ba5cb72d5841d7080cd38080a..bc9332cb74a394e4ef78880c7251e63b596e6c8b 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <cyclic.h>
 #include <dm.h>
+#include <event.h>
 #include <ram.h>
 #include <time.h>
 #include <asm/gpio.h>
@@ -364,7 +365,7 @@ int board_late_init(void)
        return 0;
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        struct gpio_desc gpio = {};
        ofnode node;
@@ -386,3 +387,4 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
index e7899f49f0c25d31e0edf5e16d9f18046f8119f7..974e9eb82001c24eb1d1ba70c4ac16e3224f8f39 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/global_data.h>
 #include <dm/uclass-internal.h>
 #include <env.h>
+#include <event.h>
 #include <init.h>
 #include <malloc.h>
 #include <net.h>
@@ -213,11 +214,12 @@ void board_acquire_flash_arb(bool acquire)
        }
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        (void)smc_flsf_fw_booted();
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
 static int do_go_uboot(struct cmd_tbl *cmdtp, int flag, int argc,
                       char *const argv[])
index aae0a5dac066f159fdbae56cfacdf2e130beee07..fdfa3affc3b134378ab4b33f377ef7191dacfa4a 100644 (file)
@@ -4,6 +4,7 @@
  *
  */
 #include <common.h>
+#include <event.h>
 #include <init.h>
 #include <malloc.h>
 #include <errno.h>
@@ -121,7 +122,7 @@ void reset_cpu(void)
 }
 
 #ifdef CONFIG_LAST_STAGE_INIT
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        u32 val;
 
@@ -134,4 +135,5 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 #endif
index a39bcb4fa0c7f7d8323234ca1e9461b82cf77be3..7ca8773b17e5a73ed6839989a2cfc060583b11af 100644 (file)
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <env.h>
+#include <event.h>
 #include <init.h>
 #include <log.h>
 #include <net.h>
@@ -184,7 +185,7 @@ int misc_init_r(void)
        return 0;
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        void *fdt = get_fdt_virt();
        int len = 0;
@@ -204,6 +205,7 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
 static uint64_t get_linear_ram_size(void)
 {
index ccebba72721f292199a8a193e693fd051d2126fe..0f620c2d91728f9fc76d4c77bc255f335b45ba25 100644 (file)
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <event.h>
 #include <init.h>
 #include <miiphy.h>
 #include <net.h>
@@ -35,19 +36,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define DB_GP_88F68XX_GPP_POL_LOW      0x0
 #define DB_GP_88F68XX_GPP_POL_MID      0x0
 
-static int get_tpm(struct udevice **devp)
-{
-       int rc;
-
-       rc = uclass_first_device_err(UCLASS_TPM, devp);
-       if (rc) {
-               printf("Could not find TPM (ret=%d)\n", rc);
-               return CMD_RET_FAILURE;
-       }
-
-       return 0;
-}
-
 /*
  * Define the DDR layout / topology here in the board file. This will
  * be used by the DDR3 init code in the SPL U-Boot version to configure
@@ -284,15 +272,22 @@ int board_fix_fdt(void *rw_fdt_blob)
        return 0;
 }
 
-int last_stage_init(void)
+#ifndef CONFIG_SPL_BUILD
+static int last_stage_init(void)
 {
        struct udevice *tpm;
        int ret;
 
-#ifndef CONFIG_SPL_BUILD
+       if (IS_ENABLED(CONFIG_SPL_BUILD))
+               return 0;
        ccdc_eth_init();
-#endif
-       ret = get_tpm(&tpm);
+
+       ret = uclass_first_device_err(UCLASS_TPM, &tpm);
+       if (ret) {
+               printf("Could not find TPM (ret=%d)\n", ret);
+               return ret;
+       }
+
        if (ret || tpm_init(tpm) || tpm1_startup(tpm, TPM_ST_CLEAR) ||
            tpm1_continue_self_test(tpm)) {
                return 1;
@@ -305,3 +300,5 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
+#endif
index ba88401f13da5841ee91cc335a095387e16ac0ce..cc608c4ac434a95ffed6cbc85fff8a65e3598b00 100644 (file)
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <dm.h>
 #include <env.h>
+#include <event.h>
 #include <fdt_support.h>
 #include <fsl_esdhc.h>
 #include <init.h>
@@ -124,7 +125,7 @@ static void display_osd_info(struct udevice *osd,
               osd_info->width, osd_info->height);
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        int fpga_hw_rev = 0;
        int i;
@@ -179,6 +180,7 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
index 4e9d841fe29169c7e9ad562c95a5860889633749..2d8951964a85c4dd9222fd6d2b330edc54f9f254 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright 2012 Freescale Semiconductor, Inc.
  */
 
+#include <event.h>
 #include <image.h>
 #include <init.h>
 #include <asm/arch/clock.h>
@@ -531,7 +532,7 @@ static void remove_ethaddr_env_var(int index)
        env_set(env_var_name, NULL);
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        int i;
 
@@ -544,6 +545,7 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
 int checkboard(void)
 {
index 8f2d873bc68f9ee4d7eeff046942f57fd58ac221..acd13105dd55e729d9977b85ac9c2bf13462d9b0 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <event.h>
 #include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
@@ -184,7 +185,7 @@ int misc_init_r(void)
        return 0;
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
 #if defined(CONFIG_TARGET_KMCOGE5NE)
        /*
@@ -202,6 +203,7 @@ int last_stage_init(void)
        set_km_env();
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
 static int fixed_sdram(void)
 {
index 7e655175c57776b10161280517d7cc0ad1d48f04..572cc7bbdc67f82610d4a8f460f0dc14ca5dd194 100644 (file)
@@ -261,7 +261,7 @@ int hush_init_var(void)
        return 0;
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        const char *kmem;
        /* DIP switch support on BFTIC */
@@ -287,6 +287,7 @@ int last_stage_init(void)
 
        return 0;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
 void fdt_fixup_fman_mac_addresses(void *blob)
 {
index d7f47959ebd7811724c58359834c91ed4dd82a94..21c21aac221f907f5fd2821c1f233140f380d465 100644 (file)
@@ -215,8 +215,4 @@ int hush_init_var(void)
        return 0;
 }
 
-int last_stage_init(void)
-{
-       set_km_env();
-       return 0;
-}
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, set_km_env);
index ee484749bcf1b05581e434f7b0e122987c8dea0c..0a4048d4982fea354e6e6d4f1883cddf5ad21800 100644 (file)
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <event.h>
 #include <init.h>
 #include <log.h>
 #include <asm/armv8/mmu.h>
@@ -99,7 +100,7 @@ int __asm_flush_l3_dcache(void)
        return 0;
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        int ret;
 
@@ -113,3 +114,4 @@ int last_stage_init(void)
        }
        return ret;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
index 75d2636bf4533c71309bfbcdf8aff684dd9ef91c..960e491c7687adacfa0a5aa4699639e92afd0551 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <stdio.h>
 #include <command.h>
+#include <event.h>
 #include <init.h>
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
@@ -102,7 +103,7 @@ int __asm_flush_l3_dcache(void)
        return 0;
 }
 
-int last_stage_init(void)
+static int last_stage_init(void)
 {
        int ret;
 
@@ -116,3 +117,4 @@ int last_stage_init(void)
        }
        return ret;
 }
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
index 0b09bd68bd13d5acb673732a03fe24b7dde3afc4..d916194b9423fd5972c3ca4311070cdc7b89d4b4 100644 (file)
@@ -720,6 +720,7 @@ config SYS_FSL_CLK
 
 config LAST_STAGE_INIT
        bool "Call board-specific as last setup step"
+       select EVENT
        help
          Some boards need to perform initialisation immediately before control
          is passed to the command-line interpreter (e.g. for initializations
index 7c1fbc69ed6d696838cff3afde8d13cfe608322a..ad9a3cf6336a0fef2ca59a09fd37806fb1775c9f 100644 (file)
@@ -773,15 +773,8 @@ static init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_POST
        initr_post,
 #endif
-#ifdef CONFIG_LAST_STAGE_INIT
        INIT_FUNC_WATCHDOG_RESET
-       /*
-        * Some parts can be only initialized if all others (like
-        * Interrupts) are up and running (i.e. the PC-style ISA
-        * keyboard).
-        */
-       last_stage_init,
-#endif
+       INITCALL_EVENT(EVT_LAST_STAGE_INIT),
 #if defined(CFG_PRAM)
        initr_mem,
 #endif
index 8a61908888454c4b32b5141bcf817c3934ca93e2..4845104b17dc69271fbf89bfe05dda6f4853cd51 100644 (file)
@@ -36,6 +36,7 @@ const char *const type_name[] = {
        /* init hooks */
        "misc_init_f",
        "fsp_init_r",
+       "last_stage_init",
 
        /* Fpga load hook */
        "fpga_load",
index a44c9b714be6880a53ca0a9888a1efc1cd2299b9..573f1b48645a95f024939b553b5b8e9de500a5d0 100644 (file)
@@ -25,7 +25,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 00799715e8f91d40acd87c80d8b0f2198694e775..59c3986a2e78ccf7a966807cac97d26776737839 100644 (file)
@@ -18,7 +18,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 152f297c350b5f35f1f677423a37fda02c5c0d87..5394396f8fc676166ed30b513f8bc45d0e81e531 100644 (file)
@@ -40,7 +40,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_LOG=y
 CONFIG_LOGF_FUNC=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_BLOBLIST=y
 # CONFIG_TPL_BLOBLIST is not set
 CONFIG_BLOBLIST_ADDR=0x100000
index 558609e13d667c9b61374a882411db128e1c2dd3..eb8923ceeff7759c6cb9dfad63871d98dd4e8f8c 100644 (file)
@@ -29,7 +29,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_MISC_INIT_R=y
 CONFIG_SPL_NO_BSS_LIMIT=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
index 96c26f1c37765130bbca2e2493c22577bbff51b1..4347cad33db1cc0a3dd9b620e1a65ae94b0fc2fd 100644 (file)
@@ -25,7 +25,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_MISC_INIT_R=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
index 4019c169a4c7de1ad3da0889843df5804c34add1..3b6a1732c11139a4f44f089a34bb7095778853b6 100644 (file)
@@ -25,7 +25,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_MISC_INIT_R=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
index 4cfaf4bc5c79542e755d659d7e3e4b87e526c890..33ada9fe4f93150995a3d088a0468b956db6c6b8 100644 (file)
@@ -30,7 +30,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_MISC_INIT_R=y
 CONFIG_BLOBLIST=y
 CONFIG_BLOBLIST_ADDR=0xff7c0000
index f050d066be414c5e2293381bcc9735e1a5127f65..4351a811528bd0111162f720fa876e903551bd3b 100644 (file)
@@ -21,7 +21,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_MISC_INIT_R=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
index 656d575998c722191ee1971042612325affdb4f8..1515246086ea2302a559e47d0f17a5eca0744f99 100644 (file)
@@ -31,7 +31,6 @@ CONFIG_BOOTCOMMAND="load scsi 0:2 03000000 /boot/vmlinuz-${kernel-ver}-generic;l
 CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 54dc59e8a13477b5ea6792ffec0780a9cbeaefda..d62fb997c993a9447b13f90546f48361ba380a3f 100644 (file)
@@ -27,7 +27,6 @@ CONFIG_BOOTCOMMAND="load scsi 0:2 03000000 /boot/vmlinuz-${kernel-ver}-generic;l
 CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 8aadaa68c279fbd074676913dd69b042c71950af..2793e2c0b9d1b4bbd63aced7ead5ac94c5ed4050 100644 (file)
@@ -19,7 +19,6 @@ CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_PRE_CONSOLE_BUFFER=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_SPL_NO_BSS_LIMIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
index 8e11de6638190fa98ce33ae619011f89c19c224f..f196ed776d0b1138163e7a73d2dd9aa99b15860b 100644 (file)
@@ -20,7 +20,6 @@ CONFIG_LOG=y
 CONFIG_LOGF_LINE=y
 CONFIG_LOGF_FUNC=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_PCI_INIT_R=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
index da5ff5573d0563c5851dd7ad29e9276b01d9a21a..71c79f5fb8dad22ce5c916f244e717013ab94c73 100644 (file)
@@ -20,7 +20,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 70e1a50a244eb622380921bd785674dd9e841160..e734c758dac84b02e6e02e4e6b0abc7497e1ca79 100644 (file)
@@ -21,7 +21,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 9313e7fbd1217a80327ee2beff2604bf68ac1335..79f5d74ec5971ec81bf837a86f164570c78e87eb 100644 (file)
@@ -26,7 +26,6 @@ CONFIG_BOOTCOMMAND="load scsi 0:1 03000000 /boot/vmlinuz-${kernel-ver}-generic;l
 CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 8692a8a9995aae44dd859bfd8eba21f5a2ada99a..f134680e4122678405dd6d3683ce90fd4e7ce7a7 100644 (file)
@@ -13,7 +13,6 @@ CONFIG_TARGET_EDISON=y
 CONFIG_SMP=y
 CONFIG_SYS_MONITOR_BASE=0x01101000
 CONFIG_BOARD_EARLY_INIT_R=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_MAXARGS=128
 CONFIG_SYS_CBSIZE=2048
index 1bfc01f060d42901091bae6c772a07bb756c452d..dfc315774a50b1529e44f3419bb29bd5de11a883 100644 (file)
@@ -16,7 +16,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_BOOTZ=y
index 46a1900c704bd0f54bc9942595da7a72719aaab2..e0cfe3ee243a672f39c378ea80c85b66e9b1d005 100644 (file)
@@ -17,7 +17,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_BOOTZ=y
index 4149eea6cf645ba4293b0e31b9e65e53a9c156a9..15323678e31470fa94d163dd5dbf4dd54ca6d034 100644 (file)
@@ -15,7 +15,6 @@ CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_PRE_CONSOLE_BUFFER=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_IDE=y
index d41f73cccfc9133d201041419fb2925525df4c53..80460d336fb1882035df00aabfd68644d2a2729b 100644 (file)
@@ -15,7 +15,6 @@ CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_PRE_CONSOLE_BUFFER=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_IDE=y
index c6d989ea6ef33658fa0e930c0b05bd2173624053..c226ae11a81885feed4161d96d8bb092c5b7155e 100644 (file)
@@ -17,7 +17,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 8347a9dcecf9edcc2e74b9aaf58274352b385058..80e6a4c12b9e53881353cbc433c3970a7a93f83c 100644 (file)
@@ -30,7 +30,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_MISC_INIT_R=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
index c6f30674a8fcd6ed61467bc63eab920100449135..165f0b512c8bb3117dd287fe0b11257eb98f844d 100644 (file)
@@ -33,7 +33,6 @@ CONFIG_LOG=y
 CONFIG_LOGF_FUNC=y
 CONFIG_SPL_LOG=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_PCI_INIT_R=y
 CONFIG_BLOBLIST=y
 CONFIG_BLOBLIST_ADDR=0x10000
@@ -84,11 +83,11 @@ CONFIG_SPL_DM_RTC=y
 CONFIG_SYS_NS16550_PORT_MAPPED=y
 CONFIG_SPI=y
 CONFIG_USB_KEYBOARD=y
-CONFIG_SPL_VIDEO=y
 CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
 CONFIG_FRAMEBUFFER_VESA_MODE_USER=y
 CONFIG_FRAMEBUFFER_VESA_MODE=0x144
 CONFIG_CONSOLE_SCROLL_LINES=5
+CONFIG_SPL_VIDEO=y
 # CONFIG_SPL_USE_TINY_PRINTF is not set
 CONFIG_GENERATE_ACPI_TABLE=y
 # CONFIG_GZIP is not set
index 24682a5387dfe514217bbafa692100e983d4f0f5..4b2787d4aaefe30b4a7e44650a373fe8025961ff 100644 (file)
@@ -23,7 +23,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_LOG=y
 CONFIG_LOGF_FUNC=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_PCI_INIT_R=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 4a149133db604d3bbbc8ba04f2b2cfd9d9a3c5aa..44db48204bd8a24eea4bb02be2ee9b6083dfbaf6 100644 (file)
@@ -27,7 +27,6 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 69499e17f4c9446c4f0398e2d225447376725f57..c5bd0d9673660459c942247cd0b5169e5ad7f286 100644 (file)
@@ -26,7 +26,6 @@ CONFIG_SHOW_BOOT_PROGRESS=y
 CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index e2e64b743494d5ba4b9509d499f155fa5109e890..b3afaf34a02f3a2eb06a9c80df4805be466b5ef8 100644 (file)
@@ -25,7 +25,6 @@ CONFIG_SHOW_BOOT_PROGRESS=y
 CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 751ae3497ec6ffee19b5dee09677c5307dc9c3cd..8222697f74713c15014b5d37cd1fdcc27ebfcced 100644 (file)
@@ -24,7 +24,6 @@ CONFIG_SHOW_BOOT_PROGRESS=y
 CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PBSIZE=532
 CONFIG_CMD_CPU=y
index 85269aa317aa08f4b563f91330a8ddf4fd362dfb..747a9f6c654bbdef101129e3ee435142df28420c 100644 (file)
@@ -41,6 +41,18 @@ enum event_t {
         */
        EVT_FSP_INIT_F,
 
+       /*
+        * Emitted just before jumping to the main loop
+        *
+        * Some boards need to perform initialisation immediately before control
+        * is passed to the command-line interpreter (e.g. for init that depend
+        * on later phases in the init sequence).
+        *
+        * Some parts can be only initialized if all others (like Interrupts)
+        * are up and running (e.g. the PC-style ISA keyboard).
+        */
+       EVT_LAST_STAGE_INIT,
+
        /* Fpga load hook */
        EVT_FPGA_LOAD,
 
index 13579db7590039c3521b00ba9095ed1aa843ad0b..4e7fe26c200445fed03926abe09d910721fe2315 100644 (file)
@@ -270,7 +270,6 @@ void board_init_r(struct global_data *id, ulong dest_addr)
        __attribute__ ((noreturn));
 
 int cpu_init_r(void);
-int last_stage_init(void);
 int mac_read_from_eeprom(void);
 int set_cpu_clk_info(void);
 int update_flash_size(int flash_size);