diff options
author | Martin Roth <gaumless@gmail.com> | 2022-10-29 13:27:22 -0600 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-11-04 00:54:25 +0000 |
commit | a666af7b015e7625c3d1ae679d50c69190c6cd5d (patch) | |
tree | 7d702ff0ca52fa9470ae44e6e13eeddd6d39e947 /src/device/dram/Kconfig | |
parent | 8cfd3f88d3b286ad6ece68dcd8b634b250ec12de (diff) |
device/dram: Add kconfig options for memory types
Currently, we're building support for all memory types into every board,
and letting the linker remove anything that isn't needed. This is okay,
but it'd be nice to be able to build in just what's actually needed.
This change adds options to specify both what is used and what is not.
By doing it that way, the default values don't change, but platforms can
start removing support for memory types that are not needed. When all
platforms (SoCs, CPUs and/or Northbridge chips) specify what memory
types they support, the defaults on the options to use a particular
memory type can be set to no, and the options not to use a memory type
can be removed.
Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I07c98a702e0d67c5ad7bd9b8a4ff24c9288ab569
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68992
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/device/dram/Kconfig')
-rw-r--r-- | src/device/dram/Kconfig | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/device/dram/Kconfig b/src/device/dram/Kconfig new file mode 100644 index 0000000000..7bb1dab50d --- /dev/null +++ b/src/device/dram/Kconfig @@ -0,0 +1,57 @@ +## SPDX-License-Identifier: GPL-2.0-only + +# Short-term plan: Start adding 'USE_' and "NO_" options to each chip. +# +# Long-term plan: Every SoC or chipset should select the memory types they +# use. When they all select their memory, the 'no_' options can be removed +# and the defaults for all memory types can be set to n. + +config NO_DDR5 + bool + +config NO_LPDDR4 + bool + +config NO_DDR4 + bool + +config NO_DDR3 + bool + +config NO_DDR2 + bool + +config USE_DDR5 + bool + default n if NO_DDR5 + default y + help + system supports DDR5 memory + +config USE_LPDDR4 + bool + default n if NO_LPDDR4 + default y + help + system supports LPDDR4 memory + +config USE_DDR4 + bool + default n if NO_DDR4 + default y + help + system supports DDR4 memory + +config USE_DDR3 + bool + default n if NO_DDR3 + default y + help + system supports DDR3 memory + +config USE_DDR2 + bool + default n if NO_DDR2 + default y + help + system supports DDR2 memory |