From fb1ebd9a06e635a0168cbbb077551873ab08bf70 Mon Sep 17 00:00:00 2001 From: nwert Date: Fri, 16 Mar 2018 10:14:09 +1300 Subject: [PATCH] Fix uart for opt, actually use params. --- hwinit/hwinit.c | 4 ++-- hwinit/uart.c | 2 +- hwinit/uart.h | 28 ++++++++++++++-------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/hwinit/hwinit.c b/hwinit/hwinit.c index 9e5352f..319f17d 100644 --- a/hwinit/hwinit.c +++ b/hwinit/hwinit.c @@ -63,8 +63,8 @@ void config_pmc_scratch() void mc_config_tsec_carveout(u32 bom, u32 size1mb, int lock) { - MC(0x670) = 0x90000000; - MC(0x674) = 1; + MC(0x670) = bom; + MC(0x674) = size1mb; if (lock) MC(0x678) = 1; } diff --git a/hwinit/uart.c b/hwinit/uart.c index 15d981c..39d99b0 100644 --- a/hwinit/uart.c +++ b/hwinit/uart.c @@ -19,7 +19,7 @@ void uart_init(u32 idx, u32 baud) //Setup UART in fifo mode. uart->UART_IER_DLAB = 0; uart->UART_IIR_FCR = 7; //Enable and clear TX and RX FIFOs. - volatile u32 tmp = uart->UART_LSR; + (void)uart->UART_LSR; sleep(3 * ((baud + 999999) / baud)); uart->UART_LCR = 3; //Set word length 8. uart->UART_MCR = 0; diff --git a/hwinit/uart.h b/hwinit/uart.h index ac82222..8450a5b 100644 --- a/hwinit/uart.h +++ b/hwinit/uart.h @@ -19,20 +19,20 @@ typedef struct _uart_t { - /* 0x00 */ u32 UART_THR_DLAB; - /* 0x04 */ u32 UART_IER_DLAB; - /* 0x08 */ u32 UART_IIR_FCR; - /* 0x0C */ u32 UART_LCR; - /* 0x10 */ u32 UART_MCR; - /* 0x14 */ u32 UART_LSR; - /* 0x18 */ u32 UART_MSR; - /* 0x1C */ u32 UART_SPR; - /* 0x20 */ u32 UART_IRDA_CSR; - /* 0x24 */ u32 UART_RX_FIFO_CFG; - /* 0x28 */ u32 UART_MIE; - /* 0x2C */ u32 UART_VENDOR_STATUS; - /* 0x30 */ u8 _pad_30[0x0C]; - /* 0x3C */ u32 UART_ASR; + /* 0x00 */ vu32 UART_THR_DLAB; + /* 0x04 */ vu32 UART_IER_DLAB; + /* 0x08 */ vu32 UART_IIR_FCR; + /* 0x0C */ vu32 UART_LCR; + /* 0x10 */ vu32 UART_MCR; + /* 0x14 */ vu32 UART_LSR; + /* 0x18 */ vu32 UART_MSR; + /* 0x1C */ vu32 UART_SPR; + /* 0x20 */ vu32 UART_IRDA_CSR; + /* 0x24 */ vu32 UART_RX_FIFO_CFG; + /* 0x28 */ vu32 UART_MIE; + /* 0x2C */ vu32 UART_VENDOR_STATUS; + /* 0x30 */ u8 _pad_30[0xC]; + /* 0x3C */ vu32 UART_ASR; } uart_t; void uart_init(u32 idx, u32 baud);