OxPCIe: Fix UART base addresses

The offset of 0x2000 was for a configuration with two separate OxPCIe
chips. The setup we support is a single chip with 8 UART pors.

Change-Id: If4be046a14464af7b90b86aca5464c6b3400dffc
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/8780
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Kyösti Mälkki 2015-03-20 08:51:57 +02:00
parent b85a87b7d6
commit e993ec7948
1 changed files with 2 additions and 6 deletions

View File

@ -30,7 +30,6 @@
static unsigned int oxpcie_present CAR_GLOBAL; static unsigned int oxpcie_present CAR_GLOBAL;
static ROMSTAGE_CONST u32 uart0_base = CONFIG_EARLY_PCI_MMIO_BASE + 0x1000; static ROMSTAGE_CONST u32 uart0_base = CONFIG_EARLY_PCI_MMIO_BASE + 0x1000;
static ROMSTAGE_CONST u32 uart1_base = CONFIG_EARLY_PCI_MMIO_BASE + 0x2000;
int pci_early_device_probe(u8 bus, u8 dev, u32 mmio_base) int pci_early_device_probe(u8 bus, u8 dev, u32 mmio_base)
{ {
@ -79,10 +78,8 @@ static int oxpcie_uart_active(void)
uintptr_t uart_platform_base(int idx) uintptr_t uart_platform_base(int idx)
{ {
if (idx == 0 && oxpcie_uart_active()) if ((idx >= 0) && (idx < 8) && oxpcie_uart_active())
return uart0_base; return uart0_base + idx * 0x200;
if (idx == 1 && oxpcie_uart_active())
return uart1_base;
return 0; return 0;
} }
@ -90,7 +87,6 @@ uintptr_t uart_platform_base(int idx)
void oxford_remap(u32 new_base) void oxford_remap(u32 new_base)
{ {
uart0_base = new_base + 0x1000; uart0_base = new_base + 0x1000;
uart1_base = new_base + 0x2000;
} }
void uart_fill_lb(void *data) void uart_fill_lb(void *data)