mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
net: fm: 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: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
1ceac70080
commit
750b34c9ae
1 changed files with 2 additions and 1 deletions
|
@ -357,7 +357,8 @@ int fm_init_common(int index, struct ccsr_fman *reg)
|
|||
size_t fw_length = CONFIG_SYS_QE_FMAN_FW_LENGTH;
|
||||
void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH);
|
||||
|
||||
rc = nand_read(nand_info[0], (loff_t)CONFIG_SYS_FMAN_FW_ADDR,
|
||||
rc = nand_read(get_nand_dev_by_index(0),
|
||||
(loff_t)CONFIG_SYS_FMAN_FW_ADDR,
|
||||
&fw_length, (u_char *)addr);
|
||||
if (rc == -EUCLEAN) {
|
||||
printf("NAND read of FMAN firmware at offset 0x%x failed %d\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue