2f0ed85e53f22d69075ef98b923591675823aeff
[openwrt/staging/stintel.git] / package / boot / uboot-mediatek / patches / 500-board-mt7623-fix-mmc-detect.patch
1 --- a/board/mediatek/mt7623/mt7623_rfb.c
2 +++ b/board/mediatek/mt7623/mt7623_rfb.c
3 @@ -9,6 +9,7 @@
4 #include <env.h>
5 #include <init.h>
6 #include <mmc.h>
7 +#include <part.h>
8 #include <asm/global_data.h>
9 #include <linux/delay.h>
10
11 @@ -31,8 +32,9 @@ int mmc_get_boot_dev(void)
12 {
13 int g_mmc_devid = -1;
14 char *uflag = (char *)0x81DFFFF0;
15 + struct blk_desc *desc;
16
17 - if (!find_mmc_device(1))
18 + if (blk_get_device_by_str("mmc", "1", &desc) < 0)
19 return 0;
20
21 if (strncmp(uflag,"eMMC",4)==0) {