Commit aea731c8 authored by Max Filippov's avatar Max Filippov

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: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent f79e4d5f
...@@ -530,14 +530,13 @@ config PLATFORM_WANT_DEFAULT_MEM ...@@ -530,14 +530,13 @@ config PLATFORM_WANT_DEFAULT_MEM
def_bool n def_bool n
config DEFAULT_MEM_START config DEFAULT_MEM_START
hex "Physical address of the default memory area start" hex
depends on PLATFORM_WANT_DEFAULT_MEM prompt "PAGE_OFFSET/PHYS_OFFSET" if !MMU && PLATFORM_WANT_DEFAULT_MEM
default 0x00000000 if MMU default 0x60000000 if PLATFORM_WANT_DEFAULT_MEM
default 0x60000000 if !MMU default 0x00000000
help help
This is the base address of the default memory area. This is the base address used for both PAGE_OFFSET and PHYS_OFFSET
Default memory area has platform-specific meaning, it may be used in noMMU configurations.
for e.g. early cache initialization.
If unsure, leave the default value here. If unsure, leave the default value here.
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <platform/hardware.h>
#include <asm/kmem_layout.h> #include <asm/kmem_layout.h>
/* /*
...@@ -31,8 +30,8 @@ ...@@ -31,8 +30,8 @@
#define MAX_LOW_PFN (PHYS_PFN(XCHAL_KSEG_PADDR) + \ #define MAX_LOW_PFN (PHYS_PFN(XCHAL_KSEG_PADDR) + \
PHYS_PFN(XCHAL_KSEG_SIZE)) PHYS_PFN(XCHAL_KSEG_SIZE))
#else #else
#define PAGE_OFFSET PLATFORM_DEFAULT_MEM_START #define PAGE_OFFSET _AC(CONFIG_DEFAULT_MEM_START, UL)
#define PHYS_OFFSET PLATFORM_DEFAULT_MEM_START #define PHYS_OFFSET _AC(CONFIG_DEFAULT_MEM_START, UL)
#define MAX_LOW_PFN PHYS_PFN(0xfffffffful) #define MAX_LOW_PFN PHYS_PFN(0xfffffffful)
#endif #endif
......
...@@ -15,14 +15,4 @@ ...@@ -15,14 +15,4 @@
#ifndef _XTENSA_PLATFORM_ISS_HARDWARE_H #ifndef _XTENSA_PLATFORM_ISS_HARDWARE_H
#define _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 */ #endif /* _XTENSA_PLATFORM_ISS_HARDWARE_H */
...@@ -17,12 +17,6 @@ ...@@ -17,12 +17,6 @@
#include <variant/core.h> #include <variant/core.h>
/*
* Memory configuration.
*/
#define PLATFORM_DEFAULT_MEM_START 0x00000000
/* /*
* Number of platform IRQs * Number of platform IRQs
*/ */
......
...@@ -17,10 +17,6 @@ ...@@ -17,10 +17,6 @@
#ifndef __XTENSA_XTAVNET_HARDWARE_H #ifndef __XTENSA_XTAVNET_HARDWARE_H
#define __XTENSA_XTAVNET_HARDWARE_H #define __XTENSA_XTAVNET_HARDWARE_H
/* Memory configuration. */
#define PLATFORM_DEFAULT_MEM_START __XTENSA_UL(CONFIG_DEFAULT_MEM_START)
/* Interrupt configuration. */ /* Interrupt configuration. */
#define PLATFORM_NR_IRQS 0 #define PLATFORM_NR_IRQS 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment