arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Thu, 13 Jul 2017 13:31:10 +0000 (19:01 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 2 Aug 2017 07:11:52 +0000 (09:11 +0200)
This patch provides an option to include OCM and TCM memory
into MMU table with corresponding memory attributes.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/cpu/armv8/zynqmp/Kconfig
arch/arm/cpu/armv8/zynqmp/cpu.c

index 5ac48ebc4d1aa904b4af16a00844106fa1ab6293..2a0e8f2cbf66e259da4d2a0bc16ca44a4382d0aa 100644 (file)
@@ -56,6 +56,12 @@ config ZYNQMP_USB
 config SYS_MALLOC_F_LEN
        default 0x600
 
+config DEFINE_TCM_OCM_MMAP
+       bool "Define TCM and OCM memory in MMU Table"
+       help
+         This option if enabled defines the TCM and OCM memory and its
+         memory attributes in MMU table entry.
+
 config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED
        bool "Overwrite SPL bootmode"
        depends on SPL
index 94ecf9066028f1f4da7b0e0c9393bd65c44ee485..5fba0716ca0df2ece9d61b08d2d8e2237a3d830e 100644 (file)
@@ -38,6 +38,14 @@ static struct mm_region zynqmp_mem_map[] = {
                         PTE_BLOCK_NON_SHARE |
                         PTE_BLOCK_PXN | PTE_BLOCK_UXN
        }, {
+#if defined(CONFIG_DEFINE_TCM_OCM_MMAP)
+               .virt = 0xffe00000UL,
+               .phys = 0xffe00000UL,
+               .size = 0x00200000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+                        PTE_BLOCK_INNER_SHARE
+       }, {
+#endif
                .virt = 0x400000000UL,
                .phys = 0x400000000UL,
                .size = 0x200000000UL,