From aea731c81f998af5e45654459bac24a1c808fb22 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Mon, 13 Aug 2018 16:45:54 -0700 Subject: xtensa: rework {CONFIG,PLATFORM}_DEFAULT_MEM_START Drop PLATFORM_DEFAULT_MEM_START from the platform/hardware.h headers. Provide definition of CONFIG_DEFAULT_MEM_START always, allow changing it only in noMMU configurations when PLATFORM_WANT_DEFAULT_MEM is selected. Change prompt and description so that it's clear that it controls PAGE_OFFSET and PHYS_OFFSET. Signed-off-by: Max Filippov --- arch/xtensa/Kconfig | 15 +++++++-------- arch/xtensa/include/asm/page.h | 5 ++--- arch/xtensa/platforms/iss/include/platform/hardware.h | 10 ---------- arch/xtensa/platforms/xt2000/include/platform/hardware.h | 6 ------ arch/xtensa/platforms/xtfpga/include/platform/hardware.h | 4 ---- 5 files changed, 9 insertions(+), 31 deletions(-) (limited to 'arch') diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 787515c6770e..e82ed7216eca 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -530,14 +530,13 @@ config PLATFORM_WANT_DEFAULT_MEM def_bool n config DEFAULT_MEM_START - hex "Physical address of the default memory area start" - depends on PLATFORM_WANT_DEFAULT_MEM - default 0x00000000 if MMU - default 0x60000000 if !MMU - help - This is the base address of the default memory area. - Default memory area has platform-specific meaning, it may be used - for e.g. early cache initialization. + hex + prompt "PAGE_OFFSET/PHYS_OFFSET" if !MMU && PLATFORM_WANT_DEFAULT_MEM + default 0x60000000 if PLATFORM_WANT_DEFAULT_MEM + default 0x00000000 + help + This is the base address used for both PAGE_OFFSET and PHYS_OFFSET + in noMMU configurations. If unsure, leave the default value here. diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h index 5d69c11c01b8..09c56cba442e 100644 --- a/arch/xtensa/include/asm/page.h +++ b/arch/xtensa/include/asm/page.h @@ -14,7 +14,6 @@ #include #include #include -#include #include /* @@ -31,8 +30,8 @@ #define MAX_LOW_PFN (PHYS_PFN(XCHAL_KSEG_PADDR) + \ PHYS_PFN(XCHAL_KSEG_SIZE)) #else -#define PAGE_OFFSET PLATFORM_DEFAULT_MEM_START -#define PHYS_OFFSET PLATFORM_DEFAULT_MEM_START +#define PAGE_OFFSET _AC(CONFIG_DEFAULT_MEM_START, UL) +#define PHYS_OFFSET _AC(CONFIG_DEFAULT_MEM_START, UL) #define MAX_LOW_PFN PHYS_PFN(0xfffffffful) #endif diff --git a/arch/xtensa/platforms/iss/include/platform/hardware.h b/arch/xtensa/platforms/iss/include/platform/hardware.h index 9acea2508c05..254906a89a2b 100644 --- a/arch/xtensa/platforms/iss/include/platform/hardware.h +++ b/arch/xtensa/platforms/iss/include/platform/hardware.h @@ -15,14 +15,4 @@ #ifndef _XTENSA_PLATFORM_ISS_HARDWARE_H #define _XTENSA_PLATFORM_ISS_HARDWARE_H -/* - * Memory configuration. - */ - -#define PLATFORM_DEFAULT_MEM_START 0x00000000 - -/* - * Interrupt configuration. - */ - #endif /* _XTENSA_PLATFORM_ISS_HARDWARE_H */ diff --git a/arch/xtensa/platforms/xt2000/include/platform/hardware.h b/arch/xtensa/platforms/xt2000/include/platform/hardware.h index 4ad16bfc63b8..a309ec190777 100644 --- a/arch/xtensa/platforms/xt2000/include/platform/hardware.h +++ b/arch/xtensa/platforms/xt2000/include/platform/hardware.h @@ -17,12 +17,6 @@ #include -/* - * Memory configuration. - */ - -#define PLATFORM_DEFAULT_MEM_START 0x00000000 - /* * Number of platform IRQs */ diff --git a/arch/xtensa/platforms/xtfpga/include/platform/hardware.h b/arch/xtensa/platforms/xtfpga/include/platform/hardware.h index cbf3cddafeaf..99d9bcbec57e 100644 --- a/arch/xtensa/platforms/xtfpga/include/platform/hardware.h +++ b/arch/xtensa/platforms/xtfpga/include/platform/hardware.h @@ -17,10 +17,6 @@ #ifndef __XTENSA_XTAVNET_HARDWARE_H #define __XTENSA_XTAVNET_HARDWARE_H -/* Memory configuration. */ - -#define PLATFORM_DEFAULT_MEM_START __XTENSA_UL(CONFIG_DEFAULT_MEM_START) - /* Interrupt configuration. */ #define PLATFORM_NR_IRQS 0 -- cgit v1.2.3