1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <bootblock_common.h>
4 #include <device/pnp_ops.h>
5 #include <device/pnp.h>
8 #define SERIAL_DEV1 PNP_DEV(ITE8528_CMD_PORT, 1) /* ITE8528 UART1 */
9 #define SERIAL_DEV2 PNP_DEV(ITE8528_CMD_PORT, 2) /* ITE8528 UART2 */
11 void bootblock_mainboard_early_init(void)
13 /* Enable the serial ports inside the EC */
14 pnp_set_logical_device(SERIAL_DEV1
);
15 pnp_set_enable(SERIAL_DEV1
, 1);
16 pnp_set_logical_device(SERIAL_DEV2
);
17 pnp_set_iobase(SERIAL_DEV2
, PNP_IDX_IO0
, 0x3e8);
18 pnp_set_irq(SERIAL_DEV2
, PNP_IDX_IRQ0
, 3);
19 pnp_set_enable(SERIAL_DEV2
, 1);