void __init msm8974_init(void)
{
    struct of_dev_auxdata *adata = msm8974_auxdata_lookup;

    if (socinfo_init() < 0)
        pr_err("%s: socinfo_init() failed\n", __func__);

    msm_8974_init_gpiomux();
    regulator_has_full_constraints();
    board_dt_populate(adata);
    msm8974_add_drivers();

#ifndef CONFIG_PANTECH_SNS_PIXART_VLED_PWR_CONTROLED_BY_DDF
    {
#define PWR_IRMOTION_3P3 102
        static unsigned irmotion_i2c_gpio_table[] = {
            GPIO_CFG(PWR_IRMOTION_3P3,0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, GPIO_CFG_2MA),
        };
        int ret=0, i=0;

        printk("%s (%d) : gpio and pwr setting.\n", __func__, __LINE__);
        for(i=0; i<ARRAY_SIZE(irmotion_i2c_gpio_table); i++) {
            ret = gpio_tlmm_config(irmotion_i2c_gpio_table[i], GPIO_CFG_ENABLE);
            if(ret) {
                pr_err("%s:Failed irmotion_i2c_gpio_table gpio_tlmm_config(%d) = %d\n", __func__, i, ret);
                return;
            }
        }
        gpio_set_value(PWR_IRMOTION_3P3, 1);
    }
#endif
}
Ejemplo n.º 2
0
static void __init mpq8092_dt_map_io(void)
{
	msm_map_mpq8092_io();
	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

}
static void __init apq8064_common_init(void)
{
	if (socinfo_init() < 0)
		pr_err("socinfo_init() failed!\n");
	msm_clock_init(msm_clocks_8064_dummy, msm_num_clocks_8064_dummy);
	platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
}
static void __init htc_8916_init(void)
{
	struct of_dev_auxdata *adata = htc_8916_auxdata_lookup;

	of_platform_populate(NULL, of_default_bus_match_table, adata, NULL);
	msm_smem_init();

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

       pr_info("%s: pid=%d, pcbid=0x%X, subtype=0x%X, socver=0x%X\n", __func__
               , of_machine_pid(), of_machine_pcbid(), of_machine_subtype(), of_machine_socver());

	htc_8916_add_drivers();

#ifdef CONFIG_HTC_POWER_DEBUG
        htc_monitor_init();
#endif

#ifdef CONFIG_BT
	bt_export_bd_address();
#endif
#ifdef CONFIG_PERFLOCK
	platform_device_register(&msm8916_device_perf_lock);
#endif
}
static void __init bravo_map_io(void)
{
	msm_map_qsd8x50_io();
	msm_clock_init(msm_clocks_8x50, msm_num_clocks_8x50);
	if (socinfo_init() < 0)
		printk(KERN_ERR "%s: socinfo_init() failed!\n",__func__);
}
Ejemplo n.º 6
0
void __init msm_common_io_init(void)
{
	msm_map_common_io();
	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed!\n", __func__);
	msm7x27x_cache_init();
}
void __init msm8226_init(void)
{
	struct of_dev_auxdata *adata = msm8226_auxdata_lookup;

#ifdef CONFIG_SEC_DEBUG
	sec_debug_init();
#endif

#ifdef CONFIG_PROC_AVC
	sec_avc_log_init();
#endif

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	msm8226_init_gpiomux();
	board_dt_populate(adata);
	samsung_sys_class_init();
	msm8226_add_drivers();
#if defined(CONFIG_BATTERY_SAMSUNG)
	samsung_init_battery();
#endif
#ifdef CONFIG_SENSORS_SSP
	sensor_hub_init();
#endif
}
Ejemplo n.º 8
0
static void __init qsd8x50_init(void)
{
	if (socinfo_init() < 0)
		printk(KERN_ERR "%s: socinfo_init() failed!\n",
		       __func__);
	qsd8x50_cfg_smc91x();
	msm_acpu_clock_init(&qsd8x50_clock_data);
	msm_device_hsusb_peripheral.dev.platform_data = &msm_hsusb_pdata;
	msm_device_hsusb_host.dev.platform_data = &msm_hsusb_pdata;
	platform_add_devices(devices, ARRAY_SIZE(devices));
	msm_fb_add_devices();
	msm_camera_add_device();
	qsd8x50_init_mmc();
	bt_power_init();
	audio_gpio_init();
	msm_device_i2c_init();
	i2c_register_board_info(0, msm_i2c_board_info,
				ARRAY_SIZE(msm_i2c_board_info));
	spi_register_board_info(msm_spi_board_info,
				ARRAY_SIZE(msm_spi_board_info));
	msm_pm_set_platform_data(msm_pm_data);

#ifdef CONFIG_SURF_FFA_GPIO_KEYPAD
	if (machine_is_qsd8x50_ffa())
		platform_device_register(&keypad_device_8k_ffa);
	else
		platform_device_register(&keypad_device_surf);
#endif
}
static void __init apq8064_map_io(void)
{
	msm_shared_ram_phys = MSM_SHARED_RAM_PHYS;
	msm_map_apq8064_io();
	if (socinfo_init() < 0)
		pr_err("socinfo_init() failed!\n");
}
void __init htc_8226_init(void)
{
	struct of_dev_auxdata *adata = htc_8226_auxdata_lookup;
	printk(KERN_INFO"[htc_8226_init]: Test to see htc_8226_init()\n");

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	pr_info("%s: pid=%d, pcbid=%d, socver=0x%x\n", __func__
		, of_machine_pid(), of_machine_pcbid(), of_machine_socver());

#ifdef CONFIG_BT
	bt_export_bd_address();
#endif
	msm8226_htc_init_gpiomux();
	board_dt_populate(adata);
	htc_8226_add_drivers();
#ifdef CONFIG_HTC_BUILD_EDIAG
	platform_device_register(&android_pmem_ediag_device);
	platform_device_register(&android_pmem_ediag1_device);
	platform_device_register(&android_pmem_ediag2_device);
	platform_device_register(&android_pmem_ediag3_device);
#endif
#ifdef CONFIG_PERFLOCK
	platform_device_register(&msm8226_device_perf_lock);
#endif
#ifdef CONFIG_HTC_POWER_DEBUG
	htc_monitor_init();
#endif
}
Ejemplo n.º 11
0
void __init htc_8974_init(void)
{
	struct of_dev_auxdata *adata = htc_8974_auxdata_lookup;

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	pr_info("%s: pid=%d, pcbid=%d, socver=0x%x\n", __func__
		, of_machine_pid(), of_machine_pcbid(), of_machine_socver());

	msm_htc_8974_init_gpiomux();
	regulator_has_full_constraints();
	board_dt_populate(adata);
	htc_8974_add_drivers();
#ifdef CONFIG_HTC_BUILD_EDIAG
	platform_device_register(&android_pmem_ediag_device);
	platform_device_register(&android_pmem_ediag1_device);
	platform_device_register(&android_pmem_ediag2_device);
	platform_device_register(&android_pmem_ediag3_device);
#endif
#ifdef CONFIG_BT
	bt_export_bd_address();
#endif
#ifdef CONFIG_HTC_POWER_DEBUG
	htc_monitor_init();
#endif
}
static void __init msm8916_init(void)
{
	struct of_dev_auxdata *adata = msm8916_auxdata_lookup;
#ifdef CONFIG_SEC_DEBUG
	sec_debug_init();
#endif

#ifdef CONFIG_PROC_AVC
	sec_avc_log_init();
#endif
	/*
	 * populate devices from DT first so smem probe will get called as part
	 * of msm_smem_init.  socinfo_init needs smem support so call
	 * msm_smem_init before it.
	 */
	of_platform_populate(NULL, of_default_bus_match_table, adata, NULL);
	msm_smem_init();

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	samsung_sys_class_init();
	msm8916_add_drivers();
	platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
}
Ejemplo n.º 13
0
static void __init msm_dt_map_io(void)
{
	if (early_machine_is_copper())
		msm_map_copper_io();
	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);
}
Ejemplo n.º 14
0
void __init msm8974_init(void)
{
	struct of_dev_auxdata *adata = msm8974_auxdata_lookup;

#ifdef CONFIG_SEC_DEBUG
	sec_debug_init();
#endif

#ifdef CONFIG_PROC_AVC
	sec_avc_log_init();
#endif

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	msm_8974_init_gpiomux();
	regulator_has_full_constraints();
	board_dt_populate(adata);

	samsung_sys_class_init();
#ifdef CONFIG_SEC_FACTORY
	samsung_proc_ddrsize_init();
#endif
	msm8974_add_drivers();

	platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
	register_i2c_devices();

#ifdef CONFIG_SENSORS_SSP
	sensor_hub_init();
#endif
#if defined(CONFIG_KEYBOARD_MATRIX) && defined(CONFIG_MACH_MONTBLANC)
	platform_device_register(&folder_keypad_device);
#ifdef CONFIG_INPUT_FLIP
	flip_init_hw();
	platform_device_register(&sec_flip_device);
#endif	
#endif
#if defined(CONFIG_BATTERY_SAMSUNG)
	samsung_init_battery();
#endif
#if defined(CONFIG_BT_BCM4335) || defined(CONFIG_BT_BCM4339)
	msm8974_bt_init();
#endif
#if defined(CONFIG_BCM4335) || defined(CONFIG_BCM4335_MODULE) || defined(CONFIG_BCM4339) || defined(CONFIG_BCM4339_MODULE)
	brcm_wlan_init();
#endif

#if defined(CONFIG_SAMSUNG_LPM_MODE)
	if(poweroff_charging)
	{
		modem_power_off();
	}
#endif

#if defined (CONFIG_MOTOR_DRV_ISA1400)
	vienna_motor_init();
#endif
}
Ejemplo n.º 15
0
static void __init msm7x2x_init(void)
{
	if (socinfo_init() < 0)
		BUG();

	msm_clock_init(msm_clocks_7x27, msm_num_clocks_7x27);

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

	if (cpu_is_msm7x27())
		msm7x2x_clock_data.max_axi_khz = 200000;

	msm_acpu_clock_init(&msm7x2x_clock_data);

	msm_add_pmem_devices();
	msm_add_fb_device();
#if !defined(CONFIG_MSM_SERIAL_DEBUGGER)
	if (lge_get_uart_mode())
		platform_device_register(&msm_device_uart3);
#endif
	platform_add_devices(devices, ARRAY_SIZE(devices));
#ifdef CONFIG_ARCH_MSM7X27
	msm_add_kgsl_device();
#endif
	msm_add_usb_devices();

#ifdef CONFIG_MSM_CAMERA
	config_camera_off_gpios(); /* might not be necessary */
#endif
	msm_device_i2c_init();
	i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));

	if (cpu_is_msm7x27())
		msm_pm_set_platform_data(msm7x27_pm_data,
					ARRAY_SIZE(msm7x27_pm_data));
	else
		msm_pm_set_platform_data(msm7x25_pm_data,
					ARRAY_SIZE(msm7x25_pm_data));
	msm7x27_wlan_init();

#ifdef CONFIG_ANDROID_RAM_CONSOLE
	lge_add_ramconsole_devices();
	lge_add_ers_devices();
	lge_add_panic_handler_devices();
#endif
	lge_add_camera_devices();
	lge_add_lcd_devices();
	lge_add_btpower_devices();
	lge_add_mmc_devices();
	lge_add_input_devices();
	lge_add_misc_devices();
	lge_add_pm_devices();
	
	/* gpio i2c devices should be registered at latest point */
	lge_add_gpio_i2c_devices();
}
Ejemplo n.º 16
0
void __init msm9625_init(void)
{
	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);
	msm_clock_init(&msm_dummy_clock_init_data);
	of_platform_populate(NULL, of_default_bus_match_table,
			msm9625_auxdata_lookup, NULL);
}
Ejemplo n.º 17
0
void __init msm9615_map_io(void)
{
	msm_shared_ram_phys = MSM_SHARED_RAM_PHYS;
	msm_map_msm9615_io();
	l2x0_cache_init();
	if (socinfo_init() < 0)
		pr_err("socinfo_init() failed!\n");
}
void __init msmkrypton_init(void)
{
	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	msmkrypton_init_gpiomux();
	board_dt_populate(msmkrypton_auxdata_lookup);
	msmkrypton_add_drivers();
}
Ejemplo n.º 19
0
void __init msmzinc_init(void)
{
	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	msmzinc_init_gpiomux();
	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
	msmzinc_add_drivers();
}
Ejemplo n.º 20
0
static void __init msm7x2x_init(void)
{
	if (socinfo_init() < 0)
		printk(KERN_ERR "%s: socinfo_init() failed!\n",
		       __func__);

	msm_clock_init(msm_clocks_7x27a, msm_num_clocks_7x27a);
	msm_acpu_clock_init(&msm7x2x_clock_data);

	/* Common functions for SURF/FFA/RUMI3 */
	msm_device_i2c_init();

	msm7x27a_init_ebi2();
#ifdef CONFIG_SERIAL_MSM_HS
	msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
#endif

	msm_add_pmem_devices();
	msm_add_fb_device();

	platform_add_devices(m3eu_devices,
		ARRAY_SIZE(m3eu_devices));

	/*7x25a kgsl initializations*/
	msm7x25a_kgsl_3d0_init();

	if (lge_get_uart_mode()) {
		if (lge_bd_rev == LGE_REV_A)
			platform_device_register(&msm_device_uart3);
		else
			platform_device_register(&msm_device_uart1);
	}

	lge_add_input_devices();
	lge_add_misc_devices();
	lge_add_mmc_devices();
	lge_add_sound_devices();
	lge_add_lcd_devices();
	lge_add_camera_devices();
	lge_add_pm_devices();
	lge_add_usb_devices();
	lge_add_connectivity_devices(); /* [email protected], for Bluetooth/FM */

	/* gpio i2c devices should be registered at latest point */
	lge_add_gpio_i2c_devices();

	lge_add_ramconsole_devices();
#if defined(CONFIG_ANDROID_RAM_CONSOLE) && defined(CONFIG_LGE_HANDLE_PANIC)
	lge_add_panic_handler_devices();
#endif
/* [email protected] [2011-09-22] - Read power on status and update boot reason */
#ifdef CONFIG_LGE_POWER_ON_STATUS_PATCH
	lge_board_pwr_on_status();
#endif

}
Ejemplo n.º 21
0
static void __init msm7x2x_init(void)
{
	if (socinfo_init() < 0)
		printk(KERN_ERR "%s: socinfo_init() failed!\n",
		       __func__);

	msm_clock_init(msm_clocks_7x27a, msm_num_clocks_7x27a);
	msm_acpu_clock_init(&msm7x2x_clock_data);

	/* Common functions for SURF/FFA/RUMI3 */
	msm_device_i2c_init();

	msm7x27a_init_ebi2();
#ifdef CONFIG_SERIAL_MSM_HS
	msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
	msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
#endif

	msm_add_pmem_devices();
	msm_add_fb_device();

	platform_add_devices(m3_devices,
		ARRAY_SIZE(m3_devices));

	/*7x25a kgsl initializations*/
	msm7x25a_kgsl_3d0_init();

	platform_device_register(&msm_device_uart1);

	lge_add_input_devices();
	lge_add_misc_devices();
	lge_add_mmc_devices();
	lge_add_sound_devices();
	lge_add_lcd_devices();
	lge_add_camera_devices();
	//lge_add_pm_devices();
	lge_add_usb_devices();
	lge_add_connectivity_devices(); /*                                     */

	/* gpio i2c devices should be registered at latest point */
	lge_add_gpio_i2c_devices();

	lge_add_ramconsole_devices();
#if defined(CONFIG_ANDROID_RAM_CONSOLE) && defined(CONFIG_LGE_HANDLE_PANIC)
	lge_add_panic_handler_devices();
#endif

/*                                                                                   */
#ifdef CONFIG_LGE_POWER_ON_STATUS_PATCH
	lge_board_pwr_on_status();
#endif

#ifdef CONFIG_LGE_SILENCE_RESET
	check_smem_ers_status();
#endif
}
Ejemplo n.º 22
0
void __init msm8974_init(void)
{
#ifdef CONFIG_VENDOR_EDIT
	/* OPPO 2013.07.09 hewei add begin for FTM */
	int rc = 0;
	/* OPPO 2013.07.09 hewei add end for FTM */
#endif //CONFIG_VENDOR_EDIT
	struct of_dev_auxdata *adata = msm8974_auxdata_lookup;

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);
#ifdef CONFIG_VENDOR_EDIT		
	/* OPPO 2013.07.09 hewei add begin for factory mode*/
	board_mfg_mode_init();
	/* OPPO 2013.07.09 hewei add end */
#endif //CONFIG_VENDOR_EDIT

#ifdef CONFIG_VENDOR_EDIT
/* OPPO 2013-09-03 zhanglong add for add interface start reason and boot_mode begin */
    start_reason_init();
    boot_mode_init();
/* OPPO 2013-09-03 zhanglong add for add interface start reason and boot_mode end */
#endif //CONFIG_VENDOR_EDIT
	
	msm_8974_init_gpiomux();
	regulator_has_full_constraints();
	board_dt_populate(adata);
	msm8974_add_drivers();
/*OPPO yuyi 2013-07-15 add begin for version */
#ifdef VENDOR_EDIT
	board_pcb_verison_init();
	board_rf_version_init();

#endif
/*OPPO yuyi 2013-07-15 add end for version*/

#ifdef VENDOR_EDIT
/* Xiaori.Yuan@Mobile Phone Software Dept.Driver, 2014/04/12  Add for gamma correction */
	board_gamma_index_init();
#endif /*VENDOR_EDIT*/

#ifdef VENDOR_EDIT
/* Xiaori.Yuan@Mobile Phone Software Dept.Driver, 2014/04/15  Add for find7s swap port */
board_LCD_id_index_init();
#endif /*VENDOR_EDIT*/

	
#ifdef CONFIG_VENDOR_EDIT	
	/* OPPO 2013.07.09 hewei add begin for factory mode*/
	systeminfo_kobj = kobject_create_and_add("systeminfo", NULL);
	printk("songxh create systeminto node suscess!\n");
	if (systeminfo_kobj)
		rc = sysfs_create_group(systeminfo_kobj, &attr_group);
	/* OPPO 2013.07.09 hewei add end */
#endif //CONFIG_VENDOR_EDIT	
}
Ejemplo n.º 23
0
int __init msm7x2x_misc_init(void)
{
	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed!\n", __func__);

	msm_clock_init(msm_clocks_7x27a, msm_num_clocks_7x27a);
	msm_acpu_clock_init(&msm7x2x_clock_data);

	return 0;
}
void __init apq8084_init(void)
{
	struct of_dev_auxdata *adata = apq8084_auxdata_lookup;

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	apq8084_init_gpiomux();
	of_platform_populate(NULL, of_default_bus_match_table, adata, NULL);
	apq8084_add_drivers();
}
void __init msm8610_init(void)
{
	struct of_dev_auxdata *adata = msm8610_auxdata_lookup;

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	msm8610_init_gpiomux();
	board_dt_populate(adata);
	msm8610_add_drivers();
}
static void __init mpq8092_init(void)
{
	struct of_dev_auxdata *adata = mpq8092_auxdata_lookup;

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	mpq8092_init_gpiomux();
	msm_clock_init(&mpq8092_clock_init_data);
	board_dt_populate(adata);
}
void __init msm8974_init(void)
{
	struct of_dev_auxdata *adata = msm8974_auxdata_lookup;

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	msm_8974_init_gpiomux();
	regulator_has_full_constraints();
	board_dt_populate(adata);
	msm8974_add_drivers();
}
Ejemplo n.º 28
0
static void __init mpq8092_init(void)
{
    struct of_dev_auxdata *adata = mpq8092_auxdata_lookup;
    struct device *parent;

    parent = socinfo_init();
    if (IS_ERR_OR_NULL(parent))
        pr_err("%s: socinfo_init() failed\n", __func__);

    mpq8092_init_gpiomux();
    msm_clock_init(&mpq8092_clock_init_data);
    of_platform_populate(NULL, of_default_bus_match_table, adata, NULL);
}
int __init msm7x2x_misc_init(void)
{
	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed!\n", __func__);

	if (cpu_is_msm7x27aa())
		msm7x2x_clock_data.max_speed_delta_khz = 504000;

	msm_clock_init(msm_clocks_7x27a, msm_num_clocks_7x27a);
	msm_acpu_clock_init(&msm7x2x_clock_data);

	return 0;
}
Ejemplo n.º 30
0
void __init msm8974_init(void)
{
	struct of_dev_auxdata *adata = msm8974_auxdata_lookup;

#ifdef CONFIG_SEC_DEBUG
	sec_debug_init();
#endif

#ifdef CONFIG_PROC_AVC
	sec_avc_log_init();
#endif

	if (socinfo_init() < 0)
		pr_err("%s: socinfo_init() failed\n", __func__);

	samsung_sys_class_init();
	msm_8974_init_gpiomux();
	regulator_has_full_constraints();
	board_dt_populate(adata);
	msm8974_add_drivers();

	platform_add_devices(common_devices, ARRAY_SIZE(common_devices));

#if defined (CONFIG_MOTOR_DRV_ISA1400)
        vienna_motor_init();
#endif

#ifdef CONFIG_REGULATOR_MAX77826
	i2c_register_board_info(MAX77826_I2C_BUS_ID, max77826_pmic_info,
		ARRAY_SIZE(max77826_pmic_info));
#endif
#ifdef CONFIG_SEC_S_PROJECT
	sensor_init();
#endif
#ifdef CONFIG_SENSORS_SSP
	sensor_hub_init();
#endif

#ifdef CONFIG_SEC_PATEK_PROJECT
	platform_device_register(&folder_keypad_device);
#endif

#ifdef CONFIG_SEC_PM_DEBUG
	msm_show_resume_irq_mask = 1;
#endif

#if defined(CONFIG_BT_BCM4335) || defined(CONFIG_BT_BCM4339)
	msm8974_bt_init();
#endif

}