From e6aba398056f67d2dc8f47c37288303c6cbdd611 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 8 Sep 2015 11:35:11 -0600 Subject: [PATCH] SAMA5: Correct some memory map logic --- arch/arm/src/sama5/chip/sama5d2x_memorymap.h | 6 ++---- arch/arm/src/sama5/chip/sama5d3x_memorymap.h | 6 ++---- arch/arm/src/sama5/chip/sama5d4x_memorymap.h | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/arch/arm/src/sama5/chip/sama5d2x_memorymap.h b/arch/arm/src/sama5/chip/sama5d2x_memorymap.h index e541cb6605..ac5c70b094 100644 --- a/arch/arm/src/sama5/chip/sama5d2x_memorymap.h +++ b/arch/arm/src/sama5/chip/sama5d2x_memorymap.h @@ -726,15 +726,13 @@ # endif /* CONFIG_SAMA5_BOOT_ISRAM && CONFIG_ARCH_LOWVECTORS */ -#ifdef CONFIG_BOOT_RUNFROMFLASH /* In either case, the page table lies in ISRAM. If ISRAM is not the * primary RAM region, then we will need to set-up a special mapping for * the page table at boot time. */ -# if NUTTX_RAM_PADDR != SAM_ISRAM_PSECTION -# define ARMV7A_PGTABLE_MAPPING 1 -# endif +# ifndef CONFIG_SAMA5_BOOT_ISRAM +# define ARMV7A_PGTABLE_MAPPING 1 # endif #else /* !PGTABLE_BASE_PADDR || !PGTABLE_BASE_VADDR */ diff --git a/arch/arm/src/sama5/chip/sama5d3x_memorymap.h b/arch/arm/src/sama5/chip/sama5d3x_memorymap.h index c27c0fe8db..afa740f683 100644 --- a/arch/arm/src/sama5/chip/sama5d3x_memorymap.h +++ b/arch/arm/src/sama5/chip/sama5d3x_memorymap.h @@ -651,15 +651,13 @@ # endif /* CONFIG_SAMA5_BOOT_ISRAM && CONFIG_ARCH_LOWVECTORS */ -#ifdef CONFIG_BOOT_RUNFROMFLASH /* In either case, the page table lies in ISRAM. If ISRAM is not the * primary RAM region, then we will need to set-up a special mapping for * the page table at boot time. */ -# if NUTTX_RAM_PADDR != SAM_ISRAM_PSECTION -# define ARMV7A_PGTABLE_MAPPING 1 -# endif +# ifndef CONFIG_SAMA5_BOOT_ISRAM +# define ARMV7A_PGTABLE_MAPPING 1 # endif #else /* !PGTABLE_BASE_PADDR || !PGTABLE_BASE_VADDR */ diff --git a/arch/arm/src/sama5/chip/sama5d4x_memorymap.h b/arch/arm/src/sama5/chip/sama5d4x_memorymap.h index 5003f04ae9..cc9b546c26 100644 --- a/arch/arm/src/sama5/chip/sama5d4x_memorymap.h +++ b/arch/arm/src/sama5/chip/sama5d4x_memorymap.h @@ -651,15 +651,13 @@ # endif /* CONFIG_SAMA5_BOOT_ISRAM && CONFIG_ARCH_LOWVECTORS */ -#ifdef CONFIG_BOOT_RUNFROMFLASH /* In either case, the page table lies in ISRAM. If ISRAM is not the * primary RAM region, then we will need to set-up a special mapping for * the page table at boot time. */ -# if NUTTX_RAM_PADDR != SAM_ISRAM_PSECTION -# define ARMV7A_PGTABLE_MAPPING 1 -# endif +# ifndef CONFIG_SAMA5_BOOT_ISRAM +# define ARMV7A_PGTABLE_MAPPING 1 # endif #else /* !PGTABLE_BASE_PADDR || !PGTABLE_BASE_VADDR */