mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-20 11:34:20 +00:00
fix(versal2): typecast operands to match data type
This corrects the MISRA violation C2012-10.3: The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category. The condition is explicitly checked against 0U, appending 'U' and typecasting for unsigned comparison. Change-Id: I37ec9f8d716347df9acea5eb084f5a423a32a058 Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
parent
8e4d5c6db0
commit
07be78d500
3 changed files with 13 additions and 11 deletions
|
@ -63,7 +63,7 @@ static inline void bl31_set_default_config(void)
|
||||||
bl32_image_ep_info.args.arg3 = XILINX_OF_BOARD_DTB_ADDR;
|
bl32_image_ep_info.args.arg3 = XILINX_OF_BOARD_DTB_ADDR;
|
||||||
#endif
|
#endif
|
||||||
bl33_image_ep_info.pc = plat_get_ns_image_entrypoint();
|
bl33_image_ep_info.pc = plat_get_ns_image_entrypoint();
|
||||||
bl33_image_ep_info.spsr = SPSR_64(MODE_EL2, MODE_SP_ELX,
|
bl33_image_ep_info.spsr = (uint32_t)SPSR_64(MODE_EL2, MODE_SP_ELX,
|
||||||
DISABLE_ALL_EXCEPTIONS);
|
DISABLE_ALL_EXCEPTIONS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ void bl31_platform_setup(void)
|
||||||
|
|
||||||
void bl31_plat_runtime_setup(void)
|
void bl31_plat_runtime_setup(void)
|
||||||
{
|
{
|
||||||
uint64_t flags = 0;
|
uint32_t flags = 0;
|
||||||
int32_t rc;
|
int32_t rc;
|
||||||
|
|
||||||
set_interrupt_rm_flag(flags, NON_SECURE);
|
set_interrupt_rm_flag(flags, NON_SECURE);
|
||||||
|
|
|
@ -69,7 +69,7 @@ static int32_t zynqmp_nopmu_pwr_domain_on(u_register_t mpidr)
|
||||||
mmio_write_32(apu_cluster_base + APU_RVBAR_L_0 + (cpu << 3),
|
mmio_write_32(apu_cluster_base + APU_RVBAR_L_0 + (cpu << 3),
|
||||||
(uint32_t)_sec_entry);
|
(uint32_t)_sec_entry);
|
||||||
mmio_write_32(apu_cluster_base + APU_RVBAR_H_0 + (cpu << 3),
|
mmio_write_32(apu_cluster_base + APU_RVBAR_H_0 + (cpu << 3),
|
||||||
_sec_entry >> 32);
|
(uint32_t)(_sec_entry >> 32));
|
||||||
|
|
||||||
/* de-assert core reset */
|
/* de-assert core reset */
|
||||||
mmio_clrbits_32(rst_apu_cluster, ((RST_APU_COLD_RESET|RST_APU_WARN_RESET) << cpu));
|
mmio_clrbits_32(rst_apu_cluster, ((RST_APU_COLD_RESET|RST_APU_WARN_RESET) << cpu));
|
||||||
|
|
|
@ -328,7 +328,7 @@ int32_t plat_scmi_clock_set_rate(unsigned int agent_id, unsigned int scmi_id,
|
||||||
unsigned long rate)
|
unsigned long rate)
|
||||||
{
|
{
|
||||||
struct scmi_clk *clock = clk_find(agent_id, scmi_id);
|
struct scmi_clk *clock = clk_find(agent_id, scmi_id);
|
||||||
unsigned long ret = UL(SCMI_SUCCESS);
|
int32_t ret = SCMI_SUCCESS;
|
||||||
|
|
||||||
if ((clock == NULL)) {
|
if ((clock == NULL)) {
|
||||||
ret = SCMI_NOT_FOUND;
|
ret = SCMI_NOT_FOUND;
|
||||||
|
@ -564,17 +564,19 @@ int32_t plat_scmi_pd_set_state(unsigned int agent_id, unsigned int flags, unsign
|
||||||
unsigned int state)
|
unsigned int state)
|
||||||
{
|
{
|
||||||
struct scmi_pd *pd = find_pd(agent_id, pd_id);
|
struct scmi_pd *pd = find_pd(agent_id, pd_id);
|
||||||
|
int32_t ret = SCMI_SUCCESS;
|
||||||
|
|
||||||
if (pd == NULL) {
|
if (pd == NULL) {
|
||||||
return SCMI_NOT_SUPPORTED;
|
ret = SCMI_NOT_SUPPORTED;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
NOTICE("SCMI: PD: set id: %d, orig state: %x, new state: %x, flags: %x\n",
|
NOTICE("SCMI: PD: set id: %d, orig state: %x, new state: %x, flags: %x\n",
|
||||||
pd_id, pd->state, state, flags);
|
pd_id, pd->state, state, flags);
|
||||||
|
|
||||||
pd->state = state;
|
pd->state = state;
|
||||||
|
}
|
||||||
|
|
||||||
return 0U;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue