• Home
  • Raw
  • Download

Lines Matching refs:port

31     uint16_t port;  in serial_init()  local
37 port = sci->iobase; in serial_init()
43 port = strtoul(argv[0], NULL, 0); in serial_init()
44 if (port <= 3) { in serial_init()
45 uint16_t addr = ((uint16_t *)0x400)[port]; in serial_init()
50 printf("Serial port %u is at 0x%04x\n", port, addr); in serial_init()
51 port = addr; in serial_init()
55 sif->port = port; in serial_init()
61 if (port == sci->iobase) { 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()
83 outb(0x83, port + LCR); /* Enable divisor access */ in serial_init()
84 sif->old.dll = inb(port + DLL); in serial_init()
85 sif->old.dlm = inb(port + DLM); in serial_init()
86 outb(divisor, port + DLL); in serial_init()
87 outb(divisor >> 8, port + DLM); in serial_init()
88 (void)inb(port + IER); /* Synchronize */ in serial_init()
90 dll = inb(port + DLL); in serial_init()
91 dlm = inb(port + DLM); in serial_init()
92 lcr = inb(port + LCR); in serial_init()
93 outb(0x03, port + LCR); /* Enable data access, n81 */ in serial_init()
94 (void)inb(port + IER); /* Synchronize */ in serial_init()
95 sif->old.ier = inb(port + IER); in serial_init()
98 outb(0, port + IER); in serial_init()
111 outb(0x01, port + FCR); /* Enable FIFO */ in serial_init()
112 (void)inb(port + IER); /* Synchronize */ in serial_init()
113 if (inb(port + IIR) < 0xc0) in serial_init()
114 outb(0x00, port + FCR); /* Disable FIFOs if non-functional */ in serial_init()
115 (void)inb(port + IER); /* Synchronize */ in serial_init()
122 uint16_t port = sif->port; in serial_write() local
128 lsr = inb(port + LSR); in serial_write()
131 outb(*p++, port + THR); in serial_write()
137 uint16_t port = sif->port; in serial_read() local
143 lsr = inb(port + LSR); in serial_read()
146 *p++ = inb(port + RBR); in serial_read()
152 uint16_t port = sif->port; in serial_cleanup() local
154 outb(0x83, port + LCR); in serial_cleanup()
155 (void)inb(port + IER); in serial_cleanup()
156 outb(sif->old.dll, port + DLL); in serial_cleanup()
157 outb(sif->old.dlm, port + DLM); in serial_cleanup()
158 (void)inb(port + IER); in serial_cleanup()
159 outb(sif->old.lcr & 0x7f, port + LCR); in serial_cleanup()
160 (void)inb(port + IER); in serial_cleanup()
161 outb(sif->old.mcr, port + MCR); in serial_cleanup()
162 outb(sif->old.ier, port + IER); in serial_cleanup()
164 outb(0x00, port + FCR); /* Disable FIFOs */ in serial_cleanup()