diff options
author | Ye Li <ye.li@nxp.com> | 2020-04-28 06:25:37 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2022-04-06 18:03:39 +0800 |
commit | dc6e76f76f911bce499ce6261769dc1f7b832042 (patch) | |
tree | e581be4a07dd1010f0cf81852e0993d29c3f875c /board/freescale/imx8qm_val/spl.c | |
parent | 47ec77729422a88cb830833220fe95917be8fc98 (diff) |
MLK-23574-45 imx8qm: Add LPDDR4 and DDR4 validation boards support
Porting board codes, configurations and DTS for the LPDDR4 and DDR4
validation boards from imx_v2019.04
Supported modules
- Flexspi, eMMC/SD, ENET0, UART, USB, legacy PCI driver,
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d3caa8f4f73af21cebb02ab766ed34f181641abc)
(cherry picked from commit 187f037e2a3048f9c8e7bd1c45ca09f7ad700f41)
(cherry picked from commit 3a495778fb35e23f8bf6a330b998202527071fd6)
Diffstat (limited to 'board/freescale/imx8qm_val/spl.c')
-rw-r--r-- | board/freescale/imx8qm_val/spl.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/board/freescale/imx8qm_val/spl.c b/board/freescale/imx8qm_val/spl.c new file mode 100644 index 00000000000..1d930304872 --- /dev/null +++ b/board/freescale/imx8qm_val/spl.c @@ -0,0 +1,66 @@ +/* + * Copyright 2018 NXP + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <dm.h> +#include <image.h> +#include <init.h> +#include <log.h> +#include <spl.h> +#include <asm/global_data.h> +#include <dm/uclass.h> +#include <dm/device.h> +#include <dm/uclass-internal.h> +#include <dm/device-internal.h> +#include <dm/lists.h> +#include <bootm.h> + +DECLARE_GLOBAL_DATA_PTR; + +void spl_board_init(void) +{ + struct udevice *dev; + + uclass_find_first_device(UCLASS_MISC, &dev); + + for (; dev; uclass_find_next_device(&dev)) { + if (device_probe(dev)) + continue; + } + + board_early_init_f(); + + timer_init(); + + preloader_console_init(); + + puts("Normal Boot\n"); +} + +void spl_board_prepare_for_boot(void) +{ + board_quiesce_devices(); +} + +#ifdef CONFIG_SPL_LOAD_FIT +int board_fit_config_name_match(const char *name) +{ + /* Just empty function now - can't decide what to choose */ + debug("%s: %s\n", __func__, name); + + return 0; +} +#endif + +void board_init_f(ulong dummy) +{ + /* Clear the BSS. */ + memset(__bss_start, 0, __bss_end - __bss_start); + + arch_cpu_init(); + + board_init_r(NULL, 0); +} |