Commit f7c5f307 authored by Jiafei Pan's avatar Jiafei Pan
Browse files

layerscape: fix integer handling issues



Assert before actually using.
Signed-off-by: default avatarJiafei Pan <Jiafei.Pan@nxp.com>
parent b47f941d
...@@ -94,10 +94,10 @@ static void __dead2 ls1043_system_reset(void) ...@@ -94,10 +94,10 @@ static void __dead2 ls1043_system_reset(void)
static int ls1043_pwr_domain_on(u_register_t mpidr) static int ls1043_pwr_domain_on(u_register_t mpidr)
{ {
int core_pos = plat_core_pos_by_mpidr(mpidr); int core_pos = plat_core_pos_by_mpidr(mpidr);
uint32_t core_mask = 1 << core_pos; uint32_t core_mask, brr;
uint32_t brr;
assert(core_pos >= 0 && core_pos < PLATFORM_CORE_COUNT); assert(core_pos >= 0 && core_pos < PLATFORM_CORE_COUNT);
core_mask = 1 << core_pos;
/* set warm boot entry */ /* set warm boot entry */
mmio_write_32(LS_SCFG_BASE + LS_SCFG_SCRATCHRW0_OFFSET, mmio_write_32(LS_SCFG_BASE + LS_SCFG_SCRATCHRW0_OFFSET,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment