From patchwork Fri Dec 11 11:59:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 555712 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9142B1402BF for ; Fri, 11 Dec 2015 23:00:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b=MKSZAxfR; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B05F94B6B5; Fri, 11 Dec 2015 12:59:55 +0100 (CET) X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5aXfS5t1Efif; Fri, 11 Dec 2015 12:59:55 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A09724B72D; Fri, 11 Dec 2015 12:59:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 78CFD4B6A7 for ; Fri, 11 Dec 2015 12:59:31 +0100 (CET) X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lovj_E4eqVXp for ; Fri, 11 Dec 2015 12:59:31 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by theia.denx.de (Postfix) with ESMTPS id 056134B622 for ; Fri, 11 Dec 2015 12:59:26 +0100 (CET) Received: by wmnn186 with SMTP id n186so28166692wmn.0 for ; Fri, 11 Dec 2015 03:59:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=CdvUJRGxNqNhPKPxzU6rEv6XJ0xMdHWRPJJ+GhdRu/A=; b=MKSZAxfRN83MorcLtgql1RyMCXp2KVGfXz7VGfdfdiNafq98IYhgODETIWIe07qFHs rFRBsmqzYUOzXFO62N1RL5IU+ThPoFcWccniXbuW9X50k9ocAhBhINukQp3xNzSPRh9c fXRAwCcJNv3QwYUbTyHEepQmER5LcynQWqv+fCSvAqvXwmfpJJje47BYj3REvm1mKvh7 7NMQfrVKV072qpo9MJHBKnA6qADE8UYhldYJmHGxZ3Bs6Yg7xZH7DJ0aKll7CtFY5DwM i3QdudyG8kLNSor217udj37nQXQH4vVjwDwmaa0ztrPfuhRXGfV4VsxNaRVmi6XX9AC6 R+eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=CdvUJRGxNqNhPKPxzU6rEv6XJ0xMdHWRPJJ+GhdRu/A=; b=Yi9Y4lGU09z11shP1A3f+rUKjSopbMvHURHMwKxxV7wT3+Eq2rcakV2ExIq4CwqxeH GPaXBXgZH11fnsOOFwypSV6QvexnQmVZJs3GnQ/zgWEnia+FFW4RXrX1YbxPL/y8/Zp+ 3EXc5u8YtoqU2wWuVrYkPcU0lKVUDGyCn6LUA9kS5Qxgwd46DFVe/9iHZBjlt4vGw/9g SdHi22M+EB0Y0o85/8eKMp2faJk7/uMaciijYXJBxcupU5snoF1caVRsq3RM6LK5ba6O 7zQdDicxCnayMa42xVsmW43Sajbh7wXvaOFlVJJ64WVz5ypwGfeM+UIG/PqDWcwGovks 9r4g== X-Gm-Message-State: ALoCoQkul9Hwui05O932dnZ6uKME6kr8ibGV67Gqnvzq/YMQzihEwRCkEZZvhC80/VP6scghmW2OriYZbf+eRwXrOgpoLjRiYw== X-Received: by 10.28.107.26 with SMTP id g26mr5501387wmc.34.1449835166368; Fri, 11 Dec 2015 03:59:26 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id v196sm3093821wmv.10.2015.12.11.03.59.25 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 11 Dec 2015 03:59:25 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de Date: Fri, 11 Dec 2015 12:59:09 +0100 Message-Id: <535c50823c3d2c6ece00d0706b09ee17912d1f00.1449835152.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Cc: Joe Hershberger Subject: [U-Boot] [PATCH 04/10] net: axi_emac: Put iobase to private structure X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" Saving iobase directly to private structure helps with moving to DM. There is an option to load iobase from pdata but it is additional load. Pointer to private structure is available all the time. Signed-off-by: Michal Simek Acked-by: Joe Hershberger --- drivers/net/xilinx_axi_emac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index 071e0a85b582..3c980657729e 100644 --- a/drivers/net/xilinx_axi_emac.c +++ b/drivers/net/xilinx_axi_emac.c @@ -86,7 +86,7 @@ struct axidma_priv { struct axidma_reg *dmatx; struct axidma_reg *dmarx; int phyaddr; - + struct axi_regs *iobase; struct phy_device *phydev; struct mii_dev *bus; }; @@ -223,7 +223,7 @@ static int setup_phy(struct eth_device *dev) u16 phyreg; u32 i, speed, emmc_reg, ret; struct axidma_priv *priv = dev->priv; - struct axi_regs *regs = (struct axi_regs *)dev->iobase; + struct axi_regs *regs = priv->iobase; struct phy_device *phydev; u32 supported = SUPPORTED_10baseT_Half | @@ -629,6 +629,7 @@ int xilinx_axiemac_initialize(bd_t *bis, unsigned long base_addr, sprintf(dev->name, "aximac.%lx", base_addr); dev->iobase = base_addr; + priv->iobase = (struct axi_regs *)base_addr; priv->dmatx = (struct axidma_reg *)dma_addr; /* RX channel offset is 0x30 */ priv->dmarx = (struct axidma_reg *)(dma_addr + 0x30);