All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/5] iMX6Q/DL:SABREAUTO/SABRESD: Move DDR and FDT configs to defconfig
@ 2014-09-02  6:11 Ye.Li
  2014-09-02  6:11 ` [U-Boot] [PATCH 2/5] iMX6Q:SABREAUTO: Rename the imximage.cfg to mx6q.cfg Ye.Li
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Ye.Li @ 2014-09-02  6:11 UTC (permalink / raw)
  To: u-boot

To support more iMX6 variants,
1. Make the DDR size configurable based on the defconfig file
2. Make the FDT file configurable based on the defconfig file

Signed-off-by: Ye.Li <B37916@freescale.com>
---
 board/freescale/mx6qsabreauto/mx6qsabreauto.c |    2 +-
 board/freescale/mx6sabresd/mx6sabresd.c       |    2 +-
 configs/mx6dlsabreauto_defconfig              |    2 +-
 configs/mx6dlsabresd_defconfig                |    2 +-
 configs/mx6qsabreauto_defconfig               |    2 +-
 configs/mx6qsabresd_defconfig                 |    2 +-
 include/configs/mx6qsabreauto.h               |    9 ++-------
 include/configs/mx6sabresd.h                  |    8 +-------
 8 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index 928dadf..bfb9b6a 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -45,7 +45,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+	gd->ram_size = (phys_size_t)CONFIG_DDR_MB * 1024 * 1024;
 
 	return 0;
 }
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 80c8ebd..5f65f1b 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -53,7 +53,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+	gd->ram_size = (phys_size_t)CONFIG_DDR_MB * 1024 * 1024;
 
 	return 0;
 }
diff --git a/configs/mx6dlsabreauto_defconfig b/configs/mx6dlsabreauto_defconfig
index b649935..ce755d1 100644
--- a/configs/mx6dlsabreauto_defconfig
+++ b/configs/mx6dlsabreauto_defconfig
@@ -1,3 +1,3 @@
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6dl.cfg,MX6DL"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6dl.cfg,MX6DL,DEFAULT_FDT_FILE=\"imx6dl-sabreauto.dtb\",DDR_MB=2048"
 CONFIG_ARM=y
 CONFIG_TARGET_MX6QSABREAUTO=y
diff --git a/configs/mx6dlsabresd_defconfig b/configs/mx6dlsabresd_defconfig
index 9ce960e..b8e6d29 100644
--- a/configs/mx6dlsabresd_defconfig
+++ b/configs/mx6dlsabresd_defconfig
@@ -1,3 +1,3 @@
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL,DEFAULT_FDT_FILE=\"imx6dl-sabresd.dtb\",DDR_MB=1024"
 CONFIG_ARM=y
 CONFIG_TARGET_MX6SABRESD=y
diff --git a/configs/mx6qsabreauto_defconfig b/configs/mx6qsabreauto_defconfig
index 7d86700..25085a9 100644
--- a/configs/mx6qsabreauto_defconfig
+++ b/configs/mx6qsabreauto_defconfig
@@ -1,3 +1,3 @@
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q,DEFAULT_FDT_FILE=\"imx6q-sabreauto.dtb\",DDR_MB=2048"
 CONFIG_ARM=y
 CONFIG_TARGET_MX6QSABREAUTO=y
diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig
index dc8e254..edfb988 100644
--- a/configs/mx6qsabresd_defconfig
+++ b/configs/mx6qsabresd_defconfig
@@ -1,3 +1,3 @@
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q,DEFAULT_FDT_FILE=\"imx6q-sabresd.dtb\",DDR_MB=1024"
 CONFIG_ARM=y
 CONFIG_TARGET_MX6SABRESD=y
diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h
index d1639c4..e8580e6 100644
--- a/include/configs/mx6qsabreauto.h
+++ b/include/configs/mx6qsabreauto.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Freescale Semiconductor, Inc.
+ * Copyright (C) 2014 Freescale Semiconductor, Inc.
  *
  * Configuration settings for the Freescale i.MX6Q SabreAuto board.
  *
@@ -12,13 +12,8 @@
 #define CONFIG_MACH_TYPE	3529
 #define CONFIG_MXC_UART_BASE	UART4_BASE
 #define CONFIG_CONSOLE_DEV		"ttymxc3"
-#if defined CONFIG_MX6Q
-#define CONFIG_DEFAULT_FDT_FILE	"imx6q-sabreauto.dtb"
-#elif defined CONFIG_MX6DL
-#define CONFIG_DEFAULT_FDT_FILE	"imx6dl-sabreauto.dtb"
-#endif
+
 #define CONFIG_MMCROOT			"/dev/mmcblk0p2"
-#define PHYS_SDRAM_SIZE		(2u * 1024 * 1024 * 1024)
 
 /* USB Configs */
 #define CONFIG_CMD_USB
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index e666ebb..c8ac5aa 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Freescale Semiconductor, Inc.
+ * Copyright (C) 2014 Freescale Semiconductor, Inc.
  *
  * Configuration settings for the Freescale i.MX6Q SabreSD board.
  *
@@ -16,12 +16,6 @@
 #define CONFIG_MXC_UART_BASE	UART1_BASE
 #define CONFIG_CONSOLE_DEV		"ttymxc0"
 #define CONFIG_MMCROOT			"/dev/mmcblk1p2"
-#if defined(CONFIG_MX6Q)
-#define CONFIG_DEFAULT_FDT_FILE	"imx6q-sabresd.dtb"
-#elif defined(CONFIG_MX6DL)
-#define CONFIG_DEFAULT_FDT_FILE	"imx6dl-sabresd.dtb"
-#endif
-#define PHYS_SDRAM_SIZE		(1u * 1024 * 1024 * 1024)
 
 #define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-09-09  5:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-02  6:11 [U-Boot] [PATCH 1/5] iMX6Q/DL:SABREAUTO/SABRESD: Move DDR and FDT configs to defconfig Ye.Li
2014-09-02  6:11 ` [U-Boot] [PATCH 2/5] iMX6Q:SABREAUTO: Rename the imximage.cfg to mx6q.cfg Ye.Li
2014-09-02 14:08   ` Fabio Estevam
2014-09-03  3:45     ` Li Ye-B37916
2014-09-02  6:11 ` [U-Boot] [PATCH 3/5] iMX6DL:SABRESD: Add new DDR script Ye.Li
2014-09-02 12:13   ` Fabio Estevam
2014-09-03  3:44     ` Li Ye-B37916
2014-09-02  6:11 ` [U-Boot] [PATCH 4/5] iMX6Solo:SABRESD: Add the i.MX6Solo SABRESD board support Ye.Li
2014-09-02 14:06   ` Fabio Estevam
2014-09-03  7:23     ` Li Ye-B37916
2014-09-08 23:41       ` Otavio Salvador
2014-09-09  3:35         ` Li Ye-B37916
2014-09-09  3:56           ` Fabio Estevam
2014-09-09  5:49             ` Li Ye-B37916
2014-09-02  6:11 ` [U-Boot] [PATCH 5/5] iMX6Solo:SABREAUTO: Add the i.MX6Solo SABREAUTO " Ye.Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.