diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2018-08-13 19:45:54 -0400 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2018-08-20 15:28:03 -0400 |
commit | aea731c81f998af5e45654459bac24a1c808fb22 (patch) | |
tree | 89988ef2493bf7ca73f27351db51d5a6c7dcea0f | |
parent | f79e4d5f92a129a1159c973735007d4ddc8541f3 (diff) |
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 <jcmvbkbc@gmail.com>
-rw-r--r-- | arch/xtensa/Kconfig | 15 | ||||
-rw-r--r-- | arch/xtensa/include/asm/page.h | 5 | ||||
-rw-r--r-- | arch/xtensa/platforms/iss/include/platform/hardware.h | 10 | ||||
-rw-r--r-- | arch/xtensa/platforms/xt2000/include/platform/hardware.h | 6 | ||||
-rw-r--r-- | arch/xtensa/platforms/xtfpga/include/platform/hardware.h | 4 |
5 files changed, 9 insertions, 31 deletions
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 | |||
530 | def_bool n | 530 | def_bool n |
531 | 531 | ||
532 | config DEFAULT_MEM_START | 532 | config DEFAULT_MEM_START |
533 | hex "Physical address of the default memory area start" | 533 | hex |
534 | depends on PLATFORM_WANT_DEFAULT_MEM | 534 | prompt "PAGE_OFFSET/PHYS_OFFSET" if !MMU && PLATFORM_WANT_DEFAULT_MEM |
535 | default 0x00000000 if MMU | 535 | default 0x60000000 if PLATFORM_WANT_DEFAULT_MEM |
536 | default 0x60000000 if !MMU | 536 | default 0x00000000 |
537 | help | 537 | help |
538 | This is the base address of the default memory area. | 538 | This is the base address used for both PAGE_OFFSET and PHYS_OFFSET |
539 | Default memory area has platform-specific meaning, it may be used | 539 | in noMMU configurations. |
540 | for e.g. early cache initialization. | ||
541 | 540 | ||
542 | If unsure, leave the default value here. | 541 | If unsure, leave the default value here. |
543 | 542 | ||
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 @@ | |||
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/types.h> | 15 | #include <asm/types.h> |
16 | #include <asm/cache.h> | 16 | #include <asm/cache.h> |
17 | #include <platform/hardware.h> | ||
18 | #include <asm/kmem_layout.h> | 17 | #include <asm/kmem_layout.h> |
19 | 18 | ||
20 | /* | 19 | /* |
@@ -31,8 +30,8 @@ | |||
31 | #define MAX_LOW_PFN (PHYS_PFN(XCHAL_KSEG_PADDR) + \ | 30 | #define MAX_LOW_PFN (PHYS_PFN(XCHAL_KSEG_PADDR) + \ |
32 | PHYS_PFN(XCHAL_KSEG_SIZE)) | 31 | PHYS_PFN(XCHAL_KSEG_SIZE)) |
33 | #else | 32 | #else |
34 | #define PAGE_OFFSET PLATFORM_DEFAULT_MEM_START | 33 | #define PAGE_OFFSET _AC(CONFIG_DEFAULT_MEM_START, UL) |
35 | #define PHYS_OFFSET PLATFORM_DEFAULT_MEM_START | 34 | #define PHYS_OFFSET _AC(CONFIG_DEFAULT_MEM_START, UL) |
36 | #define MAX_LOW_PFN PHYS_PFN(0xfffffffful) | 35 | #define MAX_LOW_PFN PHYS_PFN(0xfffffffful) |
37 | #endif | 36 | #endif |
38 | 37 | ||
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 @@ | |||
15 | #ifndef _XTENSA_PLATFORM_ISS_HARDWARE_H | 15 | #ifndef _XTENSA_PLATFORM_ISS_HARDWARE_H |
16 | #define _XTENSA_PLATFORM_ISS_HARDWARE_H | 16 | #define _XTENSA_PLATFORM_ISS_HARDWARE_H |
17 | 17 | ||
18 | /* | ||
19 | * Memory configuration. | ||
20 | */ | ||
21 | |||
22 | #define PLATFORM_DEFAULT_MEM_START 0x00000000 | ||
23 | |||
24 | /* | ||
25 | * Interrupt configuration. | ||
26 | */ | ||
27 | |||
28 | #endif /* _XTENSA_PLATFORM_ISS_HARDWARE_H */ | 18 | #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 @@ | |||
17 | 17 | ||
18 | #include <variant/core.h> | 18 | #include <variant/core.h> |
19 | 19 | ||
20 | /* | ||
21 | * Memory configuration. | ||
22 | */ | ||
23 | |||
24 | #define PLATFORM_DEFAULT_MEM_START 0x00000000 | ||
25 | |||
26 | /* | 20 | /* |
27 | * Number of platform IRQs | 21 | * Number of platform IRQs |
28 | */ | 22 | */ |
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 @@ | |||
17 | #ifndef __XTENSA_XTAVNET_HARDWARE_H | 17 | #ifndef __XTENSA_XTAVNET_HARDWARE_H |
18 | #define __XTENSA_XTAVNET_HARDWARE_H | 18 | #define __XTENSA_XTAVNET_HARDWARE_H |
19 | 19 | ||
20 | /* Memory configuration. */ | ||
21 | |||
22 | #define PLATFORM_DEFAULT_MEM_START __XTENSA_UL(CONFIG_DEFAULT_MEM_START) | ||
23 | |||
24 | /* Interrupt configuration. */ | 20 | /* Interrupt configuration. */ |
25 | 21 | ||
26 | #define PLATFORM_NR_IRQS 0 | 22 | #define PLATFORM_NR_IRQS 0 |