zephyr/boards/arm/reel_board/board.c
Kumar Gala aacdd64584 boards: Cleanup include of board.h
Remove some references <board.h> that aren't need or replace them with
<soc.h> where that is the proper include to pull in.  Also use "board.h"
instead of <board.h> for how we include the file when its local to the
board code itself.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-01 13:15:18 +01:00

30 lines
606 B
C

/*
* Copyright (c) 2018 Phytec Messtechnik GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <init.h>
#include "board.h"
#include <soc.h>
static int board_reel_board_init(struct device *dev)
{
ARG_UNUSED(dev);
volatile NRF_GPIO_Type *gpio = NRF_P1;
/*
* Workaround to enable peripheral voltage.
*/
gpio->PIN_CNF[PERIPH_PON_PIN] =
(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos) |
(GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos);
gpio->OUTSET = BIT(PERIPH_PON_PIN);
return 0;
}
SYS_INIT(board_reel_board_init, PRE_KERNEL_2,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);