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(); 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(); #ifndef CONFIG_MACH_MSM7X27A_M3MPCS_REV_A lge_add_pm_devices(); #endif 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 #ifdef CONFIG_LGE_SILENCE_RESET check_smem_ers_status(); #endif }
static void __init incrediblec_init(void) { int ret; struct kobject *properties_kobj; printk("incrediblec_init() revision=%d, engineerid=%d\n", system_rev, engineerid); msm_hw_reset_hook = incrediblec_reset; if (0 == engineerid || 0xF == engineerid) { mdp_pmem_pdata.start = MSM_PMEM_MDP_XA_BASE; android_pmem_adsp_pdata.start = MSM_PMEM_ADSP_XA_BASE; msm_kgsl_resources[1].start = MSM_GPU_MEM_XA_BASE; msm_kgsl_resources[1].end = MSM_GPU_MEM_XA_BASE + MSM_GPU_MEM_SIZE - 1; } else if (engineerid >= 3) { mdp_pmem_pdata.start = MSM_PMEM_MDP_BASE + MSM_MEM_128MB_OFFSET; android_pmem_adsp_pdata.start = MSM_PMEM_ADSP_BASE + MSM_MEM_128MB_OFFSET; msm_kgsl_resources[1].start = MSM_GPU_MEM_BASE; msm_kgsl_resources[1].end = msm_kgsl_resources[1].start + MSM_GPU_MEM_SIZE - 1; } OJ_BMA_power(); gpio_direction_output(INCREDIBLEC_GPIO_PROXIMITY_EN_N, 0); msm_acpu_clock_init(&incrediblec_clock_data); perflock_init(&incrediblec_perflock_data); #if defined(CONFIG_MSM_SERIAL_DEBUGGER) msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1, &msm_device_uart1.dev, 1, INT_UART1_RX); #endif #ifdef CONFIG_ARCH_QSD8X50 bt_export_bd_address(); #endif /* set the gpu power rail to manual mode so clk en/dis will not * turn off gpu power, and hang it on resume */ incrediblec_kgsl_power_rail_mode(0); incrediblec_kgsl_power(true); #ifdef CONFIG_SERIAL_MSM_HS msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; msm_device_uart_dm1.name = "msm_serial_hs_bcm"; /* for bcm */ #endif incrediblec_config_uart_gpios(); config_gpio_table(camera_off_gpio_table, ARRAY_SIZE(camera_off_gpio_table)); /*gpio_direction_output(INCREDIBLEC_GPIO_TP_LS_EN, 0);*/ gpio_direction_output(INCREDIBLEC_GPIO_TP_EN, 0); incrediblec_audio_init(); msm_device_i2c_init(); #ifdef CONFIG_MICROP_COMMON incrediblec_microp_init(); #endif msm_init_ums_lun(2); /*0: sd card, 1: moving nand*/ msm_register_usb_phy_init_seq(incrediblec_phy_init_seq); msm_hsusb_set_product(incrediblec_usb_products, ARRAY_SIZE(incrediblec_usb_products)); msm_register_uart_usb_switch(NULL); msm_add_usb_id_pin_gpio(INCREDIBLEC_GPIO_USB_ID_PIN); msm_add_usb_devices(msm_hsusb_8x50_phy_reset, NULL); if (system_rev >= 2) { microp_data.num_functions = ARRAY_SIZE(microp_functions_1); microp_data.microp_function = microp_functions_1; } platform_add_devices(devices, ARRAY_SIZE(devices)); i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); ret = incrediblec_init_mmc(system_rev); if (ret != 0) pr_crit("%s: Unable to initialize MMC\n", __func__); properties_kobj = kobject_create_and_add("board_properties", NULL); if (properties_kobj) ret = sysfs_create_group(properties_kobj, &incrediblec_properties_attr_group); if (!properties_kobj || ret) pr_err("failed to create board_properties\n"); msm_init_pmic_vibrator(); config_gpio_table(incrediblec_usb_phy_3v3_table, ARRAY_SIZE(incrediblec_usb_phy_3v3_table)); config_gpio_table(usb_ID_PIN_table, ARRAY_SIZE(usb_ID_PIN_table)); gpio_direction_output(INCREDIBLEC_USB_PHY_3V3_ENABLE, 1); }
static void __init msm7x30_init(void) { uint32_t soc_version = 0; if (socinfo_init() < 0) printk(KERN_ERR "%s: socinfo_init() failed!\n", __func__); soc_version = socinfo_get_version(); msm_clock_init(msm_clocks_7x30, msm_num_clocks_7x30); #ifdef CONFIG_SERIAL_MSM_CONSOLE if (lge_get_uart_mode()) msm7x30_init_uart2(); #endif msm_spm_init(&msm_spm_data, 1); msm_acpu_clock_init(&msm7x30_clock_data); msm_add_pmem_devices(); msm_add_fb_device(); msm_add_kgsl_device(); msm_add_usb_devices(); #if defined(CONFIG_LGE_MODEL_E739) msm7x30_init_marimba(); #endif #ifdef CONFIG_MSM7KV2_AUDIO lge_victor_audio_init(); msm_snddev_init(); aux_pcm_gpio_init(); #endif if (lge_get_uart_mode()) platform_device_register(&msm_device_uart2); //LGE_FW_TDMB [START] #if defined(CONFIG_TSIF) || defined(CONFIG_TSIF_MODULE) msm_device_tsif.dev.platform_data = &tsif_platform_data; #endif //LGE_FW_TDMB [END] platform_add_devices(devices, ARRAY_SIZE(devices)); msm_device_i2c_init(); msm_device_i2c_2_init(); qup_device_i2c_init(); #if defined(CONFIG_LGE_MODEL_E739) register_board_info(); #else msm7x30_init_marimba(); #endif #ifdef CONFIG_I2C_SSBI msm_device_ssbi6.dev.platform_data = &msm_i2c_ssbi6_pdata; msm_device_ssbi7.dev.platform_data = &msm_i2c_ssbi7_pdata; #endif /* initialize pm */ pmic8058_buses_init(); lge_pm_set_platform_data(); /* add lcd devices */ lge_add_lcd_devices(); /* add mmc devices */ lge_add_mmc_devices(); /* add misc devices */ lge_add_misc_devices(); /* add input devices */ lge_add_input_devices(); /* gpio i2c devices should be registered at latest point */ lge_add_gpio_i2c_devices(); /* add buletooth devices */ lge_add_btpower_devices(); /* add camera devices */ lge_add_camera_devices(); /* add ram console device */ #ifdef CONFIG_ANDROID_RAM_CONSOLE lge_add_ramconsole_devices(); #endif #if defined(CONFIG_ANDROID_RAM_CONSOLE) && defined(CONFIG_LGE_HANDLE_PANIC) lge_add_panic_handler_devices(); #endif }
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; 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(); #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)); parse_tag_bdaddr(); 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 }
static void __init icong_init(void) { int rc; char *cid = NULL; struct kobject *properties_kobj; printk(KERN_INFO "icong_init() revision = 0x%X, engineerid = 0x%X\n", system_rev, engineerid); msm_clock_init(); 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(ICONG_GPIO_LS_EN, "ls_en"); gpio_direction_output(ICONG_GPIO_LS_EN, 0); msm_hw_reset_hook = icong_reset; if (socinfo_init() < 0) BUG(); if ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) > 1) || ((SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 1) && (SOCINFO_VERSION_MINOR(socinfo_get_version()) >= 3))) { msm_acpu_clock_init(&icong_turbo_clock_data); perflock_init(&icong_turbo_perflock_data); }else{ msm_acpu_clock_init(&icong_clock_data); perflock_init(&icong_perflock_data); } #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(ICONG_GPIO_UART3_RX)); #endif msm_add_devices(); #ifdef CONFIG_SERIAL_MSM_HS msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata; msm_device_uart_dm1.name = "msm_serial_hs_bcm"; /* for bcm */ 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(ICONG_GPIO_USB_ID_PIN); msm_add_usb_devices(icong_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; config_icong_usb_id_gpios(0); platform_device_register(&msm_device_hsusb); platform_device_register(&usb_mass_storage_device); platform_device_register(&android_usb_device); #endif msm_add_mem_devices(&pmem_setting); #ifdef CONFIG_MICROP_COMMON icong_microp_init(); #endif rc = icong_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, &icong_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)); printk(KERN_INFO "[HS_BOARD] (%s) system_rev = %d, engineerid = %d\n", __func__, system_rev, engineerid); if ((system_rev == 1 && engineerid == 0x0E) || system_rev > 1) { htc_headset_mgr_data.headset_devices_num = ARRAY_SIZE(headset_devices_xb03); htc_headset_mgr_data.headset_devices = headset_devices_xb03; htc_headset_mgr_data.headset_config_num = ARRAY_SIZE(htc_headset_mgr_config); htc_headset_mgr_data.headset_config = htc_headset_mgr_config; printk(KERN_INFO "[HS_BOARD] (%s) Set MEMS config\n", __func__); } msm_device_i2c_init(); platform_add_devices(devices, ARRAY_SIZE(devices)); i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); icong_init_panel(); icong_init_keypad(); icong_wifi_init(); msm_init_pmic_vibrator(2950); }
static void __init marvelc_init(void) { int rc; char *cid = NULL; struct kobject *properties_kobj; printk("marvelc_init() revision = 0x%X\n", system_rev); msm_clock_init(); 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(MARVELC_GPIO_LS_EN, "ls_en"); gpio_direction_output(MARVELC_GPIO_LS_EN, 0); msm_hw_reset_hook = marvelc_reset; msm_acpu_clock_init(&marvelc_clock_data); perflock_init(&marvelc_perflock_data); #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(MARVELC_GPIO_UART3_RX)); #endif 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(MARVELC_GPIO_USB_ID_PIN); msm_add_usb_devices(marvelc_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; config_marvelc_usb_id_gpios(0); platform_device_register(&msm_device_hsusb); platform_device_register(&usb_mass_storage_device); platform_device_register(&android_usb_device); #endif msm_add_mem_devices(&pmem_setting); #ifdef CONFIG_MICROP_COMMON marvelc_microp_init(); #endif rc = marvelc_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, &marvelc_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)); /* probe g-sensor driver */ i2c_register_board_info(0, i2c_bma250_devices, ARRAY_SIZE(i2c_bma250_devices)); msm_device_i2c_init(); platform_add_devices(devices, ARRAY_SIZE(devices)); i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); marvelc_init_panel(); marvelc_init_keypad(); marvelc_wifi_init(); msm_init_pmic_vibrator(2800); }