static void __init htcleo_init(void)
{
	printk("htcleo_init()\n");
	msm_hw_reset_hook = htcleo_reset;

	do_grp_reset();
	do_sdc1_reset();

	msm_acpu_clock_init(&htcleo_clock_data);
	
	perflock_init(&htcleo_perflock_data);

	#if defined(CONFIG_MSM_SERIAL_DEBUGGER)
		msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1,
					&msm_device_uart1.dev, 1, MSM_GPIO_TO_INT(139));
	#endif

	init_dex_comm();

	parse_tag_bdaddr();

	config_gpio_table(bt_gpio_table, ARRAY_SIZE(bt_gpio_table));

	bt_export_bd_address();
	htcleo_audio_init();
	
	msm_device_i2c_init();

	/* set the gpu power rail to manual mode so clk en/dis will not
	* turn off gpu power, and hang it on resume */

	htcleo_kgsl_power_rail_mode(0);
	htcleo_kgsl_power(false);
	mdelay(100);
	htcleo_kgsl_power(true);

	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
	msm_device_uart_dm1.name = "msm_serial_hs"; /* for bcm */
    	msm_device_uart_dm1.resource[3].end = 6;

	platform_add_devices(devices, ARRAY_SIZE(devices));

	htcleo_init_panel();

#ifdef CONFIG_USB_ANDROID
	htcleo_add_usb_devices();
#endif

	i2c_register_board_info(0, base_i2c_devices, ARRAY_SIZE(base_i2c_devices));
	
	htcleo_init_mmc(0);
	platform_device_register(&htcleo_timed_gpios);
	
//#ifdef CONFIG_HTCLEO_BLINK_ON_BOOT
	/* Blink the camera LED shortly to show that we're alive! */
	htcleo_blink_camera_led();
//#endif // CONFIG_HTCLEO_BLINK_ON_BOOT

}
static void __init htcleo_init(void)
{
// Cotulla vibro test
//	*(uint32_t*)0xF800380C |= 0x20;

	printk("htcleo_init()\n");
	msm_hw_reset_hook = htcleo_reset;

	do_grp_reset();
	do_sdc1_reset();
	msm_clock_init(&qds8x50_clock_init_data);
	acpuclk_init(&acpuclk_8x50_soc_data);

	init_dex_comm();

#ifdef CONFIG_SERIAL_MSM_HS
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
#if 0
	msm_device_uart_dm1.name = "msm_serial_hs_brcm"; /* for bcm */
	msm_device_uart_dm1.resource[3].end = 6;
#endif
#endif

	config_gpio_table(bt_gpio_table, ARRAY_SIZE(bt_gpio_table));

	htcleo_audio_init();

	msm_device_i2c_init();

	platform_add_devices(devices, ARRAY_SIZE(devices));

	platform_add_devices(msm_footswitch_devices,
			msm_num_footswitch_devices);

	htcleo_init_panel();

#ifdef CONFIG_USB_G_ANDROID
	htcleo_add_usb_devices();
#endif
	msm_pm_set_platform_data(msm_pm_data, ARRAY_SIZE(msm_pm_data));

	i2c_register_board_info(0, base_i2c_devices, ARRAY_SIZE(base_i2c_devices));

	htcleo_init_mmc(0);
	platform_device_register(&htcleo_timed_gpios);

#ifdef CONFIG_HTCLEO_BLINK_ON_BOOT
	/* Blink the camera LED shortly to show that we're alive! */
	htcleo_blink_camera_led();
#endif // CONFIG_HTCLEO_BLINK_ON_BOOT

}
Beispiel #3
0
static void __init htcleo_init(void)
{
#ifdef CONFIG_HTCLEO_BLINK_AT_BOOT
	volatile unsigned *bank6_in, *bank6_out;
#endif
	printk("htcleo_init()\n");

	msm_hw_reset_hook = htcleo_reset;

#ifdef CONFIG_PERFLOCK
	perflock_init(&htcleo_perflock_data);
#endif

	msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1,
			      &msm_device_uart1.dev, 1, MSM_GPIO_TO_INT(139));

//	config_gpio_table(misc_gpio_table, ARRAY_SIZE(misc_gpio_table));

	config_gpio_table(bt_gpio_table, ARRAY_SIZE(bt_gpio_table));

		gpio_request(HTCLEO_GPIO_TP_LS_EN, "tp_ls_en");
	gpio_direction_output(HTCLEO_GPIO_TP_LS_EN, 0);
	gpio_request(HTCLEO_GPIO_TP_EN, "tp_en");
	gpio_direction_output(HTCLEO_GPIO_TP_EN, 0);
//	gpio_request(HTCLEO_GPIO_PROXIMITY_EN, "proximity_en");
//	gpio_direction_output(HTCLEO_GPIO_PROXIMITY_EN, 1);
	gpio_request(HTCLEO_GPIO_LS_EN_N, "ls_en");
	gpio_request(HTCLEO_GPIO_COMPASS_RST_N, "compass_rst");
	gpio_direction_output(HTCLEO_GPIO_COMPASS_RST_N, 1);
	gpio_request(HTCLEO_GPIO_COMPASS_INT_N, "compass_int");
	gpio_direction_input(HTCLEO_GPIO_COMPASS_INT_N);

	gpio_request(HTCLEO_GPIO_DS2482_SLP_N, "ds2482_slp_n");

	/* set the gpu power rail to manual mode so clk en/dis will not
	 * turn off gpu power, and hang it on resume */
	htcleo_kgsl_power_rail_mode(0);
	htcleo_kgsl_power(true);

	msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata;
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;

	platform_add_devices(devices, ARRAY_SIZE(devices));

	i2c_register_board_info(0, base_i2c_devices,
		ARRAY_SIZE(base_i2c_devices));

	if (htcleo_init_mmc(system_rev, debug_uart) != 0)
		pr_crit("%s: Unable to initialize MMC\n", __func__);

	htcleo_audio_init();
	htcleo_headset_init();

	platform_device_register(&htcleo_timed_gpios);

	ds2784_battery_init();

	msm_acpu_clock_init(&htcleo_clock_data);



//}   what's this??


#ifdef CONFIG_SERIAL_MSM_HS
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
	msm_device_uart_dm1.name = "msm_serial_hs"; /* for bcm */
	msm_device_uart_dm1.resource[3].end = 6;
#endif

	config_gpio_table(bt_gpio_table, ARRAY_SIZE(bt_gpio_table));

//	bt_export_bd_address();

	htcleo_audio_init();

//	msm_device_i2c_init();

	/* set the gpu power rail to manual mode so clk en/dis will not
	* turn off gpu power, and hang it on resume */

	htcleo_kgsl_power_rail_mode(0);
	htcleo_kgsl_power(false);
	mdelay(100);
	htcleo_kgsl_power(true);

	platform_add_devices(devices, ARRAY_SIZE(devices));

	htcleo_init_panel();


	i2c_register_board_info(0, base_i2c_devices, ARRAY_SIZE(base_i2c_devices));

#ifdef CONFIG_USB_ANDROID
//	htcleo_add_usb_devices();
#endif

//	htcleo_init_mmc(0);
	platform_device_register(&htcleo_timed_gpios);


	/* Blink the camera LED shortly to show that we're alive! */
#ifdef CONFIG_HTCLEO_BLINK_AT_BOOT
	bank6_in = (unsigned int*)(MSM_GPIO1_BASE + 0x0864);
	bank6_out = (unsigned int*)(MSM_GPIO1_BASE + 0x0814);
	*bank6_out = *bank6_in ^ 0x200000;
	mdelay(50);
	*bank6_out = *bank6_in | 0x200000;
	mdelay(200);
#endif

}