Ejemplo n.º 1
0
Archivo: io.c Proyecto: mschaef/vcsh
lref_t portcons(struct port_class_t * cls,
                lref_t port_name,
                enum port_mode_t mode,
                lref_t user_object,
                void *user_data)
{
     return initialize_port(new_cell(TC_PORT),
                            cls, port_name, mode, user_object, user_data);
}
Ejemplo n.º 2
0
static int __init etrax_sync_serial_init(void)
{
	ports[0].enabled = 0;
#ifdef CONFIG_ETRAXFS
	ports[1].enabled = 0;
#endif
	if (register_chrdev(SYNC_SERIAL_MAJOR, "sync serial",
			&sync_serial_fops) < 0) {
		printk(KERN_WARNING
			"Unable to get major for synchronous serial port\n");
		return -EBUSY;
	}

	/* Initialize Ports */
#if defined(CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT0)
	if (crisv32_pinmux_alloc_fixed(PINMUX_SSER)) {
		printk(KERN_WARNING
			"Unable to alloc pins for synchronous serial port 0\n");
		return -EIO;
	}
	ports[0].enabled = 1;
	initialize_port(0);
#endif

#if defined(CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT1)
	if (crisv32_pinmux_alloc_fixed(pinmux_sser1)) {
		printk(KERN_WARNING
			"Unable to alloc pins for synchronous serial port 0\n");
		return -EIO;
	}
	ports[1].enabled = 1;
	initialize_port(1);
#endif

#ifdef CONFIG_ETRAXFS
	printk(KERN_INFO "ETRAX FS synchronous serial port driver\n");
#else
	printk(KERN_INFO "Artpec-3 synchronous serial port driver\n");
#endif
	return 0;
}
Ejemplo n.º 3
0
void init_debugger_output()
{
     interp.debugger_output.header.type = TC_PORT;

     initialize_port(&interp.debugger_output,
                     &debug_port_class,
                     NIL,
                     PORT_OUTPUT,
                     NIL,
                     NULL);

     SET_PORT_TEXT_INFO(&interp.debugger_output, allocate_text_info());
}