| 1 |
|
| 2 |
|
| 3 |
#include <bootblock_common.h> |
| 4 |
#include <device/mmio.h> |
| 5 |
#include <device/pci_ops.h> |
| 6 |
#include <soc/gpio.h> |
| 7 |
#include <soc/lpc.h> |
| 8 |
#include <soc/pci_devs.h> |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
void bootblock_mainboard_early_init(void) |
| 18 |
{ |
| 19 |
uint32_t reg; |
| 20 |
uint32_t *pad_config_reg; |
| 21 |
|
| 22 |
|
| 23 |
reg = 1; |
| 24 |
pci_write_config32(PCI_DEV(0, LPC_DEV, 0), UART_CONT, reg); |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
pad_config_reg = gpio_pad_config_reg(GP_SOUTHWEST, UART1_RXD_PAD); |
| 32 |
write32(pad_config_reg, SET_PAD_MODE_SELECTION(PAD_CONFIG0_DEFAULT0, |
| 33 |
M2)); |
| 34 |
|
| 35 |
pad_config_reg = gpio_pad_config_reg(GP_SOUTHWEST, UART1_TXD_PAD); |
| 36 |
write32(pad_config_reg, SET_PAD_MODE_SELECTION(PAD_CONFIG0_DEFAULT0, |
| 37 |
M2)); |
| 38 |
} |