mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Tidy up a few things left over from the conversion from i386/isa/sio.c.
Leave two #if 0'd notes about the way things used to be done for reference.
This commit is contained in:
parent
924b60cb56
commit
0dd2ac5462
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45780
@ -30,9 +30,9 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: sio.c,v 1.224 1999/04/17 01:02:27 peter Exp $
|
||||
* $Id: sio.c,v 1.225 1999/04/18 14:11:01 dfr Exp $
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* from: i386/isa sio.c,v 1.215
|
||||
* from: i386/isa sio.c,v 1.234
|
||||
*/
|
||||
|
||||
#include "opt_comconsole.h"
|
||||
@ -372,10 +372,14 @@ static struct cdevsw sio_cdevsw = {
|
||||
|
||||
int comconsole = -1;
|
||||
static volatile speed_t comdefaultrate = CONSPEED;
|
||||
#ifdef __alpha__
|
||||
static volatile speed_t gdbdefaultrate = CONSPEED;
|
||||
#endif
|
||||
static u_int com_events; /* input chars + weighted output completions */
|
||||
static Port_t siocniobase;
|
||||
#ifdef __alpha__
|
||||
static Port_t siogdbiobase;
|
||||
#endif
|
||||
static bool_t sio_registered;
|
||||
static int sio_timeout;
|
||||
static int sio_timeouts_until_log;
|
||||
@ -784,7 +788,7 @@ sioprobe(dev)
|
||||
* Leave MCR_IENABLE alone. For ports without a master port, it gates
|
||||
* the OUT2 output of the UART to
|
||||
* the ICU input. Closing the gate would give a floating ICU input
|
||||
* (unless there is another device driving at) and spurious interrupts.
|
||||
* (unless there is another device driving it) and spurious interrupts.
|
||||
* (On the system that this was first tested on, the input floats high
|
||||
* and gives a (masked) interrupt as soon as the gate is closed.)
|
||||
*/
|
||||
@ -901,7 +905,9 @@ sioattach(dev)
|
||||
Port_t *espp;
|
||||
#endif
|
||||
Port_t iobase;
|
||||
#if 0
|
||||
int s;
|
||||
#endif
|
||||
int unit;
|
||||
void *ih;
|
||||
struct resource *res;
|
||||
@ -1092,6 +1098,12 @@ determined_type: ;
|
||||
printf(" with a bogus IIR_TXRDY register");
|
||||
printf("\n");
|
||||
|
||||
#if 0
|
||||
s = spltty();
|
||||
com_addr(unit) = com;
|
||||
splx(s);
|
||||
#endif
|
||||
|
||||
if (!sio_registered) {
|
||||
register_swi(SWI_TTY, siopoll);
|
||||
sio_registered = TRUE;
|
||||
@ -1342,9 +1354,12 @@ sioclose(dev, flag, mode, p)
|
||||
if (com->gone) {
|
||||
printf("sio%d: gone\n", com->unit);
|
||||
s = spltty();
|
||||
#if 0
|
||||
com_addr(com->unit) = NULL;
|
||||
#endif
|
||||
if (com->ibuf != NULL)
|
||||
free(com->ibuf, M_DEVBUF);
|
||||
bzero(tp,sizeof *tp);
|
||||
bzero(tp, sizeof *tp);
|
||||
free(com, M_DEVBUF);
|
||||
splx(s);
|
||||
}
|
||||
@ -2981,6 +2996,7 @@ siocnputc(dev, c)
|
||||
splx(s);
|
||||
}
|
||||
|
||||
#ifdef __alpha__
|
||||
int
|
||||
siogdbgetc()
|
||||
{
|
||||
@ -3014,6 +3030,7 @@ siogdbputc(c)
|
||||
siocnclose(&sp, siogdbiobase);
|
||||
splx(s);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
@ -30,9 +30,9 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: sio.c,v 1.224 1999/04/17 01:02:27 peter Exp $
|
||||
* $Id: sio.c,v 1.225 1999/04/18 14:11:01 dfr Exp $
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* from: i386/isa sio.c,v 1.215
|
||||
* from: i386/isa sio.c,v 1.234
|
||||
*/
|
||||
|
||||
#include "opt_comconsole.h"
|
||||
@ -372,10 +372,14 @@ static struct cdevsw sio_cdevsw = {
|
||||
|
||||
int comconsole = -1;
|
||||
static volatile speed_t comdefaultrate = CONSPEED;
|
||||
#ifdef __alpha__
|
||||
static volatile speed_t gdbdefaultrate = CONSPEED;
|
||||
#endif
|
||||
static u_int com_events; /* input chars + weighted output completions */
|
||||
static Port_t siocniobase;
|
||||
#ifdef __alpha__
|
||||
static Port_t siogdbiobase;
|
||||
#endif
|
||||
static bool_t sio_registered;
|
||||
static int sio_timeout;
|
||||
static int sio_timeouts_until_log;
|
||||
@ -784,7 +788,7 @@ sioprobe(dev)
|
||||
* Leave MCR_IENABLE alone. For ports without a master port, it gates
|
||||
* the OUT2 output of the UART to
|
||||
* the ICU input. Closing the gate would give a floating ICU input
|
||||
* (unless there is another device driving at) and spurious interrupts.
|
||||
* (unless there is another device driving it) and spurious interrupts.
|
||||
* (On the system that this was first tested on, the input floats high
|
||||
* and gives a (masked) interrupt as soon as the gate is closed.)
|
||||
*/
|
||||
@ -901,7 +905,9 @@ sioattach(dev)
|
||||
Port_t *espp;
|
||||
#endif
|
||||
Port_t iobase;
|
||||
#if 0
|
||||
int s;
|
||||
#endif
|
||||
int unit;
|
||||
void *ih;
|
||||
struct resource *res;
|
||||
@ -1092,6 +1098,12 @@ determined_type: ;
|
||||
printf(" with a bogus IIR_TXRDY register");
|
||||
printf("\n");
|
||||
|
||||
#if 0
|
||||
s = spltty();
|
||||
com_addr(unit) = com;
|
||||
splx(s);
|
||||
#endif
|
||||
|
||||
if (!sio_registered) {
|
||||
register_swi(SWI_TTY, siopoll);
|
||||
sio_registered = TRUE;
|
||||
@ -1342,9 +1354,12 @@ sioclose(dev, flag, mode, p)
|
||||
if (com->gone) {
|
||||
printf("sio%d: gone\n", com->unit);
|
||||
s = spltty();
|
||||
#if 0
|
||||
com_addr(com->unit) = NULL;
|
||||
#endif
|
||||
if (com->ibuf != NULL)
|
||||
free(com->ibuf, M_DEVBUF);
|
||||
bzero(tp,sizeof *tp);
|
||||
bzero(tp, sizeof *tp);
|
||||
free(com, M_DEVBUF);
|
||||
splx(s);
|
||||
}
|
||||
@ -2981,6 +2996,7 @@ siocnputc(dev, c)
|
||||
splx(s);
|
||||
}
|
||||
|
||||
#ifdef __alpha__
|
||||
int
|
||||
siogdbgetc()
|
||||
{
|
||||
@ -3014,6 +3030,7 @@ siogdbputc(c)
|
||||
siocnclose(&sp, siogdbiobase);
|
||||
splx(s);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user