\
struct serial_device bfin_serial##n##_device = { \
.name = "bfin_uart"#n, \
- .init = uart##n##_init, \
- .uninit = uart##n##_uninit, \
+ .start = uart##n##_init, \
+ .stop = uart##n##_uninit, \
.setbrg = uart##n##_setbrg, \
.getc = uart##n##_getc, \
.tstc = uart##n##_tstc, \
void serial_register(struct serial_device *dev)
{
#ifdef CONFIG_NEEDS_MANUAL_RELOC
- dev->init += gd->reloc_off;
+ dev->start += gd->reloc_off;
dev->setbrg += gd->reloc_off;
dev->getc += gd->reloc_off;
dev->tstc += gd->reloc_off;
strcpy(dev.name, s->name);
dev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_INPUT;
- dev.start = s->init;
- dev.stop = s->uninit;
+ dev.start = s->start;
+ dev.stop = s->stop;
dev.putc = s->putc;
dev.puts = s->puts;
dev.getc = s->getc;
struct serial_device *s;
for (s = serial_devices; s; s = s->next)
- s->init();
+ s->start();
}
static struct serial_device *get_current(void)
int serial_init(void)
{
- return get_current()->init();
+ return get_current()->start();
}
void serial_setbrg(void)
/* Disable loop back */
s->loop(0);
- /* XXX: There is no serial_uninit() !? */
- if (s->uninit)
- s->uninit();
+ /* XXX: There is no serial_stop() !? */
+ if (s->stop)
+ s->stop();
}
done:
/* Serial device descriptor */
#define INIT_PSSERIAL_STRUCTURE(port, __name) { \
.name = __name, \
- .init = uart_zynq##port##_init, \
- .uninit = NULL, \
+ .start = uart_zynq##port##_init, \
+ .stop = NULL, \
.setbrg = uart_zynq##port##_setbrg, \
.getc = uart_zynq##port##_getc, \
.tstc = uart_zynq##port##_tstc, \
/* enough bytes to match alignment of following func pointer */
char name[16];
- int (*init)(void);
- int (*uninit)(void);
+ int (*start)(void);
+ int (*stop)(void);
void (*setbrg)(void);
int (*getc)(void);
int (*tstc)(void);