Tegra: memctrl_v2: fix logic to calculate TZRAM_ADDR_HI bits
This patch fixes the logic to calculate the higher bits for TZRAM's base/end addresses. Fixes coverity error "31853: Wrong operator used (CONSTANT_EXPRESSION_RESULT)" Change-Id: Iff62ef18cba59cd41ad63a5c71664872728356a8 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
This commit is contained in:
parent
3d93f05a07
commit
e2b2603c55
|
@ -392,8 +392,8 @@ void tegra_memctrl_tzram_setup(uint64_t phys_base, uint32_t size_in_bytes)
|
|||
|
||||
/* Extract the high address bits from the base/end values */
|
||||
val = (uint32_t)(phys_base >> 32) & TZRAM_ADDR_HI_BITS_MASK;
|
||||
val |= (((uint32_t)(tzram_end >> 32) << TZRAM_END_HI_BITS_SHIFT) &
|
||||
TZRAM_ADDR_HI_BITS_MASK);
|
||||
val |= (((uint32_t)(tzram_end >> 32) & TZRAM_ADDR_HI_BITS_MASK) <<
|
||||
TZRAM_END_HI_BITS_SHIFT);
|
||||
tegra_mc_write_32(MC_TZRAM_HI_ADDR_BITS, val);
|
||||
|
||||
/* Disable further writes to the TZRAM setup registers */
|
||||
|
|
Loading…
Reference in New Issue