aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/uart
diff options
context:
space:
mode:
authorMartin Roth <martin@coreboot.org>2019-10-23 21:41:00 -0600
committerMartin Roth <martinroth@google.com>2019-10-27 21:08:39 +0000
commit38ddbfb325866716c9c65a460e388f33d1a773dd (patch)
treeffc7469c60e0a94321cf96de2bd0c4928067849f /src/drivers/uart
parente74ca4ffc2008a93e38909a4d583408affbaf28a (diff)
src/[arch-lib]: change "unsigned" to "unsigned int"
Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: Ibb7b48a7a144421aff29acbb7ac30968ae5fe5ab Reviewed-on: https://review.coreboot.org/c/coreboot/+/36329 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/drivers/uart')
-rw-r--r--src/drivers/uart/uart8250io.c14
-rw-r--r--src/drivers/uart/uart8250mem.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/drivers/uart/uart8250io.c b/src/drivers/uart/uart8250io.c
index 6476079bcb..58e014170a 100644
--- a/src/drivers/uart/uart8250io.c
+++ b/src/drivers/uart/uart8250io.c
@@ -29,30 +29,30 @@
#define SINGLE_CHAR_TIMEOUT (50 * 1000)
#define FIFO_TIMEOUT (16 * SINGLE_CHAR_TIMEOUT)
-static int uart8250_can_tx_byte(unsigned base_port)
+static int uart8250_can_tx_byte(unsigned int base_port)
{
return inb(base_port + UART8250_LSR) & UART8250_LSR_THRE;
}
-static void uart8250_tx_byte(unsigned base_port, unsigned char data)
+static void uart8250_tx_byte(unsigned int base_port, unsigned char data)
{
unsigned long int i = SINGLE_CHAR_TIMEOUT;
while (i-- && !uart8250_can_tx_byte(base_port));
outb(data, base_port + UART8250_TBR);
}
-static void uart8250_tx_flush(unsigned base_port)
+static void uart8250_tx_flush(unsigned int base_port)
{
unsigned long int i = FIFO_TIMEOUT;
while (i-- && !(inb(base_port + UART8250_LSR) & UART8250_LSR_TEMT));
}
-static int uart8250_can_rx_byte(unsigned base_port)
+static int uart8250_can_rx_byte(unsigned int base_port)
{
return inb(base_port + UART8250_LSR) & UART8250_LSR_DR;
}
-static unsigned char uart8250_rx_byte(unsigned base_port)
+static unsigned char uart8250_rx_byte(unsigned int base_port)
{
unsigned long int i = SINGLE_CHAR_TIMEOUT;
while (i && !uart8250_can_rx_byte(base_port))
@@ -64,7 +64,7 @@ static unsigned char uart8250_rx_byte(unsigned base_port)
return 0x0;
}
-static void uart8250_init(unsigned base_port, unsigned divisor)
+static void uart8250_init(unsigned int base_port, unsigned int divisor)
{
DISABLE_TRACE;
/* Disable interrupts */
@@ -87,7 +87,7 @@ static void uart8250_init(unsigned base_port, unsigned divisor)
ENABLE_TRACE;
}
-static const unsigned bases[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
+static const unsigned int bases[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
uintptr_t uart_platform_base(int idx)
{
diff --git a/src/drivers/uart/uart8250mem.c b/src/drivers/uart/uart8250mem.c
index 46512ebb78..c519b4d53e 100644
--- a/src/drivers/uart/uart8250mem.c
+++ b/src/drivers/uart/uart8250mem.c
@@ -88,7 +88,7 @@ static unsigned char uart8250_mem_rx_byte(void *base)
return 0x0;
}
-static void uart8250_mem_init(void *base, unsigned divisor)
+static void uart8250_mem_init(void *base, unsigned int divisor)
{
/* Disable interrupts */
uart8250_write(base, UART8250_IER, 0x0);