You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.3 KiB
76 lines
1.3 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2014-2020. All rights reserved.
|
|
* Description: init
|
|
* Author: SmartMedia_BSP
|
|
* Create: 2014-06-04
|
|
*/
|
|
|
|
#include <boot.h>
|
|
#include <malloc.h>
|
|
#include <linux/module.h>
|
|
#include <platform.h>
|
|
#include <testcode.h>
|
|
#include <timer.h>
|
|
#include "uapi_otp.h"
|
|
|
|
int boot_start(void)
|
|
{
|
|
#ifdef CONFIG_UART
|
|
uart_init();
|
|
#endif
|
|
clock_tick_init(CONFIG_CLOCK_TICK); /* delay timer */
|
|
sysmem_init();
|
|
module_init();
|
|
|
|
#ifdef CONFIG_TEST
|
|
do_testcase();
|
|
#endif
|
|
|
|
#if (defined(CONFIG_BOOTROM_SUPPORT) || defined(CONFIG_BOOTROM_CA_SUPPORT))
|
|
start_bootstrap(NULL);
|
|
#endif
|
|
|
|
#ifdef CONFIG_NET
|
|
eth_config_init();
|
|
#endif
|
|
#ifdef CFG_SOCT_AB_STARTUP_SUPPORT
|
|
key_area_init();
|
|
#endif
|
|
|
|
#if (defined(CONFIG_SOCT_UEFIBOOT_SUPPORT) && defined(CONFIG_SOCT_TEE_SUPPORT))
|
|
otp_enable_tee();
|
|
#endif
|
|
|
|
#if (defined(CFG_SOCT_FBL_AB_SUPPORT) || defined(CFG_SOCT_AB_STARTUP_SUPPORT))
|
|
bootargs_prepare();
|
|
#endif
|
|
|
|
boot_second_bootloader();
|
|
|
|
#ifdef CONFIG_DEBUG
|
|
resmem_dump(
|
|
#ifndef CONFIG_RESERVE_MEMORY_DEBUG
|
|
0
|
|
#else
|
|
1
|
|
#endif
|
|
);
|
|
#endif
|
|
|
|
#ifdef CONFIG_CMDLINE
|
|
start_cmdline();
|
|
#endif
|
|
|
|
reset_cpu(0);
|
|
reset_cpu(0);
|
|
reset_cpu(0);
|
|
reset_cpu(0);
|
|
|
|
return 0;
|
|
}
|
|
|
|
int raise(int signun)
|
|
{
|
|
return 0;
|
|
}
|