]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: BuR: use get_nand_dev_by_index()
authorGrygorii Strashko <grygorii.strashko@ti.com>
Tue, 27 Jun 2017 00:13:05 +0000 (19:13 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 12 Jul 2017 02:41:52 +0000 (22:41 -0400)
As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
board/BuR/common/common.c

index e8c64018eb23dbe9250925c9d4a55a8a787bc873..c3a56db76a69aab37a6ad26aa9dcdd4e22566fb7 100644 (file)
@@ -259,7 +259,8 @@ static int load_devicetree(void)
        }
 #ifdef CONFIG_NAND
        dtbsize = 0x20000;
-       rc = nand_read_skip_bad(nand_info[0], 0x40000, (size_t *)&dtbsize,
+       rc = nand_read_skip_bad(get_nand_dev_by_index(0), 0x40000,
+                               (size_t *)&dtbsize,
                                NULL, 0x20000, (u_char *)dtbaddr);
 #else
        char *dtbname = getenv("dtb");