Lines Matching refs:sif
27 int serial_init(struct serial_if *sif, const char *argv[]) in serial_init() argument
55 sif->port = port; in serial_init()
56 sif->console = false; in serial_init()
63 sif->console = true; in serial_init()
78 sif->old.lcr = inb(port + LCR); in serial_init()
79 sif->old.mcr = inb(port + MCR); in serial_init()
80 sif->old.iir = inb(port + IIR); in serial_init()
84 sif->old.dll = inb(port + DLL); in serial_init()
85 sif->old.dlm = inb(port + DLM); in serial_init()
95 sif->old.ier = inb(port + IER); in serial_init()
105 serial_cleanup(sif); in serial_init()
120 void serial_write(struct serial_if *sif, const void *data, size_t n) in serial_write() argument
122 uint16_t port = sif->port; in serial_write()
135 void serial_read(struct serial_if *sif, void *data, size_t n) in serial_read() argument
137 uint16_t port = sif->port; in serial_read()
150 void serial_cleanup(struct serial_if *sif) in serial_cleanup() argument
152 uint16_t port = sif->port; in serial_cleanup()
156 outb(sif->old.dll, port + DLL); in serial_cleanup()
157 outb(sif->old.dlm, port + DLM); in serial_cleanup()
159 outb(sif->old.lcr & 0x7f, port + LCR); in serial_cleanup()
161 outb(sif->old.mcr, port + MCR); in serial_cleanup()
162 outb(sif->old.ier, port + IER); in serial_cleanup()
163 if (sif->old.iir < 0xc0) in serial_cleanup()
167 if (sif->console) in serial_cleanup()