1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #include <kernel.h>
- #include <device.h>
- #include <string.h>
- #include "soc_boot.h"
- #include <linker/linker-defs.h>
-
-
- uint32_t soc_boot_get_part_tbl_addr(void)
- {
- return soc_boot_get_info()->param_phy_addr;
- }
- uint32_t soc_boot_get_fw_ver_addr(void)
- {
- return (soc_boot_get_part_tbl_addr() + SOC_BOOT_FIRMWARE_VERSION_OFFSET);
- }
- const boot_info_t *soc_boot_get_info(void)
- {
- return (const boot_info_t *)BOOT_INFO_SRAM_ADDR;
- }
- uint32_t soc_boot_get_nandid_tbl_addr(void)
- {
- const boot_info_t *p_boot_info = soc_boot_get_info();
- return p_boot_info->nand_id_offs;
- }
- u32_t soc_boot_get_reboot_reason(void)
- {
- const boot_info_t *p_boot_info = soc_boot_get_info();
- return p_boot_info->reboot_reason;
- }
- bool soc_boot_get_watchdog_is_reboot(void)
- {
- const boot_info_t *p_boot_info = soc_boot_get_info();
- return !!p_boot_info->watchdog_reboot;
- }
|