ppc: io.h: Use addrmap_ translation APIs only in post-relocation phase
authorBin Meng <bmeng.cn@gmail.com>
Thu, 25 Feb 2021 09:22:37 +0000 (17:22 +0800)
committerPriyanka Jain <priyanka.jain@nxp.com>
Fri, 5 Mar 2021 04:55:43 +0000 (10:25 +0530)
commit3320656944707aff7838b1ccb4c630143a67fe08
treea0baaca753b51a4fad4155253b8478cbc5ce51f7
parente010315899b2dc5e74fec313e9de73d689b92631
ppc: io.h: Use addrmap_ translation APIs only in post-relocation phase

In phys_to_virt() and virt_to_phys(), if CONFIG_ADDR_MAP is defined,
they use addrmap_ translation APIs to do the address translation.
However these APIs only work in post-relocation phase.

Update the code logic to fall back to use the default one when in
pre-relocation phase.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
arch/powerpc/include/asm/io.h