mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
board: BuR: use get_nand_dev_by_index()
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>
This commit is contained in:
parent
2ecba112d7
commit
573cc46c65
1 changed files with 2 additions and 1 deletions
|
@ -259,7 +259,8 @@ static int load_devicetree(void)
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_NAND
|
#ifdef CONFIG_NAND
|
||||||
dtbsize = 0x20000;
|
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);
|
NULL, 0x20000, (u_char *)dtbaddr);
|
||||||
#else
|
#else
|
||||||
char *dtbname = getenv("dtb");
|
char *dtbname = getenv("dtb");
|
||||||
|
|
Loading…
Add table
Reference in a new issue