Browse Source

Merge pull request #878 from vwadekar/tegra-memctrlv2-coverity-fix

Tegra: memctrl_v2: fix logic to calculate TZRAM_ADDR_HI bits
pull/881/head
davidcunado-arm 8 years ago
committed by GitHub
parent
commit
515d589354
  1. 4
      plat/nvidia/tegra/common/drivers/memctrl/memctrl_v2.c

4
plat/nvidia/tegra/common/drivers/memctrl/memctrl_v2.c

@ -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…
Cancel
Save