diff options
author | Andrew Waterman <andrew@sifive.com> | 2017-04-18 13:04:39 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2017-04-18 13:04:39 -0700 |
commit | 5ca090ba6c467e1a4b3506fb16bd1406e835fcbc (patch) | |
tree | 11afaf1030fa29cec316525bb5345d2e81edbad4 /machine/uart.c | |
parent | 770dcd9f1f468436292439eef53ff1888f1b8bad (diff) | |
download | riscv-pk-5ca090ba6c467e1a4b3506fb16bd1406e835fcbc.zip riscv-pk-5ca090ba6c467e1a4b3506fb16bd1406e835fcbc.tar.gz riscv-pk-5ca090ba6c467e1a4b3506fb16bd1406e835fcbc.tar.bz2 |
Use uint64_t, not uintptr_t, to represent FDT addresses/sizes
This fixes RV32 pk.
Diffstat (limited to 'machine/uart.c')
-rw-r--r-- | machine/uart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/machine/uart.c b/machine/uart.c index a55e27e..0645500 100644 --- a/machine/uart.c +++ b/machine/uart.c @@ -31,7 +31,7 @@ int uart_getchar() struct uart_scan { int compat; - uintptr_t reg; + uint64_t reg; }; static void uart_open(const struct fdt_scan_node *node, void *extra) @@ -56,7 +56,7 @@ static void uart_done(const struct fdt_scan_node *node, void *extra) if (!scan->compat || !scan->reg || uart) return; // Enable Rx/Tx channels - uart = (void*)scan->reg; + uart = (void*)(uintptr_t)scan->reg; uart[UART_REG_TXCTRL] = UART_TXEN; uart[UART_REG_RXCTRL] = UART_RXEN; } |