void target_init(void) { unsigned base_addr; unsigned char slot; dprintf(INFO, "target_init()\n"); /* Keypad init */ keys_init(); keypad_init(); /* Trying Slot 1 first */ slot = 1; base_addr = mmc_sdc_base[slot-1]; if(mmc_boot_main(slot, base_addr)) { /* Trying Slot 3 next */ slot = 3; base_addr = mmc_sdc_base[slot-1]; if(mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } }
void target_init(void) { uint32_t base_addr; uint8_t slot; dprintf(INFO, "target_init()\n"); /* Initialize PMIC driver */ pmic.read = pa1_ssbi2_read_bytes; pmic.write = pa1_ssbi2_write_bytes; pm8921_init(&pmic); /* Keypad init */ keys_init(); keypad_init(); /* fbcon */ display_init(); /* Trying Slot 1 first */ slot = 1; base_addr = mmc_sdc_base[slot-1]; if(mmc_boot_main(slot, base_addr)) { /* Trying Slot 3 next */ slot = 3; base_addr = mmc_sdc_base[slot-1]; if(mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } }
void target_init(void) { uint32_t base_addr; uint8_t slot; dprintf(INFO, "target_init()\n"); spmi_init(PMIC_ARB_CHANNEL_NUM, PMIC_ARB_OWNER_ID); /* Trying Slot 1*/ slot = 1; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { /* Trying Slot 2 next */ slot = 2; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } }
void target_init(void) { uint32_t base_addr; uint8_t slot; dprintf(INFO, "target_init()\n"); spmi_init(PMIC_ARB_CHANNEL_NUM, PMIC_ARB_OWNER_ID); target_keystatus(); if (target_use_signed_kernel()) target_crypto_init_params(); /* Display splash screen if enabled */ #if DISPLAY_SPLASH_SCREEN dprintf(INFO, "Display Init: Start\n"); display_init(); dprintf(INFO, "Display Init: Done\n"); #endif /* Trying Slot 1*/ slot = 1; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { /* Trying Slot 2 next */ slot = 2; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } }
void target_init(void) { unsigned base_addr; unsigned char slot; unsigned platform_id = board_platform_id(); dprintf(INFO, "target_init()\n"); /* Initialize PMIC driver */ pmic.read = (pm8921_read_func) & pa1_ssbi2_read_bytes; pmic.write = (pm8921_write_func) & pa1_ssbi2_write_bytes; pm8921_init(&pmic); /* Keypad init */ keys_init(); if(platform_id == MSM8960) { msm8960_keypad_init(); } else if(platform_id == MSM8930) { msm8930_keypad_init(); } else if( (platform_id == APQ8064) || (platform_id == MPQ8064)) { apq8064_keypad_init(); } /* Display splash screen if enabled */ #if DISPLAY_SPLASH_SCREEN display_init(); dprintf(SPEW, "Diplay initialized\n"); #endif if ((platform_id == MSM8960) || (platform_id == MSM8660A) || (platform_id == MSM8260A) || (platform_id == APQ8060A)) /* Enable Hardware CE */ platform_ce_type = CRYPTO_ENGINE_TYPE_HW; /* Trying Slot 1 first */ slot = 1; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { /* Trying Slot 3 next */ slot = 3; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } }
void target_init(void) { target_shutdown_for_rtc_alarm(); dprintf(INFO, "target_init()\n"); setup_fpga(); /* Setting Debug LEDs ON */ debug_led_write(0xFF); #if (!ENABLE_NANDWRITE) keys_init(); keypad_init(); #endif /* Display splash screen if enabled */ #if DISPLAY_SPLASH_SCREEN display_init(); dprintf(SPEW, "Diplay initialized\n"); display_image_on_screen(); #endif if (mmc_boot_main(MMC_SLOT, MSM_SDC1_BASE)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } }
static void target_mmc_mci_init() { uint32_t base_addr; uint8_t slot; /* Trying Slot 1 */ slot = 1; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { /* Trying Slot 2 next */ slot = 2; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } }
void target_init(void) { dprintf(INFO, "target_init()\n"); setup_fpga(); /* Setting Debug LEDs ON */ debug_led_write(0xFF); #if (!ENABLE_NANDWRITE) keys_init(); keypad_init(); #endif if(mmc_boot_main(MMC_SLOT,MSM_SDC1_BASE)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } }
void target_init(void) { unsigned offset; struct flash_info *flash_info; struct ptentry *board_part_list; unsigned total_num_of_blocks; unsigned next_ptr_start_adr = 0; unsigned blocks_per_1MB = 8; /* Default value of 2k page size on 256MB flash drive*/ int i; dprintf(INFO, "target_init()\n"); #if (!ENABLE_NANDWRITE) keys_init(); keypad_init(); #endif /* Display splash screen if enabled */ #if DISPLAY_SPLASH_SCREEN display_init(); dprintf(SPEW, "Diplay initialized\n"); display_image_on_screen(); #endif if (target_is_emmc_boot()) { /* Must wait for modem-up before we can intialize MMC. */ while (readl(MSM_SHARED_BASE + 0x14) != 1); if(mmc_boot_main(MMC_SLOT, MSM_SDC3_BASE)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } return; } ptable_init(&flash_ptable); smem_ptable_init(); flash_init(); flash_info = flash_get_info(); ASSERT(flash_info); offset = smem_get_apps_flash_start(); if (offset == 0xffffffff) while(1); total_num_of_blocks = flash_info->num_blocks; blocks_per_1MB = (1 << 20) / (flash_info->block_size); if (flash_ecc_bch_enabled()) board_part_list = board_part_list_bchecc; else board_part_list = board_part_list_default; for (i = 0; i < num_parts; i++) { struct ptentry *ptn = &board_part_list[i]; unsigned len = ((ptn->length) * blocks_per_1MB); if(ptn->start != 0) ASSERT(ptn->start == DIFF_START_ADDR); ptn->start = next_ptr_start_adr; if(ptn->length == VARIABLE_LENGTH) { unsigned length_for_prt = 0; unsigned j; for (j = i+1; j < num_parts; j++) { struct ptentry *temp_ptn = &board_part_list[j]; ASSERT(temp_ptn->length != VARIABLE_LENGTH); length_for_prt += ((temp_ptn->length) * blocks_per_1MB); } len = (total_num_of_blocks - 1) - (offset + ptn->start + length_for_prt); ASSERT(len >= 0); } next_ptr_start_adr = ptn->start + len; ptable_add(&flash_ptable, ptn->name, offset + ptn->start, len, ptn->flags, TYPE_APPS_PARTITION, PERM_WRITEABLE); } smem_add_modem_partitions(&flash_ptable); ptable_dump(&flash_ptable); flash_set_ptable(&flash_ptable); }
void target_init(void) { unsigned offset; struct flash_info *flash_info; unsigned total_num_of_blocks; unsigned next_ptr_start_adr = 0; unsigned blocks_per_1MB = 8; /* Default value of 2k page size on 256MB flash drive*/ unsigned base_addr; unsigned char slot; int i; dprintf(INFO, "target_init()\n"); #if (!ENABLE_NANDWRITE) keys_init(); keypad_init(); #endif if (target_is_emmc_boot()) { /* Trying Slot 2 first */ slot = 2; base_addr = mmc_sdc_base[slot-1]; if(mmc_boot_main(slot, base_addr)) { /* Trying Slot 4 next */ slot = 4; base_addr = mmc_sdc_base[slot-1]; if(mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } return; } ptable_init(&flash_ptable); smem_ptable_init(); flash_init(); flash_info = flash_get_info(); ASSERT(flash_info); enable_interleave_mode(target_is_interleaved_mode()); offset = smem_get_apps_flash_start(); if (offset == 0xffffffff) while(1); total_num_of_blocks = flash_info->num_blocks; blocks_per_1MB = (1 << 20) / (flash_info->block_size); for (i = 0; i < num_parts; i++) { struct ptentry *ptn = &board_part_list[i]; unsigned len = ((ptn->length) * blocks_per_1MB); if(ptn->start != 0) ASSERT(ptn->start == DIFF_START_ADDR); ptn->start = next_ptr_start_adr; if(ptn->length == VARIABLE_LENGTH) { unsigned length_for_prt = 0; unsigned j; for (j = i+1; j < num_parts; j++) { struct ptentry *temp_ptn = &board_part_list[j]; ASSERT(temp_ptn->length != VARIABLE_LENGTH); length_for_prt += ((temp_ptn->length) * blocks_per_1MB); } len = (total_num_of_blocks - 1) - (offset + ptn->start + length_for_prt); ASSERT(len >= 0); } next_ptr_start_adr = ptn->start + len; if(target_is_interleaved_mode()) { ptable_add(&flash_ptable, ptn->name, offset + (ptn->start / 2), (len / 2), ptn->flags, TYPE_APPS_PARTITION, PERM_WRITEABLE); } else { ptable_add(&flash_ptable, ptn->name, offset + ptn->start, len, ptn->flags, TYPE_APPS_PARTITION, PERM_WRITEABLE); } } smem_add_modem_partitions(&flash_ptable); ptable_dump(&flash_ptable); flash_set_ptable(&flash_ptable); }
void platform_init(void) { unsigned base_addr; unsigned char slot; unsigned platform_id = board_platform_id(); static pm8921_dev_t pmic; /* Initialize PMIC driver */ pmic.read = (pm8921_read_func) & pa1_ssbi2_read_bytes; pmic.write = (pm8921_write_func) & pa1_ssbi2_write_bytes; pm8921_init(&pmic); keys_add_source(&event_source); switch(platform_id) { case MSM8960: case MSM8960AB: case APQ8060AB: case MSM8260AB: case MSM8660AB: msm8960_keypad_init(); break; case MSM8130: case MSM8230: case MSM8630: case MSM8930: case MSM8130AA: case MSM8230AA: case MSM8630AA: case MSM8930AA: case MSM8930AB: case MSM8630AB: case MSM8230AB: case MSM8130AB: case APQ8030AB: case APQ8030: case APQ8030AA: msm8930_keypad_init(); break; case APQ8064: case MPQ8064: case APQ8064AA: case APQ8064AB: apq8064_keypad_init(); break; default: dprintf(CRITICAL,"Keyboard is not supported for platform: %d\n",platform_id); }; #ifdef QCOM_ENABLE_EMMC unsigned mmc_sdc_base[] = { MSM_SDC1_BASE, MSM_SDC2_BASE, MSM_SDC3_BASE, MSM_SDC4_BASE }; /* Trying Slot 1 first */ slot = 1; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { /* Trying Slot 3 next */ slot = 3; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } #endif }
void target_init(void) { unsigned base_addr; unsigned char slot; unsigned platform_id = board_platform_id(); dprintf(INFO, "target_init()\n"); pu_reason = target_check_power_on_reason(); reboot_mode = check_reboot_mode(); /* Initialize PMIC driver */ pmic.read = (pm8921_read_func) & pa1_ssbi2_read_bytes; pmic.write = (pm8921_write_func) & pa1_ssbi2_write_bytes; pm8921_init(&pmic); target_shutdown_for_battinfo(); target_shutdown_for_pwrkey(); /* Keypad init */ keys_init(); if((platform_id == MSM8960) || (platform_id == MSM8960AB) || (platform_id == APQ8060AB) || (platform_id == MSM8260AB) || (platform_id == MSM8660AB)) { msm8960_keypad_init(); } else if((platform_id == MSM8230) || (platform_id == MSM8630) || (platform_id == MSM8930) || (platform_id == MSM8230AA) || (platform_id == MSM8630AA) || (platform_id == MSM8930AA)) { msm8930_keypad_init(); } else if((platform_id == APQ8064) || (platform_id == MPQ8064) || (platform_id == APQ8064AB)) { apq8064_keypad_init(); } /* Display splash screen if enabled */ #if DISPLAY_SPLASH_SCREEN if (board_target_id() == LINUX_MACHTYPE_8960_CDP || (board_target_id() == LINUX_MACHTYPE_8960_MITWOA)) panel_backlight_on_mitwoa(0); display_init(); dprintf(INFO, "Diplay initialized\n"); mdelay(34); if (board_target_id() == LINUX_MACHTYPE_8064_MITWO || (board_target_id() == LINUX_MACHTYPE_8064_MTP)) panel_backlight_on_mitwo(1); else panel_backlight_on_mitwoa(1); #endif if ((platform_id == MSM8960) || (platform_id == MSM8960AB) || (platform_id == APQ8060AB) || (platform_id == MSM8260AB) || (platform_id == MSM8660AB) || (platform_id == MSM8660A) || (platform_id == MSM8260A) || (platform_id == APQ8060A)) /* Enable Hardware CE */ platform_ce_type = CRYPTO_ENGINE_TYPE_HW; /* Trying Slot 1 first */ slot = 1; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { /* Trying Slot 3 next */ slot = 3; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } }
void target_init(void) { unsigned base_addr; unsigned char slot; unsigned platform_id = board_platform_id(); dprintf(INFO, "target_init()\n"); /* Initialize PMIC driver */ pmic.read = (pm8921_read_func) & pa1_ssbi2_read_bytes; pmic.write = (pm8921_write_func) & pa1_ssbi2_write_bytes; pm8921_init(&pmic); /* Keypad init */ keys_init(); switch(platform_id) { case MSM8960: case MSM8960AB: case APQ8060AB: case MSM8260AB: case MSM8660AB: msm8960_keypad_init(); break; case MSM8130: case MSM8230: case MSM8630: case MSM8930: case MSM8130AA: case MSM8230AA: case MSM8630AA: case MSM8930AA: case MSM8930AB: case MSM8630AB: case MSM8230AB: case MSM8130AB: case APQ8030AB: case APQ8030: case APQ8030AA: msm8930_keypad_init(); break; case APQ8064: case MPQ8064: case APQ8064AA: case APQ8064AB: apq8064_keypad_init(); break; default: dprintf(CRITICAL,"Keyboard is not supported for platform: %d\n",platform_id); }; if ((platform_id == MSM8960) || (platform_id == MSM8960AB) || (platform_id == APQ8060AB) || (platform_id == MSM8260AB) || (platform_id == MSM8660AB) || (platform_id == MSM8660A) || (platform_id == MSM8260A) || (platform_id == APQ8060A) || (platform_id == APQ8064) || (platform_id == APQ8064AA) || (platform_id == APQ8064AB)) /* Enable Hardware CE */ platform_ce_type = CRYPTO_ENGINE_TYPE_HW; /* Trying Slot 1 first */ slot = 1; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { /* Trying Slot 3 next */ slot = 3; base_addr = mmc_sdc_base[slot - 1]; if (mmc_boot_main(slot, base_addr)) { dprintf(CRITICAL, "mmc init failed!"); ASSERT(0); } } }