|
|
@ -322,10 +322,6 @@ locate: |
|
|
|
|
|
|
|
li bonito,PHYS_TO_UNCACHED(BONITO_REG_BASE) |
|
|
|
|
|
|
|
|
|
|
|
bal initserial |
|
|
|
nop |
|
|
|
#if 1 |
|
|
|
#define MOD_MASK 0x00000003 |
|
|
|
#define MOD_B 0x00000000 /* byte "modifier" */ |
|
|
|
#define MOD_H 0x00000001 /* halfword "modifier" */ |
|
|
@ -483,28 +479,6 @@ reginit: /* local name */ |
|
|
|
and t4,t3,OP_MASK |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 1 |
|
|
|
move t5,a0 |
|
|
|
|
|
|
|
PRINTSTR("a0: "); |
|
|
|
move a0,t5 |
|
|
|
bal hexserial |
|
|
|
nop |
|
|
|
|
|
|
|
PRINTSTR(" t3: "); |
|
|
|
move a0,t3 |
|
|
|
bal hexserial |
|
|
|
nop |
|
|
|
|
|
|
|
PRINTSTR(" t0: "); |
|
|
|
move a0,t0 |
|
|
|
bal hexserial |
|
|
|
nop |
|
|
|
|
|
|
|
PRINTSTR("\r\n"); |
|
|
|
move a0,t5 |
|
|
|
#endif |
|
|
|
/* |
|
|
|
* EXIT(STATUS) |
|
|
|
*/ |
|
|
@ -702,9 +676,9 @@ reginit: /* local name */ |
|
|
|
|
|
|
|
bal superio_init |
|
|
|
nop |
|
|
|
#endif |
|
|
|
#bal initserial |
|
|
|
#nop |
|
|
|
|
|
|
|
bal initserial |
|
|
|
nop |
|
|
|
|
|
|
|
PRINTSTR("\r\nPMON2000 MIPS Initializing. Standby...\r\n") |
|
|
|
PRINTSTR("ERRORPC=") |
|
|
@ -1301,8 +1275,7 @@ LEAF(hexserial) |
|
|
|
END(hexserial) |
|
|
|
|
|
|
|
LEAF(tgt_putchar) |
|
|
|
# la v0, COM1_BASE_ADDR |
|
|
|
la v0, COM3_BASE_ADDR |
|
|
|
la v0, COM1_BASE_ADDR |
|
|
|
1: |
|
|
|
lbu v1, NSREG(NS16550_LSR)(v0) |
|
|
|
and v1, LSR_TXRDY |
|
|
@ -1310,10 +1283,12 @@ LEAF(tgt_putchar) |
|
|
|
nop |
|
|
|
|
|
|
|
sb a0, NSREG(NS16550_DATA)(v0) |
|
|
|
#ifdef HAVE_NB_SERIAL |
|
|
|
move v1,v0 |
|
|
|
la v0, COM3_BASE_ADDR |
|
|
|
bne v0,v1,1b |
|
|
|
nop |
|
|
|
#endif |
|
|
|
j ra |
|
|
|
nop |
|
|
|
END(tgt_putchar) |
|
|
@ -1339,30 +1314,29 @@ END(tgt_putchar) |
|
|
|
#define B115200 115200 |
|
|
|
|
|
|
|
LEAF(initserial) |
|
|
|
# la v0, COM1_BASE_ADDR |
|
|
|
la v0, COM3_BASE_ADDR |
|
|
|
la v0, COM1_BASE_ADDR |
|
|
|
la a0, NS16550HZ/2/(16*CONS_BAUD) |
|
|
|
1: |
|
|
|
li v1, FIFO_ENABLE|FIFO_RCV_RST|FIFO_XMT_RST|FIFO_TRIGGER_4 |
|
|
|
sb v1, NSREG(NS16550_FIFO)(v0) |
|
|
|
li v1, CFCR_DLAB #DLAB |
|
|
|
li v1, CFCR_DLAB |
|
|
|
sb v1, NSREG(NS16550_CFCR)(v0) |
|
|
|
li v1, NS16550HZ/(16*CONS_BAUD) #set BRDL |
|
|
|
sb v1, NSREG(NS16550_DATA)(v0) |
|
|
|
sb a0, NSREG(NS16550_DATA)(v0) |
|
|
|
srl v1, 8 |
|
|
|
sb v1, NSREG(NS16550_IER)(v0) #set BRDH |
|
|
|
li v1, CFCR_8BITS #8bit |
|
|
|
sb v1, NSREG(NS16550_IER)(v0) |
|
|
|
li v1, CFCR_8BITS |
|
|
|
sb v1, NSREG(NS16550_CFCR)(v0) |
|
|
|
li v1, MCR_DTR|MCR_RTS |
|
|
|
sb v1, NSREG(NS16550_MCR)(v0) |
|
|
|
li v1, 0x0 |
|
|
|
sb v1, NSREG(NS16550_IER)(v0) |
|
|
|
|
|
|
|
move v1, v0 |
|
|
|
# la v0, COM1_BASE_ADDR |
|
|
|
#ifdef HAVE_NB_SERIAL |
|
|
|
move v1,v0 |
|
|
|
la v0, COM3_BASE_ADDR |
|
|
|
bne v0, v1, 1b |
|
|
|
li a0, NS16550HZ/(16*CONS_BAUD) |
|
|
|
bne v0,v1,1b |
|
|
|
nop |
|
|
|
|
|
|
|
#endif |
|
|
|
j ra |
|
|
|
nop |
|
|
|
END(initserial) |
|
|
|