1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 #include <console/uart.h>
5 #include <device/pci_def.h>
6 #include <device/pci_ops.h>
9 #define MY_PCI_DEV(SEGBUS, DEV, FN) \
10 ((((SEGBUS)&0xFFF) << 20) | (((DEV)&0x1F) << 15) | (((FN)&0x07) << 12))
12 uintptr_t uart_platform_base(unsigned int idx
)
14 return (uintptr_t)pci_io_read_config32(
15 MY_PCI_DEV(0, CONFIG_HSUART_DEV
, idx
),
17 SIZE_OF_HSUART_RES
* idx
;