From patchwork Tue Jun 27 00:12:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 780929 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wxRVJ3T8Vz9s8N for ; Tue, 27 Jun 2017 10:23:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="ThObasSZ"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 437E3C21D90; Tue, 27 Jun 2017 00:15:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2177CC21D7F; Tue, 27 Jun 2017 00:13:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7AA6CC21C39; Tue, 27 Jun 2017 00:13:32 +0000 (UTC) Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by lists.denx.de (Postfix) with ESMTPS id EA308C21C8F for ; Tue, 27 Jun 2017 00:13:28 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v5R0DC9H002412; Mon, 26 Jun 2017 19:13:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1498522392; bh=DwMefYeW5hDgiHSQZSY0LTmo0ORgsxVcBT3L6L5ylTI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ThObasSZHjFvhGsfZibaSNbCmawjAPfccLGNoiaPh2J8Pdq6VUZ8bxnyO+sT1O7wm JO6LrZIu1JQ7tLe8aDH4m8FtZCB0rMvpkpK2/PiBXyept8fUg8xuI+3ysEqZlmuaYC 5sTrvW3m8n2kmCZQL10/ryogAAUKi14Q9Z5zP91Q= Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5R0DClk024892; Mon, 26 Jun 2017 19:13:12 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Mon, 26 Jun 2017 19:13:11 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5R0DBP0010858; Mon, 26 Jun 2017 19:13:11 -0500 Received: from localhost (uda0226610.dhcp.ti.com [128.247.59.147]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v5R0DB328794; Mon, 26 Jun 2017 19:13:11 -0500 (CDT) From: Grygorii Strashko To: Lokesh Vutla , Tom Rini , Scott Wood , Simon Glass Date: Mon, 26 Jun 2017 19:12:59 -0500 Message-ID: <20170627001308.23513-10-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170627001308.23513-1-grygorii.strashko@ti.com> References: <20170627001308.23513-1-grygorii.strashko@ti.com> MIME-Version: 1.0 Cc: Stelian Pop , u-boot@lists.denx.de, Bo Shen , Franklin S Cooper Jr Subject: [U-Boot] [PATCH v4 09/18] net: phy: cortina: use get_nand_dev_by_index() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Reviewed-by: Joe Hershberger --- drivers/net/phy/cortina.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c index fd130d5..e0e9ed9 100644 --- a/drivers/net/phy/cortina.c +++ b/drivers/net/phy/cortina.c @@ -139,7 +139,8 @@ void cs4340_upload_firmware(struct phy_device *phydev) size_t fw_length = CONFIG_CORTINA_FW_LENGTH; addr = malloc(CONFIG_CORTINA_FW_LENGTH); - ret = nand_read(nand_info[0], (loff_t)CONFIG_CORTINA_FW_ADDR, + ret = nand_read(get_nand_dev_by_index(0), + (loff_t)CONFIG_CORTINA_FW_ADDR, &fw_length, (u_char *)addr); if (ret == -EUCLEAN) { printf("NAND read of Cortina firmware at 0x%x failed %d\n",