From 78c138fb573e95333d612a9481cc7b4c1a8c176f Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Thu, 23 Mar 2017 19:22:39 +0100 Subject: common: apalis/colibri imx6: spl: add config to silence console output This adds a Kconfig SPL_SILENCE_CONSOLE which allows to suppress any console output which in the normal program flow is printed in the SPL. Error messages and the likes will still be printed. Signed-off-by: Max Krummenacher Acked-by: Marcel Ziswiler --- board/toradex/apalis_imx6/apalis_imx6.c | 4 ++++ board/toradex/colibri_imx6/colibri_imx6.c | 9 +++++++++ board/toradex/common/Kconfig | 9 +++++++++ 3 files changed, 22 insertions(+) (limited to 'board') diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 93e777d6ce..bb5f2bcb18 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -1235,13 +1235,17 @@ static void spl_dram_init(void) switch (get_cpu_temp_grade(&minc, &maxc)) { case TEMP_COMMERCIAL: case TEMP_EXTCOMMERCIAL: +#ifndef CONFIG_SPL_SILENT_CONSOLE puts("Commercial temperature grade DDR3 timings.\n"); +#endif ddr_init(mx6_com_dcd_table, ARRAY_SIZE(mx6_com_dcd_table)); break; case TEMP_INDUSTRIAL: case TEMP_AUTOMOTIVE: default: +#ifndef CONFIG_SPL_SILENT_CONSOLE puts("Industrial temperature grade DDR3 timings.\n"); +#endif ddr_init(mx6_it_dcd_table, ARRAY_SIZE(mx6_it_dcd_table)); break; }; diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index 1fa0bf6252..8bf4046e7d 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -1062,10 +1062,14 @@ static void spl_dram_init(void) case TEMP_COMMERCIAL: case TEMP_EXTCOMMERCIAL: if (is_cpu_type(MXC_CPU_MX6DL)) { +#ifndef CONFIG_SPL_SILENT_CONSOLE puts("Commercial temperature grade DDR3 timings, 64bit bus width.\n"); +#endif ddr_init(mx6dl_dcd_table, ARRAY_SIZE(mx6dl_dcd_table)); } else { +#ifndef CONFIG_SPL_SILENT_CONSOLE puts("Commercial temperature grade DDR3 timings, 32bit bus width.\n"); +#endif ddr_init(mx6s_dcd_table, ARRAY_SIZE(mx6s_dcd_table)); } break; @@ -1073,9 +1077,14 @@ static void spl_dram_init(void) case TEMP_AUTOMOTIVE: default: if (is_cpu_type(MXC_CPU_MX6DL)) { +#ifndef CONFIG_SPL_SILENT_CONSOLE + puts("Industrial temperature grade DDR3 timings, 64bit bus width.\n"); +#endif ddr_init(mx6dl_dcd_table, ARRAY_SIZE(mx6dl_dcd_table)); } else { +#ifndef CONFIG_SPL_SILENT_CONSOLE puts("Industrial temperature grade DDR3 timings, 32bit bus width.\n"); +#endif ddr_init(mx6s_dcd_table, ARRAY_SIZE(mx6s_dcd_table)); } break; diff --git a/board/toradex/common/Kconfig b/board/toradex/common/Kconfig index 562c39f326..c2988d2f15 100644 --- a/board/toradex/common/Kconfig +++ b/board/toradex/common/Kconfig @@ -75,3 +75,12 @@ config IMX_GETSPLVER help Add a command to parse the SPL version from its mass storage location which can compare the found version against a given string. + +config SPL_SILENT_CONSOLE + bool "Support a silent console in SPL" + depends on SPL && (TARGET_COLIBRI_IMX6 || TARGET_APALIS_IMX6) + default y if SILENT_CONSOLE + help + This option will silence all messages printed to the console during + normal program flow on Apalis/Colibri iMX6. Error messages or + warnings are not affected. -- cgit v1.2.3