public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 17/18] armv8: fsl-layerscape: use get_nand_dev_by_index()
Date: Mon, 26 Jun 2017 19:13:07 -0500	[thread overview]
Message-ID: <20170627001308.23513-18-grygorii.strashko@ti.com> (raw)
In-Reply-To: <20170627001308.23513-1-grygorii.strashko@ti.com>

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.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: York Sun <york.sun@nxp.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 arch/arm/cpu/armv8/fsl-layerscape/ppa.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index 35c612d..24ddb5d 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -173,8 +173,9 @@ int ppa_init(void)
 	debug("%s: PPA image load from NAND\n", __func__);
 
 	nand_init();
-	ret = nand_read(nand_info[0], (loff_t)CONFIG_SYS_LS_PPA_FW_ADDR,
-		       &fdt_header_len, (u_char *)&fit);
+	ret = nand_read(get_nand_dev_by_index(0),
+			(loff_t)CONFIG_SYS_LS_PPA_FW_ADDR,
+			&fdt_header_len, (u_char *)&fit);
 	if (ret == -EUCLEAN) {
 		printf("NAND read of PPA FIT header at offset 0x%x failed\n",
 		       CONFIG_SYS_LS_PPA_FW_ADDR);
@@ -196,8 +197,9 @@ int ppa_init(void)
 
 	fw_length = CONFIG_LS_PPA_ESBC_HDR_SIZE;
 
-	ret = nand_read(nand_info[0], (loff_t)CONFIG_SYS_LS_PPA_ESBC_ADDR,
-		       &fw_length, (u_char *)ppa_hdr_ddr);
+	ret = nand_read(get_nand_dev_by_index(0),
+			(loff_t)CONFIG_SYS_LS_PPA_ESBC_ADDR,
+			&fw_length, (u_char *)ppa_hdr_ddr);
 	if (ret == -EUCLEAN) {
 		free(ppa_hdr_ddr);
 		printf("NAND read of PPA firmware at offset 0x%x failed\n",
@@ -221,8 +223,9 @@ int ppa_init(void)
 		return -ENOMEM;
 	}
 
-	ret = nand_read(nand_info[0], (loff_t)CONFIG_SYS_LS_PPA_FW_ADDR,
-		       &fw_length, (u_char *)ppa_fit_addr);
+	ret = nand_read(get_nand_dev_by_index(0),
+			(loff_t)CONFIG_SYS_LS_PPA_FW_ADDR,
+			&fw_length, (u_char *)ppa_fit_addr);
 	if (ret == -EUCLEAN) {
 		free(ppa_fit_addr);
 		printf("NAND read of PPA firmware at offset 0x%x failed\n",
-- 
2.10.1

  parent reply	other threads:[~2017-06-27  0:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27  0:12 [U-Boot] [PATCH v4 00/17] nand: remove direct acces to nand_info array Grygorii Strashko
2017-06-27  0:12 ` [U-Boot] [PATCH v4 01/18] cmd: nand: abstract global variable usage for dm conversion Grygorii Strashko
2017-07-07  3:58   ` Simon Glass
2017-07-08  0:32     ` Grygorii Strashko
2017-07-08 16:08       ` Simon Glass
2017-07-08 18:32         ` Grygorii Strashko
2017-07-12 12:14   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:12 ` [U-Boot] [PATCH v4 02/18] common: env_nand: use get_nand_dev_by_index() Grygorii Strashko
2017-07-12 12:14   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:12 ` [U-Boot] [PATCH v4 03/18] dfu: dfu_nand: " Grygorii Strashko
2017-07-12 12:14   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:12 ` [U-Boot] [PATCH v4 04/18] cmd: bootm: " Grygorii Strashko
2017-07-12 12:14   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:12 ` [U-Boot] [PATCH v4 05/18] cmd: jffs2: " Grygorii Strashko
2017-07-12 12:14   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:12 ` [U-Boot] [PATCH v4 06/18] common: " Grygorii Strashko
2017-07-12 12:14   ` [U-Boot] [U-Boot,v4,06/18] " Tom Rini
2017-06-27  0:12 ` [U-Boot] [PATCH v4 07/18] fs: " Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot,v4,07/18] " Tom Rini
2017-06-27  0:12 ` [U-Boot] [PATCH v4 08/18] cmd: nand: remove direct access to struct mtd_info->priv Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:12 ` [U-Boot] [PATCH v4 09/18] net: phy: cortina: use get_nand_dev_by_index() Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:13 ` [U-Boot] [PATCH v4 10/18] net: fm: " Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:13 ` [U-Boot] [PATCH v4 11/18] mtd: nand: drv: " Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:13 ` [U-Boot] [PATCH v4 12/18] cmd: mvebu: bubt: " Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:13 ` [U-Boot] [PATCH v4 13/18] board: atmel: " Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:13 ` [U-Boot] [PATCH v4 14/18] board: ronetix: " Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:13 ` [U-Boot] [PATCH v4 15/18] board: BuR: " Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:13 ` [U-Boot] [PATCH v4 16/18] board: toradex: " Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-06-27  0:13 ` Grygorii Strashko [this message]
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, 17/18] armv8: fsl-layerscape: " Tom Rini
2017-06-27  0:13 ` [U-Boot] [PATCH v4 18/18] mtd: nand: make nand_info array static Grygorii Strashko
2017-07-12 12:15   ` [U-Boot] [U-Boot, v4, " Tom Rini
2017-07-02 12:41 ` [U-Boot] [PATCH v4 00/17] nand: remove direct acces to nand_info array Tom Rini
2017-07-03  6:00   ` Lokesh Vutla
2017-07-03 11:17     ` Tom Rini
2017-07-04  6:13       ` Lokesh Vutla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170627001308.23513-18-grygorii.strashko@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox