1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * Description: reset 15 * 16 * Create: 2023-01-09 17 */ 18 19 #include "boot_reset.h" 20 #include "boot_def.h" 21 #include "boot_init.h" 22 #include "non_os.h" 23 24 #ifdef SUPPORT_GPIO 25 #include "hal_gpio.h" 26 #endif reset(void)27void reset(void) 28 { 29 update_reset_count(); 30 uapi_reg_write16(BOOT_PORTING_RESET_REG, BOOT_PORTING_RESET_VALUE); 31 for (;;) { } 32 } 33 boot_fail(void)34void boot_fail(void) 35 { 36 /* wait for it... */ 37 for (;;) { } 38 }