Beispiel #1
0
static int __init bw2_init(void)
{
	if (fb_get_options("bw2fb", NULL))
		return -ENODEV;

	return of_register_driver(&bw2_driver, &of_bus_type);
}
Beispiel #2
0
int __init tcx_init(void)
{
	if (fb_get_options("tcxfb", NULL))
		return -ENODEV;

	return of_register_driver(&tcx_driver, &of_bus_type);
}
Beispiel #3
0
static int __init cg14_init(void)
{
	if (fb_get_options("cg14fb", NULL))
		return -ENODEV;

	return of_register_driver(&cg14_driver, &of_bus_type);
}
Beispiel #4
0
static int __init
i2c_keywest_init(void)
{
	macio_register_driver(&i2c_keywest_macio_driver);
	of_register_driver(&i2c_keywest_of_platform_driver);

	return 0;
}
Beispiel #5
0
void __init power_init(void)
{
    of_register_driver(&power_driver, &of_platform_bus_type);
    return;
}
static int __init pmc_init(void)
{
	return of_register_driver(&pmc_driver, &of_bus_type);
}
Beispiel #7
0
static int __init auxio_init(void)
{
	return of_register_driver(&auxio_driver, &of_platform_bus_type);
}
Beispiel #8
0
static int __init myri_sbus_init(void)
{
	return of_register_driver(&myri_sbus_driver, &of_bus_type);
}
Beispiel #9
0
static int __init d7s_init(void)
{
	return of_register_driver(&d7s_driver, &of_bus_type);
}
Beispiel #10
0
static int __init parport_sunbpp_init(void)
{
	return of_register_driver(&bpp_sbus_driver, &of_bus_type);
}
static int __init envctrl_init(void)
{
	return of_register_driver(&envctrl_driver, &of_bus_type);
}
static int __init power_init(void)
{
	return of_register_driver(&power_driver, &of_platform_bus_type);
}
/* Probe for the mostek real time clock chip. */
static int __init clock_init(void)
{
	return of_register_driver(&clock_driver, &of_platform_bus_type);
}
Beispiel #14
0
int __init gaisler_apbuart_init(void)
{
	int ret;
	int i;
	int node;
	int freq_khz;
	int baud_rates[UART_NR];

	_apbuart_init_bases();
	node = prom_getchild(prom_root_node);
	freq_khz = prom_getint(node, "clock-frequency");

	printk(KERN_INFO "grlib apbuart: %i serial driver(s) at [",
	       leon_ports_nr);
	for (i = 0; i < UART_NR; i++) {
		baud_rates[i] = 9600;
	}
	for (i = 0; i < leon_ports_nr; i++) {
		baud_rates[i] = prom_getintdefault(node, "uart1_baud", 9600);
		if (i != 0) {
			printk(",");
		}
		printk("0x%x", (unsigned int)leon_ports[i].port.mapbase);
		printk("(irq %i)", leon_ports[i].port.irq);
	}
	printk("]\n");

	baud_rates[0] = prom_getintdefault(node, "uart1_baud", 9600);
	baud_rates[1] = prom_getintdefault(node, "uart2_baud", 9600);

	printk(KERN_INFO 
	       "grlib apbuart: system frequency: %i khz, baud rates: %i %i\n",
	       freq_khz, baud_rates[0], baud_rates[1]);

	ret = uart_register_driver(&leon_reg);
	leon_reg.tty_driver->init_termios.c_cflag =
	    (leon_reg.tty_driver->init_termios.c_cflag & ~CBAUD) | B38400;

	if (ret)
		return ret;

	/*
 	 * Set the FIFO size after the baud rates are set so it'll be done at an
 	 * appropriate rate. Also flush the FIFOs just in case they have lingering
 	 * data.
 	 */

	of_register_driver(&apbuart_driver, &of_platform_bus_type);
	
	/*for (i = 0; i < leon_ports_nr; i++) {
		struct console co;
		leon_ports[i].port.uartclk = freq_khz * 1000;
		uart_add_one_port(&leon_reg, &leon_ports[i].port);
		uart_set_options(&leon_ports[i].port, &co,
				 baud_rates[i], 'n', 8, 'n');
		leon_ports[i].port.fifosize = apbuart_scan_fifo_size(i);
		apbuart_flush_fifo(&leon_ports[i].port);
		}*/
	
	
	return ret;
}