void bl2_el3_plat_arch_setup(void) { unsigned int soc; int skip_scp = 0; int ret; uniphier_mmap_setup(BL2_BASE, BL2_SIZE, uniphier_bl2_mmap); enable_mmu_el3(0); soc = uniphier_get_soc_id(); if (soc == UNIPHIER_SOC_UNKNOWN) { ERROR("unsupported SoC\n"); plat_error_handler(-ENOTSUP); } ret = uniphier_io_setup(soc); if (ret) { ERROR("failed to setup io devices\n"); plat_error_handler(ret); } switch (uniphier_get_boot_master(soc)) { case UNIPHIER_BOOT_MASTER_THIS: INFO("Booting from this SoC\n"); skip_scp = 1; break; case UNIPHIER_BOOT_MASTER_SCP: INFO("Booting from on-chip SCP\n"); if (uniphier_scp_is_running()) { INFO("SCP is already running. SCP_BL2 load will be skipped.\n"); skip_scp = 1; } /* * SCP must be kicked every time even if it is already running * because it polls this event after the reboot of the backend. */ uniphier_bl2_kick_scp = 1; break; case UNIPHIER_BOOT_MASTER_EXT: INFO("Booting from external SCP\n"); skip_scp = 1; break; default: plat_error_handler(-ENOTSUP); break; } if (skip_scp) { struct image_info *image_info; image_info = uniphier_get_image_info(SCP_BL2_IMAGE_ID); image_info->h.attr |= IMAGE_ATTRIB_SKIP_LOADING; } }
void bl1_plat_arch_setup(void) { uniphier_mmap_setup(UNIPHIER_SEC_DRAM_BASE, UNIPHIER_SEC_DRAM_SIZE, NULL); enable_mmu_el3(0); }