static void __init innovator_init(void)
{
#ifdef CONFIG_ARCH_OMAP15XX
	if (cpu_is_omap1510()) {
		unsigned char reg;

		/* mux pins for uarts */
		omap_cfg_reg(UART1_TX);
		omap_cfg_reg(UART1_RTS);
		omap_cfg_reg(UART2_TX);
		omap_cfg_reg(UART2_RTS);
		omap_cfg_reg(UART3_TX);
		omap_cfg_reg(UART3_RX);

		reg = fpga_read(OMAP1510_FPGA_POWER);
		reg |= OMAP1510_FPGA_PCR_COM1_EN;
		fpga_write(reg, OMAP1510_FPGA_POWER);
		udelay(10);

		reg = fpga_read(OMAP1510_FPGA_POWER);
		reg |= OMAP1510_FPGA_PCR_COM2_EN;
		fpga_write(reg, OMAP1510_FPGA_POWER);
		udelay(10);

		platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices));
		spi_register_board_info(innovator1510_boardinfo,
				ARRAY_SIZE(innovator1510_boardinfo));
	}
#endif
#ifdef CONFIG_ARCH_OMAP16XX
	if (!cpu_is_omap1510()) {
		platform_add_devices(innovator1610_devices, ARRAY_SIZE(innovator1610_devices));
	}
#endif

#ifdef CONFIG_ARCH_OMAP15XX
	if (cpu_is_omap1510()) {
		omap_usb_init(&innovator1510_usb_config);
		innovator_config[1].data = &innovator1510_lcd_config;
	}
#endif
#ifdef CONFIG_ARCH_OMAP16XX
	if (cpu_is_omap1610()) {
		omap_usb_init(&h2_usb_config);
		innovator_config[1].data = &innovator1610_lcd_config;
	}
#endif
	omap_board_config = innovator_config;
	omap_board_config_size = ARRAY_SIZE(innovator_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, NULL, 0);
	innovator_mmc_init();
}
static void __init
omap_palmz71_init(void)
{
	/* mux pins for uarts */
	omap_cfg_reg(UART1_TX);
	omap_cfg_reg(UART1_RTS);
	omap_cfg_reg(UART2_TX);
	omap_cfg_reg(UART2_RTS);
	omap_cfg_reg(UART3_TX);
	omap_cfg_reg(UART3_RX);

	palmz71_gpio_setup(1);
	omap_mpu_wdt_mode(0);

	omap_board_config = palmz71_config;
	omap_board_config_size = ARRAY_SIZE(palmz71_config);

	platform_add_devices(devices, ARRAY_SIZE(devices));

	spi_register_board_info(palmz71_boardinfo,
				ARRAY_SIZE(palmz71_boardinfo));
	omap_usb_init(&palmz71_usb_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);
	palmz71_gpio_setup(0);
}
Exemple #3
0
static void __init omap_sx1_init(void)
{
	/* mux pins for uarts */
	omap_cfg_reg(UART1_TX);
	omap_cfg_reg(UART1_RTS);
	omap_cfg_reg(UART2_TX);
	omap_cfg_reg(UART2_RTS);
	omap_cfg_reg(UART3_TX);
	omap_cfg_reg(UART3_RX);

	platform_add_devices(sx1_devices, ARRAY_SIZE(sx1_devices));

	omap_board_config = sx1_config;
	omap_board_config_size = ARRAY_SIZE(sx1_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);
	omap_usb_init(&sx1_usb_config);
	sx1_mmc_init();

	/* turn on USB power */
	/* sx1_setusbpower(1); cant do it here because i2c is not ready */
	gpio_request(1, "A_IRDA_OFF");
	gpio_request(11, "A_SWITCH");
	gpio_request(15, "A_USB_ON");
	gpio_direction_output(1, 1);	/*A_IRDA_OFF = 1 */
	gpio_direction_output(11, 0);	/*A_SWITCH = 0 */
	gpio_direction_output(15, 0);	/*A_USB_ON = 0 */
}
static void __init omap_h4_init(void)
{
	/*
	 * Make sure the serial ports are muxed on at this point.
	 * You have to mux them off in device drivers later on
	 * if not needed.
	 */
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
	omap_cfg_reg(K15_24XX_UART3_TX);
	omap_cfg_reg(K14_24XX_UART3_RX);
#endif

#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
	if (omap_has_menelaus()) {
		row_gpios[5] = 0;
		col_gpios[2] = 15;
		col_gpios[6] = 18;
	}
#endif

	i2c_register_board_info(1, h4_i2c_board_info,
			ARRAY_SIZE(h4_i2c_board_info));

	platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
	omap_usb_init(&h4_usb_config);
	omap_serial_init();
}
Exemple #5
0
static void __init h3_init(void)
{
	/* Here we assume the NOR boot config:  NOR on CS3 (possibly swapped
	 * to address 0 by a dip switch), NAND on CS2B.  The NAND driver will
	 * notice whether a NAND chip is enabled at probe time.
	 *
	 * H3 support NAND-boot, with a dip switch to put NOR on CS2B and NAND
	 * (which on H2 may be 16bit) on CS3.  Try detecting that in code here,
	 * to avoid probing every possible flash configuration...
	 */
	nor_resource.end = nor_resource.start = omap_cs3_phys();
	nor_resource.end += SZ_32M - 1;

	nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS;
	nand_resource.end += SZ_4K - 1;
	if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0)
		BUG();
	gpio_direction_input(H3_NAND_RB_GPIO_PIN);

	/* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
	/* GPIO10 pullup/down register, Enable pullup on GPIO10 */
	omap_cfg_reg(V2_1710_GPIO10);

	platform_add_devices(devices, ARRAY_SIZE(devices));
	spi_register_board_info(h3_spi_board_info,
				ARRAY_SIZE(h3_spi_board_info));
	omap_board_config = h3_config;
	omap_board_config_size = ARRAY_SIZE(h3_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, h3_i2c_board_info,
			      ARRAY_SIZE(h3_i2c_board_info));
	omap_usb_init(&h3_usb_config);
	h3_mmc_init();
}
static void __init apollon_usb_init(void)
{
	/* USB device */
	/* DEVICE_SUSPEND */
	omap_cfg_reg(P21_242X_GPIO12);
	gpio_request(12, "USB suspend");
	gpio_direction_output(12, 0);
	omap_usb_init(&apollon_usb_config);
}
Exemple #7
0
static void __init omap_palmte_init(void)
{
	omap_board_config = palmte_config;
	omap_board_config_size = ARRAY_SIZE(palmte_config);

	platform_add_devices(palmte_devices, ARRAY_SIZE(palmte_devices));

	spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info));
	palmte_misc_gpio_setup();
	omap_serial_init();
	omap_usb_init(&palmte_usb_config);
	omap_register_i2c_bus(1, 100, NULL, 0);
}
static void __init omap_nokia770_init(void)
{
	platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices));
	spi_register_board_info(nokia770_spi_board_info,
				ARRAY_SIZE(nokia770_spi_board_info));
	omap_gpio_init();
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);
	omap_dsp_init();
	ads7846_dev_init();
	mipid_dev_init();
	omap_usb_init(&nokia770_usb_config);
	nokia770_mmc_init();
}
static void __init ams_delta_init(void)
{
	iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));

	omap_board_config = ams_delta_config;
	omap_board_config_size = ARRAY_SIZE(ams_delta_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);

	/* Clear latch2 (NAND, LCD, modem enable) */
	ams_delta_latch2_write(~0, 0);

	omap_usb_init(&ams_delta_usb_config);
	platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
}
static void __init htcherald_init(void)
{
	printk(KERN_INFO "HTC Herald init.\n");

	omap_gpio_init();

	omap_board_config = htcherald_config;
	omap_board_config_size = ARRAY_SIZE(htcherald_config);
	platform_add_devices(devices, ARRAY_SIZE(devices));

	htcherald_disable_watchdog();

	htcherald_usb_enable();
	omap_usb_init(&htcherald_usb_config);
}
static void __init voiceblue_init(void)
{
	/* mux pins for uarts */
	omap_cfg_reg(UART1_TX);
	omap_cfg_reg(UART1_RTS);
	omap_cfg_reg(UART2_TX);
	omap_cfg_reg(UART2_RTS);
	omap_cfg_reg(UART3_TX);
	omap_cfg_reg(UART3_RX);

	/* Watchdog */
	gpio_request(0, "Watchdog");
	/* smc91x reset */
	gpio_request(7, "SMC91x reset");
	gpio_direction_output(7, 1);
	udelay(2);	/* wait at least 100ns */
	gpio_set_value(7, 0);
	mdelay(50);	/* 50ms until PHY ready */
	/* smc91x interrupt pin */
	gpio_request(8, "SMC91x irq");
	/* 16C554 reset*/
	gpio_request(6, "16C554 reset");
	gpio_direction_output(6, 0);
	/* 16C554 interrupt pins */
	gpio_request(12, "16C554 irq");
	gpio_request(13, "16C554 irq");
	gpio_request(14, "16C554 irq");
	gpio_request(15, "16C554 irq");
	set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
	set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
	set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
	set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);

	platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
	omap_board_config = voiceblue_config;
	omap_board_config_size = ARRAY_SIZE(voiceblue_config);
	omap_serial_init();
	omap_usb_init(&voiceblue_usb_config);
	omap_register_i2c_bus(1, 100, NULL, NULL, 0);

	/* There is a good chance board is going up, so enable power LED
	 * (it is connected through invertor) */
	omap_writeb(0x00, OMAP_LPG1_LCR);
	omap_writeb(0x00, OMAP_LPG1_PMR);	/* Disable clock */
}
Exemple #12
0
static void __init h2_init(void)
{
	/* Here we assume the NOR boot config:  NOR on CS3 (possibly swapped
	 * to address 0 by a dip switch), NAND on CS2B.  The NAND driver will
	 * notice whether a NAND chip is enabled at probe time.
	 *
	 * FIXME revC boards (and H3) support NAND-boot, with a dip switch to
	 * put NOR on CS2B and NAND (which on H2 may be 16bit) on CS3.  Try
	 * detecting that in code here, to avoid probing every possible flash
	 * configuration...
	 */
	h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys();
	h2_nor_resource.end += SZ_32M - 1;

	h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
	h2_nand_resource.end += SZ_4K - 1;
	if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
		BUG();
	gpio_direction_input(H2_NAND_RB_GPIO_PIN);

	omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
	omap_cfg_reg(M8_1610_FLASH_CS2B_WE);

	/* MMC:  card detect and WP */
	/* omap_cfg_reg(U19_ARMIO1); */		/* CD */
	omap_cfg_reg(BALLOUT_V8_ARMIO3);	/* WP */

	/* Irda */
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
	omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A);
	if (gpio_request(H2_IRDA_FIRSEL_GPIO_PIN, "IRDA mode") < 0)
		BUG();
	gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0);
	h2_irda_data.transceiver_mode = h2_transceiver_mode;
#endif

	platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
	omap_board_config = h2_config;
	omap_board_config_size = ARRAY_SIZE(h2_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, h2_i2c_board_info,
			      ARRAY_SIZE(h2_i2c_board_info));
	omap_usb_init(&h2_usb_config);
	h2_mmc_init();
}
static void __init ams_delta_init(void)
{
	/* mux pins for uarts */
	omap_cfg_reg(UART1_TX);
	omap_cfg_reg(UART1_RTS);

	iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));

	omap_board_config = ams_delta_config;
	omap_board_config_size = ARRAY_SIZE(ams_delta_config);
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);

	/* Clear latch2 (NAND, LCD, modem enable) */
	ams_delta_latch2_write(~0, 0);

	omap_usb_init(&ams_delta_usb_config);
	platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));

	omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1);
}
Exemple #14
0
static void __init omap_h4_init(void)
{
	
#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
	omap_cfg_reg(K15_24XX_UART3_TX);
	omap_cfg_reg(K14_24XX_UART3_RX);
#endif

#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
	if (omap_has_menelaus()) {
		row_gpios[5] = 0;
		col_gpios[2] = 15;
		col_gpios[6] = 18;
	}
#endif

	i2c_register_board_info(1, h4_i2c_board_info,
			ARRAY_SIZE(h4_i2c_board_info));

	platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
	omap_usb_init(&h4_usb_config);
	omap_serial_init();
}