mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-29 20:55:21 +00:00
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>
34 lines
784 B
C
34 lines
784 B
C
/*
|
|
* Copyright (c) 2018 Marcio Montenegro
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <init.h>
|
|
#include "board.h"
|
|
#include <gpio.h>
|
|
#include <misc/printk.h>
|
|
|
|
static int efm32hg_slstk3400a_init(struct device *dev)
|
|
{
|
|
struct device *bce_dev; /* Board Controller Enable Gpio Device */
|
|
|
|
ARG_UNUSED(dev);
|
|
|
|
/* Enable the board controller to be able to use the serial port */
|
|
bce_dev = device_get_binding(BC_ENABLE_GPIO_NAME);
|
|
|
|
if (!bce_dev) {
|
|
printk("Board controller gpio port was not found!\n");
|
|
return -ENODEV;
|
|
}
|
|
|
|
gpio_pin_configure(bce_dev, BC_ENABLE_GPIO_PIN, GPIO_DIR_OUT);
|
|
gpio_pin_write(bce_dev, BC_ENABLE_GPIO_PIN, 1);
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* needs to be done after GPIO driver init */
|
|
SYS_INIT(efm32hg_slstk3400a_init, PRE_KERNEL_1, CONFIG_BOARD_INIT_PRIORITY);
|