ebaff6a6ab2c050bdf74fcc74602ed147e944cd1
[openwrt/openwrt.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 @@ -399,6 +399,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 @@ -718,6 +732,9 @@ static void initcall_run_r(void)
38 #if CONFIG_IS_ENABLED(CMD_ONENAND)
39 INITCALL(initr_onenand);
40 #endif
41 +#if CONFIG_IS_ENABLED(NMBM_MTD)
42 + INITCALL(initr_nmbm);
43 +#endif
44 #if CONFIG_IS_ENABLED(MMC)
45 INITCALL(initr_mmc);
46 #endif