diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-07-29 11:43:45 +0200 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-08-01 21:49:33 +0800 |
commit | 5f56079cd5175d1dc87e21951544959b786bda9a (patch) | |
tree | 8f27bdbfd5420f562d1c81c7ae59f443030c8622 /arch/arm/include | |
parent | aab32057b3c9860e0171987e7fcfcced1f3a401f (diff) | |
download | barebox-5f56079cd5175d1dc87e21951544959b786bda9a.tar.gz barebox-5f56079cd5175d1dc87e21951544959b786bda9a.tar.xz |
ARM: move armlinux_add_dram to location which is always compiled
We want to use the memory banks later in the MMU which is
independent of Linux, so move this to a location which is
always compiled.
Also, make the memory bank list global and add an iterator
for it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/armlinux.h | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/memory.h | 24 |
2 files changed, 15 insertions, 16 deletions
diff --git a/arch/arm/include/asm/armlinux.h b/arch/arm/include/asm/armlinux.h index f76cca875f..bb25f9a87d 100644 --- a/arch/arm/include/asm/armlinux.h +++ b/arch/arm/include/asm/armlinux.h @@ -1,11 +1,12 @@ #ifndef __ARCH_ARMLINUX_H #define __ARCH_ARMLINUX_H +#include <asm/memory.h> + #if defined CONFIG_CMD_BOOTM || defined CONFIG_CMD_BOOTZ || \ defined CONFIG_CMD_BOOTU void armlinux_set_bootparams(void *params); void armlinux_set_architecture(int architecture); -void armlinux_add_dram(struct device_d *dev); void armlinux_set_revision(unsigned int); void armlinux_set_serial(u64); #else @@ -17,10 +18,6 @@ static inline void armlinux_set_architecture(int architecture) { } -static inline void armlinux_add_dram(struct device_d *dev) -{ -} - static inline void armlinux_set_revision(unsigned int rev) { } diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index f746bc241f..93c2fe6007 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -1,16 +1,18 @@ -/* - * linux/include/asm-arm/memory.h - * - * Copyright (C) 2000-2002 Russell King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Note: this file should not be included by non-asm/.h files - */ #ifndef __ASM_ARM_MEMORY_H #define __ASM_ARM_MEMORY_H +struct arm_memory { + struct list_head list; + struct device_d *dev; + u32 *ptes; + unsigned long start; + unsigned long size; +}; + +extern struct list_head memory_list; + +void armlinux_add_dram(struct device_d *dev); + +#define for_each_sdram_bank(mem) list_for_each_entry(mem, &memory_list, list) #endif /* __ASM_ARM_MEMORY_H */ |