Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98c672cf authored by Russell King's avatar Russell King
Browse files

ARM: Move platform memory reservations out of generic code



Move the platform specific bootmem memory reservations out of
arch/arm/mm/mmu.c into their respective platform files.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent b65b4781
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ struct machine_desc {
	void			(*fixup)(struct machine_desc *,
					 struct tag *, char **,
					 struct meminfo *);
	void			(*reserve)(void);/* reserve mem blocks	*/
	void			(*map_io)(void);/* IO mapping function	*/
	void			(*init_irq)(void);
	struct sys_timer	*timer;		/* system tick timer	*/
+8 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
#include <linux/init.h>
#include <linux/bootmem.h>
#include <linux/types.h>
#include <linux/string.h>

@@ -29,6 +30,12 @@

extern void edb7211_map_io(void);

/* Reserve screen memory region at the start of main system memory. */
static void __init edb7211_reserve(void)
{
	reserve_bootmem(PHYS_OFFSET, 0x00020000, BOOTMEM_DEFAULT);
}

static void __init
fixup_edb7211(struct machine_desc *desc, struct tag *tags,
	      char **cmdline, struct meminfo *mi)
@@ -55,6 +62,7 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
	.boot_params	= 0xc0020100,	/* 0xc0000000 - 0xc001ffff can be video RAM */
	.fixup		= fixup_edb7211,
	.map_io		= edb7211_map_io,
	.reserve	= edb7211_reserve,
	.init_irq	= clps711x_init_irq,
	.timer		= &clps711x_timer,
MACHINE_END
+1 −0
Original line number Diff line number Diff line
void integrator_reserve(void);
+12 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/bootmem.h>
#include <linux/sched.h>
#include <linux/smp.h>
#include <linux/termios.h>
@@ -30,6 +31,7 @@
#include <asm/system.h>
#include <asm/leds.h>
#include <asm/mach/time.h>
#include <asm/pgtable.h>

static struct amba_pl010_data integrator_uart_data;

@@ -215,3 +217,13 @@ void cm_control(u32 mask, u32 set)
}

EXPORT_SYMBOL(cm_control);

/*
 * We need to stop things allocating the low memory; ideally we need a
 * better implementation of GFP_DMA which does not assume that DMA-able
 * memory starts at zero.
 */
void __init integrator_reserve(void)
{
	reserve_bootmem(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET, BOOTMEM_DEFAULT);
}
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@
#include <asm/mach/map.h>
#include <asm/mach/time.h>

#include "common.h"

/* 
 * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx
 * is the (PA >> 12).
@@ -502,6 +504,7 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator")
	.io_pg_offst	= ((0xf1600000) >> 18) & 0xfffc,
	.boot_params	= 0x00000100,
	.map_io		= ap_map_io,
	.reserve	= integrator_reserve,
	.init_irq	= ap_init_irq,
	.timer		= &ap_timer,
	.init_machine	= ap_init,
Loading