uarts: 32/64 cleanup
We had lots of casts that caused warnings when compiling on RISCV.
Clean them up.
Change-Id: I46fcb33147ad6bf75e49ebfdfa05990e8c7ae4eb
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/7066
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
diff --git a/src/cpu/allwinner/a10/uart_console.c b/src/cpu/allwinner/a10/uart_console.c
index b787961..ff86348 100644
--- a/src/cpu/allwinner/a10/uart_console.c
+++ b/src/cpu/allwinner/a10/uart_console.c
@@ -12,7 +12,7 @@
#include "memmap.h"
-unsigned int uart_platform_base(int idx)
+uintptr_t uart_platform_base(int idx)
{
/* UART blocks are mapped 0x400 bytes apart */
if (idx < 8)
diff --git a/src/cpu/ti/am335x/uart.c b/src/cpu/ti/am335x/uart.c
index d398d9a..5756834 100644
--- a/src/cpu/ti/am335x/uart.c
+++ b/src/cpu/ti/am335x/uart.c
@@ -153,7 +153,7 @@
return 48000000;
}
-unsigned int uart_platform_base(int idx)
+uintptr_t uart_platform_base(int idx)
{
const unsigned int bases[] = {
0x44e09000, 0x48022000, 0x48024000,
diff --git a/src/drivers/uart/oxpcie_early.c b/src/drivers/uart/oxpcie_early.c
index fd37806..343056c 100644
--- a/src/drivers/uart/oxpcie_early.c
+++ b/src/drivers/uart/oxpcie_early.c
@@ -77,7 +77,7 @@
return (car_get_var(oxpcie_present));
}
-unsigned int uart_platform_base(int idx)
+uintptr_t uart_platform_base(int idx)
{
if (idx == 0 && oxpcie_uart_active())
return uart0_base;
diff --git a/src/drivers/uart/uart8250io.c b/src/drivers/uart/uart8250io.c
index f4f4d01..60a8d86 100644
--- a/src/drivers/uart/uart8250io.c
+++ b/src/drivers/uart/uart8250io.c
@@ -105,7 +105,7 @@
static const unsigned bases[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
-unsigned int uart_platform_base(int idx)
+uintptr_t uart_platform_base(int idx)
{
if (idx < ARRAY_SIZE(bases))
return bases[idx];
diff --git a/src/include/console/uart.h b/src/include/console/uart.h
index d4020c3..94933fe 100644
--- a/src/include/console/uart.h
+++ b/src/include/console/uart.h
@@ -45,7 +45,7 @@
void uart_tx_flush(int idx);
unsigned char uart_rx_byte(int idx);
-unsigned int uart_platform_base(int idx);
+uintptr_t uart_platform_base(int idx);
#if !defined(__ROMCC__)
static inline void *uart_platform_baseptr(int idx)
diff --git a/src/soc/nvidia/tegra124/uart.c b/src/soc/nvidia/tegra124/uart.c
index 71a951f..fd8074d 100644
--- a/src/soc/nvidia/tegra124/uart.c
+++ b/src/soc/nvidia/tegra124/uart.c
@@ -95,7 +95,7 @@
return (read8(&uart_ptr->lsr) & UART8250_LSR_DR) == UART8250_LSR_DR;
}
-unsigned int uart_platform_base(int idx)
+uintptr_t uart_platform_base(int idx)
{
//Default to UART A
unsigned int base = 0x70006000;
diff --git a/src/soc/samsung/exynos5250/uart.c b/src/soc/samsung/exynos5250/uart.c
index cc97291..c02cdf7 100644
--- a/src/soc/samsung/exynos5250/uart.c
+++ b/src/soc/samsung/exynos5250/uart.c
@@ -157,7 +157,7 @@
while (readl(&uart->ufstat) & 0x1ff0000);
}
-unsigned int uart_platform_base(int idx)
+uintptr_t uart_platform_base(int idx)
{
if (idx < 4)
return 0x12c00000 + idx * 0x10000;
diff --git a/src/soc/samsung/exynos5420/uart.c b/src/soc/samsung/exynos5420/uart.c
index be96d5b..b7ef0cb 100644
--- a/src/soc/samsung/exynos5420/uart.c
+++ b/src/soc/samsung/exynos5420/uart.c
@@ -149,7 +149,7 @@
writeb(data, &uart->utxh);
}
-unsigned int uart_platform_base(int idx)
+uintptr_t uart_platform_base(int idx)
{
if (idx < 4)
return 0x12c00000 + idx * 0x10000;