mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 03:11:16 +00:00
Fix uart for opt, actually use params.
This commit is contained in:
parent
3077c47c39
commit
fb1ebd9a06
3 changed files with 17 additions and 17 deletions
|
@ -63,8 +63,8 @@ void config_pmc_scratch()
|
||||||
|
|
||||||
void mc_config_tsec_carveout(u32 bom, u32 size1mb, int lock)
|
void mc_config_tsec_carveout(u32 bom, u32 size1mb, int lock)
|
||||||
{
|
{
|
||||||
MC(0x670) = 0x90000000;
|
MC(0x670) = bom;
|
||||||
MC(0x674) = 1;
|
MC(0x674) = size1mb;
|
||||||
if (lock)
|
if (lock)
|
||||||
MC(0x678) = 1;
|
MC(0x678) = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ void uart_init(u32 idx, u32 baud)
|
||||||
//Setup UART in fifo mode.
|
//Setup UART in fifo mode.
|
||||||
uart->UART_IER_DLAB = 0;
|
uart->UART_IER_DLAB = 0;
|
||||||
uart->UART_IIR_FCR = 7; //Enable and clear TX and RX FIFOs.
|
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));
|
sleep(3 * ((baud + 999999) / baud));
|
||||||
uart->UART_LCR = 3; //Set word length 8.
|
uart->UART_LCR = 3; //Set word length 8.
|
||||||
uart->UART_MCR = 0;
|
uart->UART_MCR = 0;
|
||||||
|
|
|
@ -19,20 +19,20 @@
|
||||||
|
|
||||||
typedef struct _uart_t
|
typedef struct _uart_t
|
||||||
{
|
{
|
||||||
/* 0x00 */ u32 UART_THR_DLAB;
|
/* 0x00 */ vu32 UART_THR_DLAB;
|
||||||
/* 0x04 */ u32 UART_IER_DLAB;
|
/* 0x04 */ vu32 UART_IER_DLAB;
|
||||||
/* 0x08 */ u32 UART_IIR_FCR;
|
/* 0x08 */ vu32 UART_IIR_FCR;
|
||||||
/* 0x0C */ u32 UART_LCR;
|
/* 0x0C */ vu32 UART_LCR;
|
||||||
/* 0x10 */ u32 UART_MCR;
|
/* 0x10 */ vu32 UART_MCR;
|
||||||
/* 0x14 */ u32 UART_LSR;
|
/* 0x14 */ vu32 UART_LSR;
|
||||||
/* 0x18 */ u32 UART_MSR;
|
/* 0x18 */ vu32 UART_MSR;
|
||||||
/* 0x1C */ u32 UART_SPR;
|
/* 0x1C */ vu32 UART_SPR;
|
||||||
/* 0x20 */ u32 UART_IRDA_CSR;
|
/* 0x20 */ vu32 UART_IRDA_CSR;
|
||||||
/* 0x24 */ u32 UART_RX_FIFO_CFG;
|
/* 0x24 */ vu32 UART_RX_FIFO_CFG;
|
||||||
/* 0x28 */ u32 UART_MIE;
|
/* 0x28 */ vu32 UART_MIE;
|
||||||
/* 0x2C */ u32 UART_VENDOR_STATUS;
|
/* 0x2C */ vu32 UART_VENDOR_STATUS;
|
||||||
/* 0x30 */ u8 _pad_30[0x0C];
|
/* 0x30 */ u8 _pad_30[0xC];
|
||||||
/* 0x3C */ u32 UART_ASR;
|
/* 0x3C */ vu32 UART_ASR;
|
||||||
} uart_t;
|
} uart_t;
|
||||||
|
|
||||||
void uart_init(u32 idx, u32 baud);
|
void uart_init(u32 idx, u32 baud);
|
||||||
|
|
Loading…
Reference in a new issue