| 1 |
|
| 2 |
|
| 3 |
#include <bootblock_common.h> |
| 4 |
#include <soc/gpio.h> |
| 5 |
#include <superio/nuvoton/common/nuvoton.h> |
| 6 |
#include <superio/nuvoton/nct6791d/nct6791d.h> |
| 7 |
#include "include/gpio.h" |
| 8 |
|
| 9 |
static void early_config_superio(void) |
| 10 |
{ |
| 11 |
const pnp_devfn_t serial_dev = PNP_DEV(0x2e, NCT6791D_SP1); |
| 12 |
nuvoton_enable_serial(serial_dev, CONFIG_TTYS0_BASE); |
| 13 |
} |
| 14 |
|
| 15 |
static void early_config_gpio(void) |
| 16 |
{ |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table)); |
| 21 |
} |
| 22 |
|
| 23 |
void bootblock_mainboard_init(void) |
| 24 |
{ |
| 25 |
early_config_gpio(); |
| 26 |
} |
| 27 |
|
| 28 |
void bootblock_mainboard_early_init(void) |
| 29 |
{ |
| 30 |
early_config_superio(); |
| 31 |
} |