Commit 974c0724 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

ARM: 7186/1: fix Kconfig issue with PHYS_OFFSET and !MMU

Commit 1b9f95f8 (ARM: prepare for removal of a bunch of <mach/memory.h>
files) introduced CONFIG_PHYS_OFFSET but the Kconfig hex prompt did not
provide a default value.

This has the undesired side effect of breaking a reportedly used
trick for updating defconfigs on the fly for routine buildtesting
across all arch and all platforms, i.e.

	cp /path/to/somedefconfig .config ; yes "" | make oldconfig

because the config system will endlessly loop until a valid address is
provided.

However we can't just pick a random default value since it is likely to
be wrong for the majority of the boards as the right answer for this
option is quite varied.  So the fact that the config system insists on
having a proper value be entered is actually a good thing.

It turns out that only at91x40_defconfig has this problem because it has
CONFIG_MMU=n. However, in the !MMU case, there is already a CONFIG_DRAM_BASE
value that can be used here.  So let's use that as a default in that case
and suppress the redundant CONFIG_PHYS_OFFSET prompt.

Eventually the DRAM_BASE config option could simply be replaced by
PHYS_OFFSET directly, but that's a larger change better suited for later.
Reported-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 45e713ef
...@@ -220,8 +220,9 @@ config NEED_MACH_MEMORY_H ...@@ -220,8 +220,9 @@ config NEED_MACH_MEMORY_H
be avoided when possible. be avoided when possible.
config PHYS_OFFSET config PHYS_OFFSET
hex "Physical address of main memory" hex "Physical address of main memory" if MMU
depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H
default DRAM_BASE if !MMU
help help
Please provide the physical address corresponding to the Please provide the physical address corresponding to the
location of main memory in your system. location of main memory in your system.
......
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