Line 81... |
Line 81... |
ASSERT(getreg (UART_IER) == 0x00); //1
|
ASSERT(getreg (UART_IER) == 0x00); //1
|
ASSERT(getreg (UART_IIR) == 0xc1); //2
|
ASSERT(getreg (UART_IIR) == 0xc1); //2
|
ASSERT(getreg (UART_LCR) == 0x03); //3
|
ASSERT(getreg (UART_LCR) == 0x03); //3
|
ASSERT(getreg (UART_MCR) == 0x00); //4
|
ASSERT(getreg (UART_MCR) == 0x00); //4
|
// ASSERT(getreg (UART_LSR) == 0x60); //5
|
// ASSERT(getreg (UART_LSR) == 0x60); //5
|
// ASSERT(getreg (UART_MSR) == 0xff); //6
|
// ASSERT(getreg (UART_MSR) == 0x00); //6
|
ASSERT(getreg (UART_MSR) == 0x00); //6
|
|
|
|
setreg(UART_LCR, LCR_DIVL); //enable latches
|
setreg(UART_LCR, LCR_DIVL); //enable latches
|
ASSERT(getreg (UART_DLL) == 0x00); //0
|
ASSERT(getreg (UART_DLL) == 0x00); //0
|
ASSERT(getreg (UART_DLH) == 0x00); //1
|
ASSERT(getreg (UART_DLH) == 0x00); //1
|
setreg(UART_LCR, 0x00); //disable latches
|
setreg(UART_LCR, 0x00); //disable latches
|
}
|
}
|
|
|
{ /* test if status registers are read only */
|
{ /* test if status registers are read only */
|
unsigned long tmp;
|
/*unsigned long tmp;
|
int i;
|
int i;
|
tmp = getreg (UART_LSR);
|
tmp = getreg (UART_LSR);
|
setreg (UART_LSR, ~tmp);
|
setreg (UART_LSR, ~tmp);
|
ASSERT(getreg (UART_LSR) == tmp);
|
ASSERT(getreg (UART_LSR) == tmp);
|
|
|
for (i = 0; i < 9; i++) {
|
|
setreg (UART_LSR, 1 << i);
|
|
ASSERT(getreg (UART_LSR) == tmp);
|
|
}
|
|
|
|
|
for (i = 0; i < 9; i++) {
|
|
setreg (UART_LSR, 1 << i);
|
|
ASSERT(getreg (UART_LSR) == tmp);
|
|
}
|
|
*/
|
/*tmp = getreg (UART_MSR);
|
/*tmp = getreg (UART_MSR);
|
setreg (UART_MSR, ~tmp);
|
setreg (UART_MSR, ~tmp);
|
ASSERT(getreg (UART_MSR) == tmp);
|
ASSERT(getreg (UART_MSR) == tmp);
|
|
|
for (i = 0; i < 9; i++) {
|
for (i = 0; i < 9; i++) {
|