arm/ls102xa: create TLB to map PCIe region
authorMinghuan Lian <Minghuan.Lian@freescale.com>
Wed, 21 Jan 2015 09:29:17 +0000 (17:29 +0800)
committerYork Sun <yorksun@freescale.com>
Tue, 24 Feb 2015 21:10:31 +0000 (13:10 -0800)
commit636ef95605560a45cd9be21c6340d2bca33352ed
tree2afc2dc739ce3708be20c99107b7d96cd27608a2
parent60d517369cca0ff0352b3c9a023cd3e18e195c38
arm/ls102xa: create TLB to map PCIe region

LS1021A's PCIe1 region begins 0x40_00000000; PCIe2 begins
0x48_00000000. In order to access PCIe device, we must create
TLB to map the 40bit physical address to 32bit virtual address.
This patch will enable MMU after DDR is available and creates MMU
table in DRAM to map all 4G space; then, re-use the reserved space
to map PCIe region. The following the mapping layout.

VA mapping:
    -------  <---- 0GB
   |       |
   |       |
   |-------| <---- 0x24000000
   |///////|  ===> 192MB VA map for PCIe1 with offset 0x40_0000_0000
   |-------| <---- 0x300000000
   |       |
   |-------| <---- 0x34000000
   |///////|  ===> 192MB VA map for PCIe2 with offset 0x48_0000_0000
   |-------| <---- 0x40000000
   |       |
   |-------| <---- 0x80000000 DDR0 space start
   |\\\\\\\|
   |\\\\\\\|  ===> 2GB VA map for 2GB DDR0 Memory space
   |\\\\\\\|
   -------  <---- 4GB DDR0 space end

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
arch/arm/cpu/armv7/ls102xa/cpu.c
arch/arm/include/asm/arch-ls102xa/config.h