Пример #1
0
static int __init stamp_init(void)
{
	printk(KERN_INFO "%s(): registering device resources\n", __func__);
	i2c_register_board_info(0, bfin_i2c_board_info,
				ARRAY_SIZE(bfin_i2c_board_info));
	bfin_plat_nand_init();
	platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
	spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));

	return 0;
}
Пример #2
0
static int __init stamp_init(void)
{
	printk(KERN_INFO "%s(): registering device resources\n", __func__);
	i2c_register_board_info(0, bfin_i2c_board_info,
				ARRAY_SIZE(bfin_i2c_board_info));
	bfin_plat_nand_init();
	platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
	spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));

#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
	irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
#endif

	return 0;
}
Пример #3
0
/* Board Init  function --------------------------------------------------------------------------------------- */
static int __init ip0x_init(void)
{
        u_int i, j;

        printk(KERN_INFO "%s(): chip_id=%08lX,dspid=%08X\n", __FUNCTION__, *((volatile unsigned long *)CHIPID), bfin_read_DSPID());

	printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
	bfin_plat_nand_init();
	platform_add_devices(ip0x_devices, ARRAY_SIZE(ip0x_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
        for (i = 0; i < ARRAY_SIZE(bfin_spi_board_info); i ++) {
               j = 1 << bfin_spi_board_info [i]. chip_select;
               // set spi cs to 1
               bfin_write_FIO_DIR (bfin_read_FIO_DIR() | j);
               bfin_write_FIO_FLAG_S (j);
        }
	spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif
	return 0;
}
Пример #4
0
static int __init acvilon_init(void)
{
	int ret;

	printk(KERN_INFO "%s(): registering device resources\n", __func__);

	bfin_plat_nand_init();
	ret =
	    platform_add_devices(acvilon_devices, ARRAY_SIZE(acvilon_devices));
	if (ret < 0)
		return ret;

	i2c_register_board_info(0, acvilon_i2c_devs,
				ARRAY_SIZE(acvilon_i2c_devs));

	bfin_write_FIO0_FLAG_C(1 << 14);
	msleep(5);
	bfin_write_FIO0_FLAG_S(1 << 14);

	spi_register_board_info(bfin_spi_board_info,
				ARRAY_SIZE(bfin_spi_board_info));
	return 0;
}