]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xtensa: rework {CONFIG,PLATFORM}_DEFAULT_MEM_START
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 13 Aug 2018 23:45:54 +0000 (16:45 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 20 Aug 2018 19:28:03 +0000 (12:28 -0700)
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 <jcmvbkbc@gmail.com>
arch/xtensa/Kconfig
arch/xtensa/include/asm/page.h
arch/xtensa/platforms/iss/include/platform/hardware.h
arch/xtensa/platforms/xt2000/include/platform/hardware.h
arch/xtensa/platforms/xtfpga/include/platform/hardware.h

index 787515c6770e559195adafdd6de7732d0d66175e..e82ed7216ecaaa6bba3e1444058b598939ee8f78 100644 (file)
@@ -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.
 
index 5d69c11c01b8f991d0e2fc8f92a1b38d6091d835..09c56cba442e8b1718bc6fee5b2050d13f0cdd81 100644 (file)
@@ -14,7 +14,6 @@
 #include <asm/processor.h>
 #include <asm/types.h>
 #include <asm/cache.h>
-#include <platform/hardware.h>
 #include <asm/kmem_layout.h>
 
 /*
@@ -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
 
index 9acea2508c05884b1a2042a36da0abf02f8ab464..254906a89a2b5487a517d509f4ef949cbe2a3501 100644 (file)
 #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 */
index 4ad16bfc63b83f3cbf5a93c8e765ee2030fe4ad0..a309ec19077747dc746592ddbda4b7c33679b8f0 100644 (file)
 
 #include <variant/core.h>
 
-/* 
- * Memory configuration.
- */
-
-#define PLATFORM_DEFAULT_MEM_START 0x00000000
-
 /*
  * Number of platform IRQs
  */
index cbf3cddafeafbbb21048af533493e79ec8a5972d..99d9bcbec57e182bd1ef5f4f6041404355169a9f 100644 (file)
 #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