2
0

0006-enable-silent-console.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 5eb4d4c598f2806bd1b3d1140e917bfead7851ad Mon Sep 17 00:00:00 2001
  2. From: Xiangfu <xiangfu@openmobilefree.net>
  3. Date: Wed, 10 Oct 2012 23:51:26 +0800
  4. Subject: [PATCH 6/6] enable silent console
  5. ---
  6. common/console.c | 16 ++++++++++++++++
  7. include/configs/qi_lb60.h | 2 ++
  8. 2 files changed, 18 insertions(+)
  9. diff --git a/common/console.c b/common/console.c
  10. index 1177f7d..e8a2078 100644
  11. --- a/common/console.c
  12. +++ b/common/console.c
  13. @@ -685,6 +685,14 @@ done:
  14. gd->flags |= GD_FLG_DEVINIT; /* device initialization completed */
  15. +#ifdef CONFIG_SILENT_CONSOLE
  16. + /* Check one more time the contents of the silent environment
  17. + * variable, because if the environment is loaded from NAND it was
  18. + * not available when console_init_f() was called */
  19. + if (getenv("silent") != NULL)
  20. + gd->flags |= GD_FLG_SILENT;
  21. +#endif
  22. +
  23. stdio_print_current_devices();
  24. #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE
  25. @@ -760,6 +768,14 @@ int console_init_r(void)
  26. gd->flags |= GD_FLG_DEVINIT; /* device initialization completed */
  27. +#ifdef CONFIG_SILENT_CONSOLE
  28. + /* Check one more time the contents of the silent environment
  29. + * variable, because if the environment is loaded from NAND it was
  30. + * not available when console_init_f() was called */
  31. + if (getenv("silent") != NULL)
  32. + gd->flags |= GD_FLG_SILENT;
  33. +#endif
  34. +
  35. stdio_print_current_devices();
  36. /* Setting environment variables */
  37. diff --git a/include/configs/qi_lb60.h b/include/configs/qi_lb60.h
  38. index d3e78ad..a3534ff 100644
  39. --- a/include/configs/qi_lb60.h
  40. +++ b/include/configs/qi_lb60.h
  41. @@ -102,6 +102,8 @@
  42. #define CONFIG_SYS_NO_FLASH
  43. #define CONFIG_SYS_FLASH_BASE 0 /* init flash_base as 0 */
  44. +#define CONFIG_SILENT_CONSOLE 1 /* Enable silent console */
  45. +
  46. /*
  47. * Command line configuration
  48. */
  49. --
  50. 1.7.9.5