if (psysr == PSYSR_INVALID)
return PSCI_E_INVALID_PARAMS;
- switch (power_level) {
- case ARM_PWR_LVL0:
+ if (power_level == ARM_PWR_LVL0) {
ret = (psysr & PSYSR_AFF_L0) ? HW_ON : HW_OFF;
- break;
- case ARM_PWR_LVL1:
+ } else {
+ /* power_level == ARM_PWR_LVL1 */
ret = (psysr & PSYSR_AFF_L1) ? HW_ON : HW_OFF;
- break;
}
return ret;
}
break;
#endif
+ default:
+ /* Do nothing in default case */
+ break;
}
return err;
int plat_ic_has_interrupt_type(unsigned int type)
{
+ int has_interrupt_type = 0;
+
switch (type) {
#if GICV2_G0_FOR_EL3
case INTR_TYPE_EL3:
case INTR_TYPE_S_EL1:
#endif
case INTR_TYPE_NS:
- return 1;
+ has_interrupt_type = 1;
+ break;
default:
- return 0;
+ /* Do nothing in default case */
+ break;
}
+
+ return has_interrupt_type;
}
void plat_ic_set_interrupt_type(unsigned int id, unsigned int type)
break;
default:
assert(0);
+ break;
}
gicv2_set_interrupt_type(id, gicv2_type);
break;
default:
assert(0);
+ break;
}
gicv2_set_spi_routing(id, proc_num);
break;
default:
assert(0);
+ break;
}
gicv3_set_spi_routing(id, irm, mpidr);
}
break;
#endif
+ default:
+ /* Do nothing in default case */
+ break;
}
return err;
}
break;
#endif
+ default:
+ /* Do nothing in default case */
+ break;
}
return err;
}
break;
#endif
+ default:
+ /* Do nothing in default case */
+ break;
}
return err;
void *handle,
uint64_t flags)
{
- uint64_t rc;
-
- switch (smc_fid) {
- default:
- rc = SMC_UNK;
- WARN("Unimplemented OEM Call: 0x%x\n", smc_fid);
- }
-
- SMC_RET1(handle, rc);
+ WARN("Unimplemented OEM Call: 0x%x\n", smc_fid);
+ SMC_RET1(handle, SMC_UNK);
}
/*
boot_to_kernel(x1, x2, x3, x4);
SMC_RET0(handle);
#endif
+ default:
+ /* Do nothing in default case */
+ break;
}
}
bl_mem_params->ep_info.args.arg0 = 0xffff & read_mpidr();
bl_mem_params->ep_info.spsr = qemu_get_spsr_for_bl33_entry();
break;
+ default:
+ /* Do nothing in default case */
+ break;
}
return err;
case SIP_SVC_UID:
/* Return UID to the caller */
SMC_UUID_RET(handle, rk_sip_svc_uid);
- break;
case SIP_SVC_VERSION:
/* Return the version of current implementation */
SMC_RET2(handle, RK_SIP_SVC_VERSION_MAJOR,
RK_SIP_SVC_VERSION_MINOR);
- break;
default:
return rockchip_plat_sip_handler(smc_fid, x1, x2, x3, x4,
void *handle,
uint64_t flags)
{
- switch (smc_fid) {
- default:
- ERROR("%s: unhandled SMC (0x%x)\n", __func__, smc_fid);
- SMC_RET1(handle, SMC_UNK);
- }
+ ERROR("%s: unhandled SMC (0x%x)\n", __func__, smc_fid);
+ SMC_RET1(handle, SMC_UNK);
}
ptiming_config->rdbi = 0;
ptiming_config->wdbi = 0;
break;
+ default:
+ /* Do nothing in default case */
+ break;
}
ptiming_config->dramds = drv_config->dram_side_drv;
ptiming_config->dramodt = drv_config->dram_side_dq_odt;
case LPDDR4:
lpddr4_get_parameter(timing_config, pdram_timing);
break;
+ default:
+ /* Do nothing in default case */
+ break;
}
}
pmu_bus_idle_req(BUS_ID_PERIHP, state);
break;
default:
+ /* Do nothing in default case */
break;
}
int rockchip_soc_hlvl_pwr_dm_off(uint32_t lvl,
plat_local_state_t lvl_state)
{
- switch (lvl) {
- case MPIDR_AFFLVL1:
+ if (lvl == MPIDR_AFFLVL1) {
clst_pwr_domain_suspend(lvl_state);
- break;
- default:
- break;
}
return PSCI_E_SUCCESS;
int rockchip_soc_hlvl_pwr_dm_suspend(uint32_t lvl, plat_local_state_t lvl_state)
{
- switch (lvl) {
- case MPIDR_AFFLVL1:
+ if (lvl == MPIDR_AFFLVL1) {
clst_pwr_domain_suspend(lvl_state);
- break;
- default:
- break;
}
return PSCI_E_SUCCESS;
int rockchip_soc_hlvl_pwr_dm_on_finish(uint32_t lvl,
plat_local_state_t lvl_state)
{
- switch (lvl) {
- case MPIDR_AFFLVL1:
+ if (lvl == MPIDR_AFFLVL1) {
clst_pwr_domain_resume(lvl_state);
- break;
- default:
- break;
}
return PSCI_E_SUCCESS;
int rockchip_soc_hlvl_pwr_dm_resume(uint32_t lvl, plat_local_state_t lvl_state)
{
- switch (lvl) {
- case MPIDR_AFFLVL1:
+ if (lvl == MPIDR_AFFLVL1) {
clst_pwr_domain_resume(lvl_state);
- default:
- break;
}
return PSCI_E_SUCCESS;
bl_mem_params->ep_info.spsr = rpi3_get_spsr_for_bl33_entry();
break;
+ default:
+ /* Do nothing in default case */
+ break;
}
return err;
break;
default:
plat_error_handler(-ENOTSUP);
+ break;
}
if (!skip_scp) {
return 25000000;
case ZYNQMP_CSU_VERSION_QEMU:
return 133000000;
+ default:
+ /* Do nothing in default case */
+ break;
}
return 100000000;
case ZYNQMP_CSU_VERSION_SILICON:
label = "silicon";
break;
+ default:
+ /* Do nothing in default case */
+ break;
}
NOTICE("ATF running on XCZU%s/%s v%d/RTL%d.%d at 0x%x%s\n",
return 4000000;
case ZYNQMP_CSU_VERSION_QEMU:
return 50000000;
+ default:
+ /* Do nothing in default case */
+ break;
}
return mmio_read_32(IOU_SCNTRS_BASEFREQ);