aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-mediatek/patches/100-08-common-board_r-add-support-to-initialize-NMBM-after-.patch
blob: 1d8139e6726f96735610c28c5513e4d830ad3399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From dcf24c8deeb43a4406ae18136c8700dc2f867415 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Mon, 25 Jul 2022 11:18:03 +0800
Subject: [PATCH 42/71] common: board_r: add support to initialize NMBM after
 nand initialization

This patch add support to initialize NMBM after nand initialized.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
 common/board_r.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/common/board_r.c
+++ b/common/board_r.c
@@ -388,6 +388,20 @@ static int initr_nand(void)
 }
 #endif
 
+#ifdef CONFIG_NMBM_MTD
+
+__weak int board_nmbm_init(void)
+{
+	return 0;
+}
+
+/* go init the NMBM */
+static int initr_nmbm(void)
+{
+	return board_nmbm_init();
+}
+#endif
+
 #if defined(CONFIG_CMD_ONENAND)
 /* go init the NAND */
 static int initr_onenand(void)
@@ -703,6 +717,9 @@ static init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_CMD_ONENAND
 	initr_onenand,
 #endif
+#ifdef CONFIG_NMBM_MTD
+	initr_nmbm,
+#endif
 #ifdef CONFIG_MMC
 	initr_mmc,
 #endif