100-08-common-board_r-add-support-to-initialize-NMBM-after-.patch 1022 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From dcf24c8deeb43a4406ae18136c8700dc2f867415 Mon Sep 17 00:00:00 2001
  2. From: Weijie Gao <[email protected]>
  3. Date: Mon, 25 Jul 2022 11:18:03 +0800
  4. Subject: [PATCH 42/71] common: board_r: add support to initialize NMBM after
  5. nand initialization
  6. This patch add support to initialize NMBM after nand initialized.
  7. Signed-off-by: Weijie Gao <[email protected]>
  8. ---
  9. common/board_r.c | 17 +++++++++++++++++
  10. 1 file changed, 17 insertions(+)
  11. --- a/common/board_r.c
  12. +++ b/common/board_r.c
  13. @@ -373,6 +373,20 @@ static int initr_nand(void)
  14. }
  15. #endif
  16. +#ifdef CONFIG_NMBM_MTD
  17. +
  18. +__weak int board_nmbm_init(void)
  19. +{
  20. + return 0;
  21. +}
  22. +
  23. +/* go init the NMBM */
  24. +static int initr_nmbm(void)
  25. +{
  26. + return board_nmbm_init();
  27. +}
  28. +#endif
  29. +
  30. #if defined(CONFIG_CMD_ONENAND)
  31. /* go init the NAND */
  32. static int initr_onenand(void)
  33. @@ -675,6 +689,9 @@ static init_fnc_t init_sequence_r[] = {
  34. #ifdef CONFIG_CMD_ONENAND
  35. initr_onenand,
  36. #endif
  37. +#ifdef CONFIG_NMBM_MTD
  38. + initr_nmbm,
  39. +#endif
  40. #ifdef CONFIG_MMC
  41. initr_mmc,
  42. #endif