| /* |
| * Copyright (c) 2016-2017, Texas Instruments Incorporated |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| #include <zephyr/kernel.h> |
| #include <zephyr/device.h> |
| #include <zephyr/init.h> |
| #include <soc.h> |
| #include <driverlib/rom.h> |
| #include <driverlib/rom_map.h> |
| #include <driverlib/prcm.h> |
| |
| /* Overrides the weak ARM implementation */ |
| void sys_arch_reboot(int type) |
| { |
| MAP_PRCMMCUReset(!!type); |
| } |
| |
| void soc_early_init_hook(void) |
| { |
| |
| /* Note: This function also performs CC3220 Initialization */ |
| MAP_PRCMCC3200MCUInit(); |
| |
| #ifdef CONFIG_UART_CC32XX |
| /* |
| * Enable Peripheral Clocks, ensuring UART can wake the processor from |
| * idle (after ARM wfi instruction) |
| */ |
| MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK | |
| PRCM_SLP_MODE_CLK); |
| #endif |
| } |