diff options
Diffstat (limited to 'arch/arm/mach-rmobile')
-rw-r--r-- | arch/arm/mach-rmobile/Kconfig.32 | 1 | ||||
-rw-r--r-- | arch/arm/mach-rmobile/cpu_info.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-rmobile/include/mach/boot0.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-rmobile/include/mach/rmobile.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-rmobile/lowlevel_init_ca15.S | 2 | ||||
-rw-r--r-- | arch/arm/mach-rmobile/memmap-gen3.c | 92 |
6 files changed, 36 insertions, 87 deletions
diff --git a/arch/arm/mach-rmobile/Kconfig.32 b/arch/arm/mach-rmobile/Kconfig.32 index a96938c01e..97260dfefb 100644 --- a/arch/arm/mach-rmobile/Kconfig.32 +++ b/arch/arm/mach-rmobile/Kconfig.32 @@ -70,6 +70,7 @@ config TARGET_PORTER bool "Porter board" select DM select DM_SERIAL + select SUPPORT_TPL select SUPPORT_SPL select SPL_DM if SPL diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c index ba87d21b73..ce15741c41 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -18,9 +18,6 @@ int arch_cpu_init(void) #ifndef CONFIG_SYS_DCACHE_OFF void enable_caches(void) { -#if defined(CONFIG_RCAR_GEN3) - rcar_gen3_memmap_fixup(); -#endif dcache_enable(); } #endif diff --git a/arch/arm/mach-rmobile/include/mach/boot0.h b/arch/arm/mach-rmobile/include/mach/boot0.h new file mode 100644 index 0000000000..3edd461cbf --- /dev/null +++ b/arch/arm/mach-rmobile/include/mach/boot0.h @@ -0,0 +1,24 @@ +/* + * Specialty padding for the RCar Gen2 TPL JTAG loading + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#ifndef __BOOT0_H +#define __BOOT0_H + +_start: + ARM_VECTORS + +#ifdef CONFIG_TPL_BUILD + .word 0x0badc0d3; + .word 0x0badc0d3; + .word 0x0badc0d3; + .word 0x0badc0d3; + .word 0x0badc0d3; + .word 0x0badc0d3; + .word 0x0badc0d3; + .word 0x0badc0d3; +#endif + +#endif /* __BOOT0_H */ diff --git a/arch/arm/mach-rmobile/include/mach/rmobile.h b/arch/arm/mach-rmobile/include/mach/rmobile.h index ff0ca63f02..94ea366f45 100644 --- a/arch/arm/mach-rmobile/include/mach/rmobile.h +++ b/arch/arm/mach-rmobile/include/mach/rmobile.h @@ -41,7 +41,6 @@ u32 rmobile_get_cpu_type(void); u32 rmobile_get_cpu_rev_integer(void); u32 rmobile_get_cpu_rev_fraction(void); -void rcar_gen3_memmap_fixup(void); #endif /* __ASSEMBLY__ */ #endif /* __ASM_ARCH_RMOBILE_H */ diff --git a/arch/arm/mach-rmobile/lowlevel_init_ca15.S b/arch/arm/mach-rmobile/lowlevel_init_ca15.S index a5dbbea9e1..ef2280bea4 100644 --- a/arch/arm/mach-rmobile/lowlevel_init_ca15.S +++ b/arch/arm/mach-rmobile/lowlevel_init_ca15.S @@ -11,6 +11,7 @@ #include <linux/linkage.h> ENTRY(lowlevel_init) +#ifndef CONFIG_TPL_BUILD mrc p15, 0, r4, c0, c0, 5 /* mpidr */ orr r4, r4, r4, lsr #6 and r4, r4, #7 /* id 0-3 = ca15.0,1,2,3 */ @@ -83,6 +84,7 @@ _exit_init_l2_a15: bl s_init ldr lr, [sp] +#endif mov pc, lr nop ENDPROC(lowlevel_init) diff --git a/arch/arm/mach-rmobile/memmap-gen3.c b/arch/arm/mach-rmobile/memmap-gen3.c index 801e392425..52cd000a17 100644 --- a/arch/arm/mach-rmobile/memmap-gen3.c +++ b/arch/arm/mach-rmobile/memmap-gen3.c @@ -9,77 +9,24 @@ #include <common.h> #include <asm/armv8/mmu.h> -static struct mm_region r8a7795_mem_map[] = { +static struct mm_region gen3_mem_map[] = { { .virt = 0x0UL, .phys = 0x0UL, - .size = 0x80000000UL, - .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | - PTE_BLOCK_INNER_SHARE - }, { - .virt = 0x80000000UL, - .phys = 0x80000000UL, - .size = 0x80000000UL, - .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | - PTE_BLOCK_NON_SHARE | - PTE_BLOCK_PXN | PTE_BLOCK_UXN - }, { - /* List terminator */ - 0, - } -}; - -static struct mm_region r8a7796_mem_map[] = { - { - .virt = 0x0UL, - .phys = 0x0UL, - .size = 0xe0000000UL, - .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | - PTE_BLOCK_INNER_SHARE - }, { - .virt = 0xe0000000UL, - .phys = 0xe0000000UL, - .size = 0xe0000000UL, + .size = 0x40000000UL, .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, { - /* List terminator */ - 0, - } -}; - -static struct mm_region r8a77970_mem_map[] = { - { - .virt = 0x0UL, - .phys = 0x0UL, - .size = 0xe0000000UL, - .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | - PTE_BLOCK_INNER_SHARE - }, { - .virt = 0xe0000000UL, - .phys = 0xe0000000UL, - .size = 0xe0000000UL, - .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | - PTE_BLOCK_NON_SHARE | - PTE_BLOCK_PXN | PTE_BLOCK_UXN - }, { - /* List terminator */ - 0, - } -}; - -static struct mm_region r8a77995_mem_map[] = { - { - .virt = 0x0UL, - .phys = 0x0UL, - .size = 0xe0000000UL, + .virt = 0x40000000UL, + .phys = 0x40000000UL, + .size = 0x80000000UL, .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_INNER_SHARE }, { - .virt = 0xe0000000UL, - .phys = 0xe0000000UL, - .size = 0xe0000000UL, + .virt = 0xc0000000UL, + .phys = 0xc0000000UL, + .size = 0x40000000UL, .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN @@ -89,25 +36,4 @@ static struct mm_region r8a77995_mem_map[] = { } }; -struct mm_region *mem_map = r8a7795_mem_map; - -void rcar_gen3_memmap_fixup(void) -{ - u32 cpu_type = rmobile_get_cpu_type(); - - switch (cpu_type) { - case RMOBILE_CPU_TYPE_R8A7795: - mem_map = r8a7795_mem_map; - break; - case RMOBILE_CPU_TYPE_R8A7796: - case RMOBILE_CPU_TYPE_R8A77965: - mem_map = r8a7796_mem_map; - break; - case RMOBILE_CPU_TYPE_R8A77970: - mem_map = r8a77970_mem_map; - break; - case RMOBILE_CPU_TYPE_R8A77995: - mem_map = r8a77995_mem_map; - break; - } -} +struct mm_region *mem_map = gen3_mem_map; |