3dab0536774dc76773080d9a5e86485ab70e9e4a
[openwrt/staging/mans0n.git] /
1 From dcf24c8deeb43a4406ae18136c8700dc2f867415 Mon Sep 17 00:00:00 2001
2 From: Weijie Gao <weijie.gao@mediatek.com>
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
7 This patch add support to initialize NMBM after nand initialized.
8
9 Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
10 ---
11 common/board_r.c | 17 +++++++++++++++++
12 1 file changed, 17 insertions(+)
13
14 --- a/common/board_r.c
15 +++ b/common/board_r.c
16 @@ -382,6 +382,20 @@ static int initr_nand(void)
17 }
18 #endif
19
20 +#ifdef CONFIG_NMBM_MTD
21 +
22 +__weak int board_nmbm_init(void)
23 +{
24 + return 0;
25 +}
26 +
27 +/* go init the NMBM */
28 +static int initr_nmbm(void)
29 +{
30 + return board_nmbm_init();
31 +}
32 +#endif
33 +
34 #if defined(CONFIG_CMD_ONENAND)
35 /* go init the NAND */
36 static int initr_onenand(void)
37 @@ -703,6 +717,9 @@ static init_fnc_t init_sequence_r[] = {
38 #ifdef CONFIG_CMD_ONENAND
39 initr_onenand,
40 #endif
41 +#ifdef CONFIG_NMBM_MTD
42 + initr_nmbm,
43 +#endif
44 #ifdef CONFIG_MMC
45 initr_mmc,
46 #endif