From patchwork Mon Apr 22 14:52:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 238556 X-Patchwork-Delegate: trini@ti.com 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 F39D32C0107 for ; Tue, 23 Apr 2013 00:54:25 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 40D234A467; Mon, 22 Apr 2013 16:53:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 kXNAOXToGCTK; Mon, 22 Apr 2013 16:53:48 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7ADB94A2D0; Mon, 22 Apr 2013 16:53:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 276664A270 for ; Mon, 22 Apr 2013 16:52:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 ZaFpsUaC8z9H for ; Mon, 22 Apr 2013 16:52:57 +0200 (CEST) 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-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by theia.denx.de (Postfix) with ESMTPS id 71DD24A28E for ; Mon, 22 Apr 2013 16:52:42 +0200 (CEST) Received: by mail-we0-f172.google.com with SMTP id r3so6557075wey.3 for ; Mon, 22 Apr 2013 07:52:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:content-type :x-gm-message-state; bh=RREmYSiGeV4klnFQduu/ycxh8KdyktwV3fuPsfHTiUg=; b=fMC9EZxKV1cN9pB+gGC+DDn7EQDL2yGGldOPbVXJuSNpV3bADmvFgxQ3QwuNlL4jNh 5EpamLFTqIVhX2NGSZe+BwA4T/i2vYSFQWY7FF9BPm+LD6XnmPkoojQrHvqxBcePuQQA sUE4nzeqdJWTg2356BUkjOGDSyozT3g3fvXW71f+pNdEKMXrGDpzeP51fZp2OWUQ3+4S FsYzay2RW5fob9oBo+Zh5a56MnbzrhKe/y0EcZX19Nv2fF973pmSqEmJgmXyVCT/Iay1 7k7zbubDXEr6DW2tQwfpWlwg307OvsQQ8gvqkgBCNf7cm71jQnVMXri1ltc+LAJJeRdh +UTA== X-Received: by 10.194.11.70 with SMTP id o6mr53297467wjb.29.1366642359034; Mon, 22 Apr 2013 07:52:39 -0700 (PDT) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPS id d8sm22558702wiv.10.2013.04.22.07.52.38 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 07:52:38 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, Albert Aribaud Date: Mon, 22 Apr 2013 16:52:06 +0200 Message-Id: <96216a6d01e3687d946f0ba2a8a84814293c8019.1366641836.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1366642332-11185-1-git-send-email-michal.simek@xilinx.com> References: <1366642332-11185-1-git-send-email-michal.simek@xilinx.com> In-Reply-To: <98a6e4d33e61c56c76b9bd78ef5d8e74ebd1510c.1366641836.git.michal.simek@xilinx.com> References: <98a6e4d33e61c56c76b9bd78ef5d8e74ebd1510c.1366641836.git.michal.simek@xilinx.com> X-Gm-Message-State: ALoCoQl6DIG+GA4pLgjPlSxnyAjQzkEQ/8q7Ng8jyMYYv8HARhD9hMetc5t3Zy0IcMx1H/nelodj Cc: Peter Crosthwaite , Jagannadha Sutradharudu Teki Subject: [U-Boot] [PATCH 08/14] zynq: Move macros to hardware.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add all fixed addresses to hardware.h and change petalinux configuration to support this. Signed-off-by: Michal Simek --- arch/arm/include/asm/arch-zynq/hardware.h | 2 ++ board/xilinx/zynq/board.c | 12 +++++++++--- include/configs/zynq.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) -- 1.8.2.1 diff --git a/arch/arm/include/asm/arch-zynq/hardware.h b/arch/arm/include/asm/arch-zynq/hardware.h index bee7b09..e0f6eba 100644 --- a/arch/arm/include/asm/arch-zynq/hardware.h +++ b/arch/arm/include/asm/arch-zynq/hardware.h @@ -27,6 +27,8 @@ #define XPSS_DEV_CFG_APB_BASEADDR 0xF8007000 #define XPSS_SCU_BASEADDR 0xF8F00000 #define CONFIG_SCUTIMER_BASEADDR 0xF8F00600 +#define CONFIG_ZYNQ_GEM_BASEADDR0 0xE000B000 +#define CONFIG_ZYNQ_GEM_BASEADDR1 0xE000C000 /* Reflect slcr offsets */ struct slcr_regs { diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 8ed75c3..8da476c 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -22,6 +22,8 @@ #include #include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -38,10 +40,14 @@ int board_eth_init(bd_t *bis) { u32 ret = 0; -#if defined(CONFIG_ZYNQ_GEM) && defined(CONFIG_ZYNQ_GEM_BASEADDR0) - ret = zynq_gem_initialize(bis, CONFIG_ZYNQ_GEM_BASEADDR0); +#if defined(CONFIG_ZYNQ_GEM) +# if defined(CONFIG_ZYNQ_GEM0) + ret |= zynq_gem_initialize(bis, CONFIG_ZYNQ_GEM_BASEADDR0); +# endif +# if defined(CONFIG_ZYNQ_GEM1) + ret |= zynq_gem_initialize(bis, CONFIG_ZYNQ_GEM_BASEADDR1); +# endif #endif - return ret; } #endif diff --git a/include/configs/zynq.h b/include/configs/zynq.h index 1147689..ebe1b1b 100644 --- a/include/configs/zynq.h +++ b/include/configs/zynq.h @@ -53,7 +53,7 @@ /* Ethernet driver */ #define CONFIG_NET_MULTI #define CONFIG_ZYNQ_GEM -#define CONFIG_ZYNQ_GEM_BASEADDR0 0xE000B000 +#define CONFIG_ZYNQ_GEM0 #if defined(CONFIG_ZYNQ_DCC) # define CONFIG_ARM_DCC