back date this file to version 1.155 which works on the shark.
This commit is contained in:
parent
920344b9c2
commit
833fb0ac7f
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: com.c,v 1.158 1999/03/29 13:40:41 mycroft Exp $ */
|
/* $NetBSD: com.c,v 1.159 1999/03/31 12:44:04 mrg Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||||
@ -223,10 +223,6 @@ void com_kgdb_putc __P((void *, int));
|
|||||||
#define COM_ISALIVE(sc) ((sc)->enabled != 0 && \
|
#define COM_ISALIVE(sc) ((sc)->enabled != 0 && \
|
||||||
ISSET((sc)->sc_dev.dv_flags, DVF_ACTIVE))
|
ISSET((sc)->sc_dev.dv_flags, DVF_ACTIVE))
|
||||||
|
|
||||||
#define BR BUS_SPACE_BARRIER_READ
|
|
||||||
#define BW BUS_SPACE_BARRIER_WRITE
|
|
||||||
#define COM_BARRIER(t, h, f) bus_space_barrier((t), (h), 0, COM_NPORTS, (f))
|
|
||||||
|
|
||||||
int
|
int
|
||||||
comspeed(speed, frequency)
|
comspeed(speed, frequency)
|
||||||
long speed, frequency;
|
long speed, frequency;
|
||||||
@ -2174,21 +2170,24 @@ com_common_putc(iot, ioh, c)
|
|||||||
int c;
|
int c;
|
||||||
{
|
{
|
||||||
int s = splserial();
|
int s = splserial();
|
||||||
|
u_char stat;
|
||||||
int timo;
|
int timo;
|
||||||
|
|
||||||
/* wait for any pending transmission to finish */
|
/* wait for any pending transmission to finish */
|
||||||
timo = 1500;
|
timo = 50000;
|
||||||
while (!ISSET(bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY) && --timo)
|
while (!ISSET(stat = bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY)
|
||||||
delay(100);
|
&& --timo)
|
||||||
|
;
|
||||||
|
|
||||||
bus_space_write_1(iot, ioh, com_data, c);
|
bus_space_write_1(iot, ioh, com_data, c);
|
||||||
COM_BARRIER(iot, ioh, BR | BW);
|
|
||||||
|
|
||||||
/* wait for this transmission to complete */
|
/* wait for this transmission to complete */
|
||||||
timo = 15000;
|
timo = 1500000;
|
||||||
while (!ISSET(bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY) && --timo)
|
while (!ISSET(stat = bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY)
|
||||||
delay(100);
|
&& --timo)
|
||||||
|
;
|
||||||
|
|
||||||
|
/* clear any interrupts generated by this transmission */
|
||||||
|
stat = bus_space_read_1(iot, ioh, com_iir);
|
||||||
splx(s);
|
splx(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user