| 1 |
|
| 2 |
|
| 3 |
#include <console/uart.h> |
| 4 |
#include <device/pci_def.h> |
| 5 |
#include <device/pci_ops.h> |
| 6 |
#include <soc/pci_devs.h> |
| 7 |
|
| 8 |
#include "uart8250mem.h" |
| 9 |
|
| 10 |
uintptr_t uart_platform_base(unsigned int idx) |
| 11 |
{ |
| 12 |
uint32_t reg32 = pci_read_config32(PCH_DEV_UART(idx), UART_MEMBA); |
| 13 |
|
| 14 |
reg32 &= ~PCI_BASE_ADDRESS_MEM_ATTR_MASK; |
| 15 |
|
| 16 |
return reg32; |
| 17 |
} |
| 18 |
|
| 19 |
unsigned int uart_platform_refclk(void) |
| 20 |
{ |
| 21 |
unsigned int ret = 115200 * 16; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
if (CONFIG_TTYS0_BAUD > 115200) |
| 27 |
ret *= HIGH_SPEED_CLK_MULT; |
| 28 |
|
| 29 |
return ret; |
| 30 |
} |