From patchwork Mon Sep 11 20:04:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 812585 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xrfBj25Mkz9sBZ for ; Tue, 12 Sep 2017 06:08:45 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id ED14EC21FAB; Mon, 11 Sep 2017 20:06:21 +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=none 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 1BC1AC21F9C; Mon, 11 Sep 2017 20:04:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B7174C21F9E; Mon, 11 Sep 2017 20:04:48 +0000 (UTC) Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by lists.denx.de (Postfix) with ESMTPS id 73234C21DA4 for ; Mon, 11 Sep 2017 20:04:44 +0000 (UTC) Received: from [86.59.122.178] (port=59228 helo=android.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1drUwj-0003kn-HA; Mon, 11 Sep 2017 22:04:42 +0200 From: Philipp Tomsich To: u-boot@lists.denx.de Date: Mon, 11 Sep 2017 22:04:14 +0200 Message-Id: <1505160270-10650-7-git-send-email-philipp.tomsich@theobroma-systems.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1505160270-10650-1-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1505160270-10650-1-git-send-email-philipp.tomsich@theobroma-systems.com> Cc: Marek Vasut , Alexandru Gagniuc , Joe Hershberger , Klaus Goger , Sebastien Bourdelin Subject: [U-Boot] [PATCH v3 06/19] net: phy: micrel: Convert to livetree 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Update the Micrel KSZ90x1 driver for a live tree. Signed-off-by: Philipp Tomsich Acked-by: Joe Hershberger Reviewed-by: Simon Glass --- Changes in v3: - added Joe's Acked-by: tag (which I had lost) Changes in v2: None drivers/net/phy/micrel_ksz90x1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c index 0bb99e6..b350a61 100644 --- a/drivers/net/phy/micrel_ksz90x1.c +++ b/drivers/net/phy/micrel_ksz90x1.c @@ -9,11 +9,11 @@ * (C) Copyright 2017 Adaptrum, Inc. * Written by Alexandru Gagniuc for Adaptrum, Inc. */ + #include #include #include #include -#include #include #include @@ -120,8 +120,7 @@ static int ksz90x1_of_config_group(struct phy_device *phydev, return -EOPNOTSUPP; for (i = 0; i < ofcfg->grpsz; i++) { - val[i] = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), - ofcfg->grp[i].name, -1); + val[i] = dev_read_u32_default(dev, ofcfg->grp[i].name, ~0); offset = ofcfg->grp[i].off; if (val[i] == -1) { /* Default register value for KSZ9021 */