1 /* 2 * Copyright (c) 2016-2017, Texas Instruments Incorporated 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <zephyr/kernel.h> 8 #include <zephyr/device.h> 9 #include <zephyr/init.h> 10 #include <soc.h> 11 #include <driverlib/rom.h> 12 #include <driverlib/rom_map.h> 13 #include <driverlib/prcm.h> 14 15 /* Overrides the weak ARM implementation */ sys_arch_reboot(int type)16void sys_arch_reboot(int type) 17 { 18 MAP_PRCMMCUReset(!!type); 19 } 20 ti_cc32xx_init(void)21static int ti_cc32xx_init(void) 22 { 23 24 /* Note: This function also performs CC3220 Initialization */ 25 MAP_PRCMCC3200MCUInit(); 26 27 #ifdef CONFIG_UART_CC32XX 28 /* 29 * Enable Peripheral Clocks, ensuring UART can wake the processor from 30 * idle (after ARM wfi instruction) 31 */ 32 MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK | 33 PRCM_SLP_MODE_CLK); 34 #endif 35 36 return 0; 37 } 38 39 SYS_INIT(ti_cc32xx_init, PRE_KERNEL_1, 0); 40