From patchwork Tue Apr 23 10:46:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 238870 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 C7A332C00F9 for ; Tue, 23 Apr 2013 20:48:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C004E4A1E0; Tue, 23 Apr 2013 12:48:02 +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 WxyYE5sNUiyf; Tue, 23 Apr 2013 12:48:02 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E10574A1A1; Tue, 23 Apr 2013 12:47:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C4E734A187 for ; Tue, 23 Apr 2013 12:47:21 +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 uO4CThv4jfLi for ; Tue, 23 Apr 2013 12:47:21 +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-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by theia.denx.de (Postfix) with ESMTPS id 4569D4A1A1 for ; Tue, 23 Apr 2013 12:46:59 +0200 (CEST) Received: by mail-wg0-f52.google.com with SMTP id k13so197501wgh.31 for ; Tue, 23 Apr 2013 03:46:59 -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=WYEOrx3AxIUccCHkRLrSIdcw1sv+6PxCYy4dK8rZRQs=; b=pEbkE96O3isrpPOptFMxwtpOnb3M1oQnSlRH6MGDldKAkZHtT4hj8KvWU5zle+vNTm JX4a4bJDfJVN5QhItX7IQEPtdKHGMAJKUMs8/uRYGBFlb0iDCKR0eqr5E7fOFF3/P1Zi +tZ77Snyq3fCxEekvqzheNRqUAQiNtdgx1zR7olq+rdZlXxJRmpkozvipghYjTmpkySm U8qroRn01t1q9bmghQCY+QeoG8mbV5c5bq3xdiEAHS8gpIA02v8mJfRxVTY4ss6UWX0m fw4tkekLSSJh5VI1orrOd/Rao3gs2STak3mQQZcNPdWlSWQ+GZaocUovJLeJygh5BSK0 PBOA== X-Received: by 10.180.74.146 with SMTP id t18mr44742236wiv.26.1366714019583; Tue, 23 Apr 2013 03:46:59 -0700 (PDT) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id er1sm25426181wib.5.2013.04.23.03.46.58 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 23 Apr 2013 03:46:58 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, Joe Hershberger , Albert Aribaud , Tom Rini Date: Tue, 23 Apr 2013 12:46:08 +0200 Message-Id: X-Mailer: git-send-email 1.8.2.1 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQm3IZMStNRafnSyy7WxIYielWoe2a6ZO8Ustk/N2xTlXME20vZEmLwt2C37Vu+TsdaKs3Fu Cc: Peter Crosthwaite , Jagannadha Sutradharudu Teki Subject: [U-Boot] [PATCH v2 09/15] 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 --- Changes in v2: - Remove CONFIG_ prefix from non configurable macro (gem) 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 d8e378f..5820f3b 100644 --- a/arch/arm/include/asm/arch-zynq/hardware.h +++ b/arch/arm/include/asm/arch-zynq/hardware.h @@ -27,6 +27,8 @@ #define ZYNQ_DEV_CFG_APB_BASEADDR 0xF8007000 #define ZYNQ_SCU_BASEADDR 0xF8F00000 #define ZYNQ_SCUTIMER_BASEADDR 0xF8F00600 +#define ZYNQ_GEM_BASEADDR0 0xE000B000 +#define 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..3af18f0 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, ZYNQ_GEM_BASEADDR0); +# endif +# if defined(CONFIG_ZYNQ_GEM1) + ret |= zynq_gem_initialize(bis, 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