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>
This commit is contained in:
parent
ff178beee5
commit
2adb297cf9
|
@ -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)
|
||||
|
|
|
@ -153,7 +153,7 @@ unsigned int uart_platform_refclk(void)
|
|||
return 48000000;
|
||||
}
|
||||
|
||||
unsigned int uart_platform_base(int idx)
|
||||
uintptr_t uart_platform_base(int idx)
|
||||
{
|
||||
const unsigned int bases[] = {
|
||||
0x44e09000, 0x48022000, 0x48024000,
|
||||
|
|
|
@ -77,7 +77,7 @@ static int oxpcie_uart_active(void)
|
|||
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;
|
||||
|
|
|
@ -105,7 +105,7 @@ static void uart8250_init(unsigned base_port, unsigned divisor)
|
|||
|
||||
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];
|
||||
|
|
|
@ -45,7 +45,7 @@ void uart_tx_byte(int idx, unsigned char data);
|
|||
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)
|
||||
|
|
|
@ -95,7 +95,7 @@ static int tegra124_uart_tst_byte(struct tegra124_uart *uart_ptr)
|
|||
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;
|
||||
|
|
|
@ -157,7 +157,7 @@ static void exynos5_uart_tx_flush(struct s5p_uart *uart)
|
|||
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;
|
||||
|
|
|
@ -149,7 +149,7 @@ static void exynos5_uart_tx_byte(struct s5p_uart *uart, unsigned char data)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue