예제 #1
0
static void __init zeebo_init(void)
{	
	msm_acpu_clock_init(&halibut_clock_data);
	msm_proc_comm_wince_init();

#ifdef CONFIG_MSM_SMEM_BATTCHG
	msm_device_htc_battery_smem.dev.platform_data = &zeebo_htc_battery_smem_pdata;
#endif
	//msm_device_touchscreen.dev.platform_data = &zeebo_ts_pdata;

#ifdef CONFIG_SERIAL_MSM_HS
	msm_device_uart_dm2.dev.platform_data = &msm_uart_dm2_pdata;
#endif
	platform_add_devices(devices, ARRAY_SIZE(devices));
	//i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));

	//msm_add_usb_devices(&zeebo_hsusb_board_pdata);

	

	//msm_rpc_create_server(&ffff_server);
	//msm_rpc_create_server(&fffe_server);
	//msm_init_pmic_vibrator();
	//msm_proc_comm_wince_vibrate_welcome();
}
예제 #2
0
static void __init photon_init(void)
{
	int rc;
	char *cid = NULL;
	struct kobject *properties_kobj;

#ifndef CONFIG_PHOTON_IS_NAND_BOOT
	kgsl_boot_reset();
	printk("PHOTON BOOT TYPE: SD-CARD\n");
#else
	printk("PHOTON BOOT TYPE: NAND\n");
#endif

	printk("photon_init() revision = 0x%X\n", system_rev);
	board_get_cid_tag(&cid);

	/* for bcm */
	bt_export_bd_address();

	/*
	 * Setup common MSM GPIOS
	 */
	config_gpios();

	/* We need to set this pin to 0 only once on power-up; we will
	 * not actually enable the chip until we apply power to it via
	 * vreg.
	 */
	gpio_request(PHOTON_GPIO_LS_EN, "ls_en");
	gpio_direction_output(PHOTON_GPIO_LS_EN, 0);
	/* disable power for cm3602 chip */
	/* __capella_cm3602_power(0); */

	msm_hw_reset_hook = photon_reset;

	msm_acpu_clock_init(&photon_clock_data);
	perflock_init(&photon_perflock_data);
	
	/* Battery for Photon */
	msm_proc_comm_wince_init();
	msm_device_htc_battery_wince.dev.platform_data = &htcphoton_htc_battery_wince_pdata;

#if defined(CONFIG_MSM_SERIAL_DEBUGGER)
	if (!opt_disable_uart3)
		msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3,
			&msm_device_uart3.dev, 1,
				MSM_GPIO_TO_INT(PHOTON_GPIO_UART3_RX));
#endif

	htc_acoustic_wce_board_data = &htcphoton_acoustic_data;
	msm_add_devices();

#ifdef CONFIG_SERIAL_MSM_HS
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
#ifndef CONFIG_SERIAL_MSM_HS_PURE_ANDROID
	msm_device_uart_dm1.name = "msm_serial_hs_bcm";	/* for bcm */
#endif
	msm_add_serial_devices(3);
#else
	msm_add_serial_devices(0);
#endif

	msm_add_serial_devices(2);
	/*
	msm_change_usb_id(0x0bb4, 0x0c10);
	*/
#ifdef CONFIG_USB_FUNCTION
	msm_add_usb_id_pin_gpio(PHOTON_GPIO_USB_ID_PIN);
	msm_add_usb_devices(photon_phy_reset, NULL);
#endif

#ifdef CONFIG_USB_ANDROID
	android_usb_pdata.products[0].product_id =
		android_usb_pdata.product_id;
	android_usb_pdata.serial_number = board_serialno();
	msm_hsusb_pdata.serial_number = board_serialno();
	msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata;
	platform_device_register(&msm_device_hsusb);
#ifdef CONFIG_USB_ANDROID_RNDIS
	platform_device_register(&rndis_device);
#endif
	platform_device_register(&usb_mass_storage_device);
	platform_device_register(&android_usb_device);
#endif
	msm_add_mem_devices(&pmem_setting);

#ifdef CONFIG_MICROP_COMMON
	photon_microp_init();
#endif

	rc = photon_init_mmc(system_rev);
	if (rc)
		printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc);

	properties_kobj = kobject_create_and_add("board_properties", NULL);
	if (properties_kobj)
		rc = sysfs_create_group(properties_kobj,
						&photon_properties_attr_group);
	if (!properties_kobj || rc)
		pr_err("failed to create board_properties\n");

	/* probe camera driver */
	i2c_register_board_info(0, i2c_camera_devices, ARRAY_SIZE(i2c_camera_devices));

	msm_device_i2c_init();
	platform_add_devices(devices, ARRAY_SIZE(devices));
	i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));

	photon_init_panel();

	photon_init_keypad();
	
	msm_hsusb_set_vbus_state(1);
}