From 404e7c5c9d2f9c51a2ab0895feae3cb258fb9608 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 25 Sep 2008 18:32:06 +0800 Subject: [PATCH] add option NOMSG_ON_SERIAL. --- Targets/Bonito2fdev/Bonito/start_cs5536.S | 4 ++++ pmon/dev/ns16550.c | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/Targets/Bonito2fdev/Bonito/start_cs5536.S b/Targets/Bonito2fdev/Bonito/start_cs5536.S index b34c2179..86db51a3 100644 --- a/Targets/Bonito2fdev/Bonito/start_cs5536.S +++ b/Targets/Bonito2fdev/Bonito/start_cs5536.S @@ -1321,6 +1321,10 @@ END(hexserial) LEAF(tgt_putchar) .set noat +#ifdef NOMSG_ON_SERIAL + jr ra + nop +#endif move AT,ra #if (((PCI_IDSEL_VIA686B != 0)||(PCI_IDSEL_CS5536 != 0))&& !defined(HAVE_NB_SERIAL)) la v0, COM1_BASE_ADDR diff --git a/pmon/dev/ns16550.c b/pmon/dev/ns16550.c index 6dfc57b1..0ab474e9 100644 --- a/pmon/dev/ns16550.c +++ b/pmon/dev/ns16550.c @@ -123,13 +123,22 @@ ns16550 (int op, struct DevEntry *dev, unsigned long param, int data) return nsprogram (dp, dev->freq, data); case OP_TXRDY: + #ifdef NOMSG_ON_SERIAL + return 1; + #endif return (inb(&dp->lsr) & LSR_TXRDY); case OP_TX: + #ifdef NOMSG_ON_SERIAL + return 0; + #endif outb(&dp->data, data); break; case OP_RXRDY: + #ifdef NOMSG_ON_SERIAL + return 0; + #endif return (inb(&dp->lsr) & LSR_RXRDY); case OP_RX: