2016-10-26 07:49:35 +08:00
|
|
|
/*
|
2017-04-19 05:08:56 +08:00
|
|
|
* Copyright (c) 2016-2017, Texas Instruments Incorporated
|
2016-10-26 07:49:35 +08:00
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-10-26 07:49:35 +08:00
|
|
|
*/
|
|
|
|
|
2016-12-23 21:35:34 +08:00
|
|
|
#include <kernel.h>
|
2016-10-26 07:49:35 +08:00
|
|
|
#include <device.h>
|
|
|
|
#include <init.h>
|
|
|
|
#include <soc.h>
|
2016-12-13 07:19:42 +08:00
|
|
|
#include <driverlib/rom.h>
|
|
|
|
#include <driverlib/rom_map.h>
|
|
|
|
#include <driverlib/prcm.h>
|
2016-10-26 07:49:35 +08:00
|
|
|
|
2017-04-19 05:08:56 +08:00
|
|
|
static int ti_cc32xx_init(struct device *arg)
|
2016-10-26 07:49:35 +08:00
|
|
|
{
|
|
|
|
ARG_UNUSED(arg);
|
|
|
|
|
2017-08-15 09:26:39 +08:00
|
|
|
/* Note: This function also performs CC3220 Initialization */
|
2018-04-20 07:44:05 +08:00
|
|
|
MAP_PRCMCC3200MCUInit();
|
2016-10-26 07:49:35 +08:00
|
|
|
|
2016-12-13 07:19:42 +08:00
|
|
|
#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
|
|
|
|
|
2016-10-26 07:49:35 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-04-19 05:08:56 +08:00
|
|
|
SYS_INIT(ti_cc32xx_init, PRE_KERNEL_1, 0);
|