Lines Matching refs:dev
138 void serial_register(struct serial_device *dev) in serial_register() argument
141 if (dev->start) in serial_register()
142 dev->start += gd->reloc_off; in serial_register()
143 if (dev->stop) in serial_register()
144 dev->stop += gd->reloc_off; in serial_register()
145 if (dev->setbrg) in serial_register()
146 dev->setbrg += gd->reloc_off; in serial_register()
147 if (dev->getc) in serial_register()
148 dev->getc += gd->reloc_off; in serial_register()
149 if (dev->tstc) in serial_register()
150 dev->tstc += gd->reloc_off; in serial_register()
151 if (dev->putc) in serial_register()
152 dev->putc += gd->reloc_off; in serial_register()
153 if (dev->puts) in serial_register()
154 dev->puts += gd->reloc_off; in serial_register()
157 dev->next = serial_devices; in serial_register()
158 serial_devices = dev; in serial_register()
186 struct serial_device *dev = sdev->priv; in serial_stub_start() local
188 return dev->start(); in serial_stub_start()
193 struct serial_device *dev = sdev->priv; in serial_stub_stop() local
195 return dev->stop(); in serial_stub_stop()
200 struct serial_device *dev = sdev->priv; in serial_stub_putc() local
202 dev->putc(ch); in serial_stub_putc()
207 struct serial_device *dev = sdev->priv; in serial_stub_puts() local
209 dev->puts(str); in serial_stub_puts()
214 struct serial_device *dev = sdev->priv; in serial_stub_getc() local
216 return dev->getc(); in serial_stub_getc()
221 struct serial_device *dev = sdev->priv; in serial_stub_tstc() local
223 return dev->tstc(); in serial_stub_tstc()
235 struct stdio_dev dev; in serial_stdio_init() local
239 memset(&dev, 0, sizeof(dev)); in serial_stdio_init()
241 strcpy(dev.name, s->name); in serial_stdio_init()
242 dev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_INPUT; in serial_stdio_init()
244 dev.start = serial_stub_start; in serial_stdio_init()
245 dev.stop = serial_stub_stop; in serial_stdio_init()
246 dev.putc = serial_stub_putc; in serial_stdio_init()
247 dev.puts = serial_stub_puts; in serial_stdio_init()
248 dev.getc = serial_stub_getc; in serial_stdio_init()
249 dev.tstc = serial_stub_tstc; in serial_stdio_init()
250 dev.priv = s; in serial_stdio_init()
252 stdio_register(&dev); in serial_stdio_init()
315 struct serial_device *dev; in get_current() local
318 dev = default_serial_console(); in get_current()
320 dev = default_serial_console(); in get_current()
322 dev = serial_current; in get_current()
325 if (!dev) { in get_current()
334 return dev; in get_current()
447 struct serial_device *dev = get_current(); in default_serial_puts() local
449 dev->putc(*s++); in default_serial_puts()