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

Tegra: memctrl_v2: fix logic to calculate TZRAM_ADDR_HI bits
This commit is contained in:
davidcunado-arm 2017-03-28 17:40:40 +01:00 committed by GitHub
commit 515d589354
1 changed files with 2 additions and 2 deletions

View File

@ -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 */