From patchwork Tue Jun 26 18:49:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 167436 X-Patchwork-Delegate: prafulla@marvell.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 1ADF0B6F77 for ; Wed, 27 Jun 2012 04:50:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 36CE628122; Tue, 26 Jun 2012 20:49:57 +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 nYnPjlx8C3Mu; Tue, 26 Jun 2012 20:49:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0137C2812D; Tue, 26 Jun 2012 20:49:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3F59B2812A for ; Tue, 26 Jun 2012 20:49:50 +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 O6P71XJohvzj for ; Tue, 26 Jun 2012 20:49:48 +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-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by theia.denx.de (Postfix) with ESMTPS id 311E928122 for ; Tue, 26 Jun 2012 20:49:46 +0200 (CEST) Received: from frontend4.mail.m-online.net (unknown [192.168.8.183]) by mail-out.m-online.net (Postfix) with ESMTP id 3WMGX53xXwz4KKQW; Tue, 26 Jun 2012 20:49:57 +0200 (CEST) X-Auth-Info: 6UDL62aEbMZXDH9qHBjzpKqtjUy4LNUdEoHUehesbbQ= Received: from mashiro.lan (unknown [195.140.253.167]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3WMGWs3sKxzbbrp; Tue, 26 Jun 2012 20:49:45 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Date: Tue, 26 Jun 2012 20:49:41 +0200 Message-Id: <1340736582-19815-1-git-send-email-marex@denx.de> X-Mailer: git-send-email 1.7.10 Cc: Marek Vasut Subject: [U-Boot] [PATCH 1/2] KW: Move the memory register definitions into kirkwood.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 Also add the CPUCS register definition. Signed-off-by: Marek Vasut Cc: Prafulla Wadaskar Cc: Wolfgang Denk --- arch/arm/cpu/arm926ejs/kirkwood/dram.c | 2 -- arch/arm/include/asm/arch-kirkwood/kirkwood.h | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c b/arch/arm/cpu/arm926ejs/kirkwood/dram.c index 181b3e7..ccb6b03 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c @@ -30,8 +30,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define KW_REG_CPUCS_WIN_BAR(x) (KW_REGISTER(0x1500) + (x * 0x08)) -#define KW_REG_CPUCS_WIN_SZ(x) (KW_REGISTER(0x1504) + (x * 0x08)) /* * kw_sdram_bar - reads SDRAM Base Address Register */ diff --git a/arch/arm/include/asm/arch-kirkwood/kirkwood.h b/arch/arm/include/asm/arch-kirkwood/kirkwood.h index 47771d5..33ae827 100644 --- a/arch/arm/include/asm/arch-kirkwood/kirkwood.h +++ b/arch/arm/include/asm/arch-kirkwood/kirkwood.h @@ -77,6 +77,15 @@ #define MVCPU_WIN_ENABLE KWCPU_WIN_ENABLE #define MVCPU_WIN_DISABLE KWCPU_WIN_DISABLE +/* Kirkwood memory registers */ +#define KW_REG_CPUCS_WIN_BAR(x) (KW_REGISTER(0x1500) + ((x) * 0x08)) +#define KW_REG_CPUCS_WIN_SZ(x) (KW_REGISTER(0x1504) + ((x) * 0x08)) + +#define KW_REG_CPUCS_WIN_ENABLE (1 << 0) +#define KW_REG_CPUCS_WIN_WR_PROTECT (1 << 1) +#define KW_REG_CPUCS_WIN_WIN0_CS(x) (((x) & 0x3) << 2) +#define KW_REG_CPUCS_WIN_SIZE(x) (((x) & 0xff) << 24) + #if defined (CONFIG_KW88F6281) #include #elif defined (CONFIG_KW88F6192)