From patchwork Sat Jan 16 20:28:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Scharsig X-Patchwork-Id: 71706 X-Patchwork-Delegate: info@emk-elektronik.de Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id BF76CE8506E for ; Sat, 16 Jan 2010 21:26:06 +0100 (CET) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id AFED0C96024F for ; Sat, 16 Jan 2010 21:26:06 +0100 (CET) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.9) for (single-drop); Sat, 16 Jan 2010 21:26:06 +0100 (CET) Received: from murder (svr19.m-online.net [192.168.3.147]) by backend2 (Cyrus v2.2.12) with LMTPA; Sat, 16 Jan 2010 21:25:46 +0100 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend3.pop.m-online.net (Cyrus v2.2.13) with LMTPA; Sat, 16 Jan 2010 21:25:45 +0100 Received: from scanner-1.m-online.net (unknown [192.168.8.165]) by mail.m-online.net (Postfix) with ESMTP id 0B44D2000AC; Sat, 16 Jan 2010 21:25:45 +0100 (CET) Received: from mxin-3.m-online.net ([192.168.6.165]) by scanner-1.m-online.net (scanner-1.m-online.net [192.168.8.165]) (amavisd-new, port 10026) with ESMTP id 20229-04; Sat, 16 Jan 2010 21:25:36 +0100 (CET) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-3.m-online.net (Postfix) with ESMTP id C2AE346C0AA; Sat, 16 Jan 2010 21:25:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8028728124; Sat, 16 Jan 2010 21:25:05 +0100 (CET) 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 EyAb3+tVKFjR; Sat, 16 Jan 2010 21:25:05 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D841328150; Sat, 16 Jan 2010 21:24:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9D1C728124 for ; Sat, 16 Jan 2010 21:24:56 +0100 (CET) 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 3HAbto-oZuIb for ; Sat, 16 Jan 2010 21:24:56 +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 smtp-out-014.synserver.de (smtp-out-014.synserver.de [212.40.180.14]) by theia.denx.de (Postfix) with SMTP id 63D1A28146 for ; Sat, 16 Jan 2010 21:24:48 +0100 (CET) Received: (qmail 16931 invoked by uid 0); 16 Jan 2010 20:24:48 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: postmaster@scharsoft.de X-SynServer-PPID: 16910 Received: from dslb-088-072-191-254.pools.arcor-ip.net (HELO ?10.0.0.100?) [88.72.191.254] by 217.119.54.77 with AES256-SHA encrypted SMTP; 16 Jan 2010 20:24:48 -0000 Message-ID: <4B522184.7040002@scharsoft.de> Date: Sat, 16 Jan 2010 21:28:52 +0100 From: Jens Scharsig User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 4/8 V2] add at91 SoC access with c structures X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net * prepare AT91RM9200 arch for SoC access update Signed-off-by: Jens Scharsig --- cpu/arm920t/at91rm9200/bcm5221.c | 4 ++-- cpu/arm920t/at91rm9200/dm9161.c | 3 +-- cpu/arm920t/at91rm9200/timer.c | 1 - cpu/arm920t/cpu.c | 4 ++++ include/asm-arm/arch-at91rm9200/AT91RM9200.h | 12 ++---------- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/cpu/arm920t/at91rm9200/bcm5221.c b/cpu/arm920t/at91rm9200/bcm5221.c index b52c615..8de3cba 100644 --- a/cpu/arm920t/at91rm9200/bcm5221.c +++ b/cpu/arm920t/at91rm9200/bcm5221.c @@ -28,10 +28,10 @@ #include #include -#include - #ifdef CONFIG_DRIVER_ETHER +#include + #if defined(CONFIG_CMD_NET) /* diff --git a/cpu/arm920t/at91rm9200/dm9161.c b/cpu/arm920t/at91rm9200/dm9161.c index 1beb6e8..6d4384f 100644 --- a/cpu/arm920t/at91rm9200/dm9161.c +++ b/cpu/arm920t/at91rm9200/dm9161.c @@ -23,9 +23,8 @@ #include #include -#include - #ifdef CONFIG_DRIVER_ETHER +#include #if defined(CONFIG_CMD_NET) diff --git a/cpu/arm920t/at91rm9200/timer.c b/cpu/arm920t/at91rm9200/timer.c index 9c54bbe..e4203a6 100644 --- a/cpu/arm920t/at91rm9200/timer.c +++ b/cpu/arm920t/at91rm9200/timer.c @@ -33,7 +33,6 @@ #include /*#include */ #include -/*#include */ /* the number of clocks per CONFIG_SYS_HZ */ #define TIMER_LOAD_VAL (CONFIG_SYS_HZ_CLOCK/CONFIG_SYS_HZ) diff --git a/cpu/arm920t/cpu.c b/cpu/arm920t/cpu.c index 34adb11..be82c87 100644 --- a/cpu/arm920t/cpu.c +++ b/cpu/arm920t/cpu.c @@ -33,6 +33,10 @@ #include #include +#ifdef CONFIG_AT91_LEGACY +#warning Your board is using legacy AT91RM9200 SoC access. Please update! +#endif + static void cache_flush(void); int cleanup_before_linux (void) diff --git a/include/asm-arm/arch-at91rm9200/AT91RM9200.h b/include/asm-arm/arch-at91rm9200/AT91RM9200.h index 00bae1c..a04cfa1 100644 --- a/include/asm-arm/arch-at91rm9200/AT91RM9200.h +++ b/include/asm-arm/arch-at91rm9200/AT91RM9200.h @@ -26,6 +26,7 @@ #define AT91RM9200_H #ifndef __ASSEMBLY__ + typedef volatile unsigned int AT91_REG; /* Hardware register definition */ /*****************************************************************************/ @@ -749,19 +750,10 @@ typedef struct _AT91S_PDC #define AT91C_BASE_PIOC ((AT91PS_PIO) 0xFFFFF800) /* (PIOC) Base Address */ #define AT91C_BASE_PIOD ((AT91PS_PIO) 0xFFFFFA00) /* (PIOC) Base Address */ #define AT91C_BASE_PMC ((AT91PS_PMC) 0xFFFFFC00) /* (PMC) Base Address */ -#if 0 -#define AT91C_BASE_ST ((AT91PS_ST) 0xFFFFFD00) /* (PMC) Base Address */ -#define AT91C_BASE_RTC ((AT91PS_RTC) 0xFFFFFE00) /* (PMC) Base Address */ -#define AT91C_BASE_MC ((AT91PS_MC) 0xFFFFFF00) /* (PMC) Base Address */ -#endif #define AT91C_BASE_TC0 ((AT91PS_TC) 0xFFFA0000) /* (TC0) Base Address */ #define AT91C_BASE_TC1 ((AT91PS_TC) 0xFFFA4000) /* (TC0) Base Address */ -#if 0 -#define AT91C_BASE_UDP ((AT91PS_UDP) 0xFFFB0000) /* (TC0) Base Address */ -#define AT91C_BASE_MCI ((AT91PS_MCI) 0xFFFB4000) /* (TC0) Base Address */ -#define AT91C_BASE_TWI ((AT91PS_TWI) 0xFFFB8000) /* (TC0) Base Address */ -#endif + #define AT91C_BASE_EMAC ((AT91PS_EMAC) 0xFFFBC000) /* (EMAC) Base Address */ #define AT91C_BASE_US0 ((AT91PS_USART) 0xFFFC0000) /* (US0) Base Address */ #define AT91C_BASE_US1 ((AT91PS_USART) 0xFFFC4000) /* (US1) Base Address */