diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2014-10-03 20:45:39 -0400 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2014-10-21 05:28:59 -0400 |
commit | 3932b9ca55b0be314a36d3e84faff3e823c081f5 (patch) | |
tree | 6d36ed996673b5f8ba1b61fadcaac8e20ab77855 /arch/xtensa | |
parent | 5a0b1d78bfc5ca4079ea03abb0ecc0d61d676e41 (diff) |
xtensa: make PLATFORM_DEFAULT_MEM parameters configurable
This allows using xtfpga platform with both MMU and noMMU cores.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/Kconfig | 36 | ||||
-rw-r--r-- | arch/xtensa/platforms/xtfpga/include/platform/hardware.h | 4 |
2 files changed, 38 insertions, 2 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index cb44f6f95968..f860dbe28b5e 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -319,6 +319,7 @@ config XTENSA_PLATFORM_S6105 | |||
319 | config XTENSA_PLATFORM_XTFPGA | 319 | config XTENSA_PLATFORM_XTFPGA |
320 | bool "XTFPGA" | 320 | bool "XTFPGA" |
321 | select ETHOC if ETHERNET | 321 | select ETHOC if ETHERNET |
322 | select PLATFORM_WANT_DEFAULT_MEM | ||
322 | select SERIAL_CONSOLE | 323 | select SERIAL_CONSOLE |
323 | select XTENSA_CALIBRATE_CCOUNT | 324 | select XTENSA_CALIBRATE_CCOUNT |
324 | help | 325 | help |
@@ -405,6 +406,41 @@ source "drivers/pcmcia/Kconfig" | |||
405 | 406 | ||
406 | source "drivers/pci/hotplug/Kconfig" | 407 | source "drivers/pci/hotplug/Kconfig" |
407 | 408 | ||
409 | config PLATFORM_WANT_DEFAULT_MEM | ||
410 | def_bool n | ||
411 | |||
412 | config DEFAULT_MEM_START | ||
413 | hex "Physical address of the default memory area start" | ||
414 | depends on PLATFORM_WANT_DEFAULT_MEM | ||
415 | default 0x00000000 if MMU | ||
416 | default 0x40000000 if !MMU | ||
417 | help | ||
418 | This is a fallback start address of the default memory area, it is | ||
419 | used when no physical memory size is passed through DTB or through | ||
420 | boot parameter from bootloader. | ||
421 | |||
422 | In noMMU configuration the following parameters are derived from it: | ||
423 | - kernel load address; | ||
424 | - kernel entry point address; | ||
425 | - relocatable vectors base address; | ||
426 | - uBoot load address; | ||
427 | - TASK_SIZE. | ||
428 | |||
429 | If unsure, leave the default value here. | ||
430 | |||
431 | config DEFAULT_MEM_SIZE | ||
432 | hex "Maximal size of the default memory area" | ||
433 | depends on PLATFORM_WANT_DEFAULT_MEM | ||
434 | default 0x04000000 | ||
435 | help | ||
436 | This is a fallback size of the default memory area, it is used when | ||
437 | no physical memory size is passed through DTB or through boot | ||
438 | parameter from bootloader. | ||
439 | |||
440 | It's also used for TASK_SIZE calculation in noMMU configuration. | ||
441 | |||
442 | If unsure, leave the default value here. | ||
443 | |||
408 | endmenu | 444 | endmenu |
409 | 445 | ||
410 | menu "Executable file formats" | 446 | menu "Executable file formats" |
diff --git a/arch/xtensa/platforms/xtfpga/include/platform/hardware.h b/arch/xtensa/platforms/xtfpga/include/platform/hardware.h index aeb316b7ff88..6edd20bb4565 100644 --- a/arch/xtensa/platforms/xtfpga/include/platform/hardware.h +++ b/arch/xtensa/platforms/xtfpga/include/platform/hardware.h | |||
@@ -17,8 +17,8 @@ | |||
17 | 17 | ||
18 | /* Memory configuration. */ | 18 | /* Memory configuration. */ |
19 | 19 | ||
20 | #define PLATFORM_DEFAULT_MEM_START 0x00000000 | 20 | #define PLATFORM_DEFAULT_MEM_START CONFIG_DEFAULT_MEM_START |
21 | #define PLATFORM_DEFAULT_MEM_SIZE 0x04000000 | 21 | #define PLATFORM_DEFAULT_MEM_SIZE CONFIG_DEFAULT_MEM_SIZE |
22 | 22 | ||
23 | /* Interrupt configuration. */ | 23 | /* Interrupt configuration. */ |
24 | 24 | ||