Use different API to fix below issue reported by coverity:
Out-of-bounds access (ARRAY_VS_SINGLETON),
ptr_arith: Using &iram_tlb_phys_addr as an array.
This might corrupt or misinterpret adjacent memory locations.
Signed-off-by: Anson Huang <Anson.Huang@freescale.com>
__cpuc_flush_dcache_area(&iram_tlb_phys_addr,
sizeof(iram_tlb_phys_addr));
if (cpu_is_imx6())
- outer_clean_range(virt_to_phys(&iram_tlb_phys_addr),
- virt_to_phys(&iram_tlb_phys_addr + 1));
+ outer_clean_range(__pa(&iram_tlb_phys_addr),
+ __pa(&iram_tlb_phys_addr + 1));
ttbr1 = save_ttbr1();
/* Now we can change the DDR frequency. */