[PATCH 4/6] nitrogen6x: Migrate DDR_MB to Kconfig
Tom Rini
trini at konsulko.com
Wed Aug 25 02:41:02 CEST 2021
Move the CONFIG_DDR_MB symbol to Kconfig. A later clean-up would be to
make dynamic memory size detection work based on how this is done on
other i.MX6 platforms.
Cc: Troy Kisky <troy.kisky at boundarydevices.com>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
For example, mx6cuboxi does dynamic memory size detection and that code
could be adapted for this platform and perhaps moved to a more generic
imx6 location.
---
board/boundary/nitrogen6x/Kconfig | 3 +++
configs/marsboard_defconfig | 1 -
configs/mx6qsabrelite_defconfig | 3 ++-
configs/nitrogen6dl2g_defconfig | 2 +-
configs/nitrogen6dl_defconfig | 2 +-
configs/nitrogen6q2g_defconfig | 2 +-
configs/nitrogen6q_defconfig | 2 +-
configs/nitrogen6s1g_defconfig | 2 +-
configs/nitrogen6s_defconfig | 2 +-
configs/riotboard_defconfig | 1 -
10 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/board/boundary/nitrogen6x/Kconfig b/board/boundary/nitrogen6x/Kconfig
index f4db56d49601..9c176c071e72 100644
--- a/board/boundary/nitrogen6x/Kconfig
+++ b/board/boundary/nitrogen6x/Kconfig
@@ -9,4 +9,7 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "nitrogen6x"
+config DDR_MB
+ int "Memory size in MB"
+
endif
diff --git a/configs/marsboard_defconfig b/configs/marsboard_defconfig
index bcb83b5d73de..8fcb16c108d1 100644
--- a/configs/marsboard_defconfig
+++ b/configs/marsboard_defconfig
@@ -11,7 +11,6 @@ CONFIG_TARGET_EMBESTMX6BOARDS=y
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx6q-marsboard"
CONFIG_DISTRO_DEFAULTS=y
-CONFIG_SYS_EXTRA_OPTIONS="DDR_MB=1024"
CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd"
# CONFIG_CONSOLE_MUX is not set
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
index 3aa679b163b4..9f0882e932f4 100644
--- a/configs/mx6qsabrelite_defconfig
+++ b/configs/mx6qsabrelite_defconfig
@@ -10,12 +10,13 @@ CONFIG_ENV_OFFSET=0xC0000
CONFIG_IMX_CONFIG="board/boundary/nitrogen6x/nitrogen6q.cfg"
CONFIG_MX6Q=y
CONFIG_TARGET_NITROGEN6X=y
+CONFIG_DDR_MB=1024
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabrelite"
CONFIG_CMD_HDMIDETECT=y
CONFIG_AHCI=y
CONFIG_DISTRO_DEFAULTS=y
-CONFIG_SYS_EXTRA_OPTIONS="DDR_MB=1024,SABRELITE"
+CONFIG_SYS_EXTRA_OPTIONS="SABRELITE"
CONFIG_BOOTDELAY=3
# CONFIG_USE_BOOTCOMMAND is not set
CONFIG_USE_PREBOOT=y
diff --git a/configs/nitrogen6dl2g_defconfig b/configs/nitrogen6dl2g_defconfig
index e2e9eb94a924..a42744ee637b 100644
--- a/configs/nitrogen6dl2g_defconfig
+++ b/configs/nitrogen6dl2g_defconfig
@@ -11,12 +11,12 @@ CONFIG_ENV_SECT_SIZE=0x2000
CONFIG_IMX_CONFIG="board/boundary/nitrogen6x/nitrogen6dl2g.cfg"
CONFIG_MX6DL=y
CONFIG_TARGET_NITROGEN6X=y
+CONFIG_DDR_MB=2048
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx6dl-nitrogen6x"
CONFIG_CMD_HDMIDETECT=y
CONFIG_AHCI=y
CONFIG_SUPPORT_RAW_INITRD=y
-CONFIG_SYS_EXTRA_OPTIONS="DDR_MB=2048"
CONFIG_BOOTDELAY=3
CONFIG_USE_PREBOOT=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
diff --git a/configs/nitrogen6dl_defconfig b/configs/nitrogen6dl_defconfig
index 5282e36550c1..bbd72084fd70 100644
--- a/configs/nitrogen6dl_defconfig
+++ b/configs/nitrogen6dl_defconfig
@@ -11,12 +11,12 @@ CONFIG_ENV_SECT_SIZE=0x2000
CONFIG_IMX_CONFIG="board/boundary/nitrogen6x/nitrogen6dl.cfg"
CONFIG_MX6DL=y
CONFIG_TARGET_NITROGEN6X=y
+CONFIG_DDR_MB=1024
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx6dl-nitrogen6x"
CONFIG_CMD_HDMIDETECT=y
CONFIG_AHCI=y
CONFIG_SUPPORT_RAW_INITRD=y
-CONFIG_SYS_EXTRA_OPTIONS="DDR_MB=1024"
CONFIG_BOOTDELAY=3
CONFIG_USE_PREBOOT=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
index 38af0d8a4aaa..3b5029cfbbc4 100644
--- a/configs/nitrogen6q2g_defconfig
+++ b/configs/nitrogen6q2g_defconfig
@@ -11,12 +11,12 @@ CONFIG_ENV_SECT_SIZE=0x2000
CONFIG_IMX_CONFIG="board/boundary/nitrogen6x/nitrogen6q2g.cfg"
CONFIG_MX6Q=y
CONFIG_TARGET_NITROGEN6X=y
+CONFIG_DDR_MB=2048
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx6q-nitrogen6x"
CONFIG_CMD_HDMIDETECT=y
CONFIG_AHCI=y
CONFIG_SUPPORT_RAW_INITRD=y
-CONFIG_SYS_EXTRA_OPTIONS="DDR_MB=2048"
CONFIG_BOOTDELAY=3
CONFIG_USE_PREBOOT=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
index 8bb207201933..a74cb8e993c5 100644
--- a/configs/nitrogen6q_defconfig
+++ b/configs/nitrogen6q_defconfig
@@ -11,12 +11,12 @@ CONFIG_ENV_SECT_SIZE=0x2000
CONFIG_IMX_CONFIG="board/boundary/nitrogen6x/nitrogen6q.cfg"
CONFIG_MX6Q=y
CONFIG_TARGET_NITROGEN6X=y
+CONFIG_DDR_MB=1024
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx6q-nitrogen6x"
CONFIG_CMD_HDMIDETECT=y
CONFIG_AHCI=y
CONFIG_SUPPORT_RAW_INITRD=y
-CONFIG_SYS_EXTRA_OPTIONS="DDR_MB=1024"
CONFIG_BOOTDELAY=3
CONFIG_USE_PREBOOT=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
diff --git a/configs/nitrogen6s1g_defconfig b/configs/nitrogen6s1g_defconfig
index e53fb05d3cfc..187657873387 100644
--- a/configs/nitrogen6s1g_defconfig
+++ b/configs/nitrogen6s1g_defconfig
@@ -11,12 +11,12 @@ CONFIG_ENV_SECT_SIZE=0x2000
CONFIG_IMX_CONFIG="board/boundary/nitrogen6x/nitrogen6s1g.cfg"
CONFIG_MX6S=y
CONFIG_TARGET_NITROGEN6X=y
+CONFIG_DDR_MB=1024
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx6dl-nitrogen6x"
CONFIG_CMD_HDMIDETECT=y
CONFIG_AHCI=y
CONFIG_SUPPORT_RAW_INITRD=y
-CONFIG_SYS_EXTRA_OPTIONS="DDR_MB=1024"
CONFIG_BOOTDELAY=3
CONFIG_USE_PREBOOT=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
diff --git a/configs/nitrogen6s_defconfig b/configs/nitrogen6s_defconfig
index ca0652d2d5fc..ef2d65f9789f 100644
--- a/configs/nitrogen6s_defconfig
+++ b/configs/nitrogen6s_defconfig
@@ -11,12 +11,12 @@ CONFIG_ENV_SECT_SIZE=0x2000
CONFIG_IMX_CONFIG="board/boundary/nitrogen6x/nitrogen6s.cfg"
CONFIG_MX6S=y
CONFIG_TARGET_NITROGEN6X=y
+CONFIG_DDR_MB=512
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx6dl-nitrogen6x"
CONFIG_CMD_HDMIDETECT=y
CONFIG_AHCI=y
CONFIG_SUPPORT_RAW_INITRD=y
-CONFIG_SYS_EXTRA_OPTIONS="DDR_MB=512"
CONFIG_BOOTDELAY=3
CONFIG_USE_PREBOOT=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
index 292d6a49f25e..69f604a700ee 100644
--- a/configs/riotboard_defconfig
+++ b/configs/riotboard_defconfig
@@ -18,7 +18,6 @@ CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_DISTRO_DEFAULTS=y
-CONFIG_SYS_EXTRA_OPTIONS="DDR_MB=1024"
CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd"
# CONFIG_CONSOLE_MUX is not set
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
--
2.17.1
More information about the U-Boot
mailing list