Home | History | Annotate | Download | only in libupload

Lines Matching refs:port

31     uint16_t port;
37 port = sci->iobase;
39 printf("No port number specified and not using serial console!\n");
43 port = strtoul(argv[0], NULL, 0);
44 if (port <= 3) {
45 uint16_t addr = ((uint16_t *)0x400)[port];
47 printf("No serial port address found!\n");
50 printf("Serial port %u is at 0x%04x\n", port, addr);
51 port = addr;
55 sif->port = port;
61 if (port == sci->iobase) {
78 sif->old.lcr = inb(port + LCR);
79 sif->old.mcr = inb(port + MCR);
80 sif->old.iir = inb(port + IIR);
83 outb(0x83, port + LCR); /* Enable divisor access */
84 sif->old.dll = inb(port + DLL);
85 sif->old.dlm = inb(port + DLM);
86 outb(divisor, port + DLL);
87 outb(divisor >> 8, port + DLM);
88 (void)inb(port + IER); /* Synchronize */
90 dll = inb(port + DLL);
91 dlm = inb(port + DLM);
92 lcr = inb(port + LCR);
93 outb(0x03, port + LCR); /* Enable data access, n81 */
94 (void)inb(port + IER); /* Synchronize */
95 sif->old.ier = inb(port + IER);
98 outb(0, port + IER);
106 printf("No serial port detected!\n");
107 return -1; /* This doesn't look like a serial port */
111 outb(0x01, port + FCR); /* Enable FIFO */
112 (void)inb(port + IER); /* Synchronize */
113 if (inb(port + IIR) < 0xc0)
114 outb(0x00, port + FCR); /* Disable FIFOs if non-functional */
115 (void)inb(port + IER); /* Synchronize */
122 uint16_t port = sif->port;
128 lsr = inb(port + LSR);
131 outb(*p++, port + THR);
137 uint16_t port = sif->port;
143 lsr = inb(port + LSR);
146 *p++ = inb(port + RBR);
152 uint16_t port = sif->port;
154 outb(0x83, port + LCR);
155 (void)inb(port + IER);
156 outb(sif->old.dll, port + DLL);
157 outb(sif->old.dlm, port + DLM);
158 (void)inb(port + IER);
159 outb(sif->old.lcr & 0x7f, port + LCR);
160 (void)inb(port + IER);
161 outb(sif->old.mcr, port + MCR);
162 outb(sif->old.ier, port + IER);
164 outb(0x00, port + FCR); /* Disable FIFOs */