__tcm_end = .;
}
#endif
-#ifdef CONFIG_ARCH_RK29
+#ifdef CONFIG_PLAT_RK
/*
* We align everything to a page boundary so we can
* free it after init has commenced and SRAM contents have
#include <asm/hardware/gic.h>
#include <asm/mach/arch.h>
+#include <plat/sram.h>
#include <mach/board.h>
#include <mach/gpio.h>
#include <mach/iomux.h>
{
rk30_map_common_io();
rk29_setup_early_printk();
+ rk29_sram_init();
rk30_clock_init();
rk30_iomux_init();
}
/*
* Physical DRAM offset.
*/
-#define PLAT_PHYS_OFFSET UL(0x60000000)
+#define PLAT_PHYS_OFFSET UL(0x60000000)
+
+/*
+ * SRAM memory whereabouts
+ */
+#define SRAM_CODE_OFFSET 0xFEF00100
+#define SRAM_CODE_END 0xFEF02FFF
+#define SRAM_DATA_OFFSET 0xFEF03000
+#define SRAM_DATA_END 0xFEF03FFF
#endif
-/*
- * Copyright (C) 2008-2009 ST-Ericsson AB
- * License terms: GNU General Public License (GPL) version 2
- * TCM memory handling for ARM systems
- *
- * Author: Linus Walleij <linus.walleij@stericsson.com>
- * Author: Rickard Andersson <rickard.andersson@stericsson.com>
- */
-
-#ifndef __ARCH_ARM_MACH_RK29_SRAM_H
-#define __ARCH_ARM_MACH_RK29_SRAM_H
-#ifdef CONFIG_ARCH_RK29
+#ifndef __PLAT_SRAM_H
+#define __PLAT_SRAM_H
+
+#ifdef CONFIG_PLAT_RK
/* Tag variables with this */
#define __sramdata __section(.sram.data)
#define DDR_SAVE_SP(save_sp) do { save_sp = ddr_save_sp((SRAM_DATA_END&(~7))); } while (0)
#define DDR_RESTORE_SP(save_sp) do { ddr_save_sp(save_sp); } while (0)
-#endif
+#endif /* CONFIG_PLAT_RK */
#endif
#include <asm/tlbflush.h>
#include <asm/cacheflush.h>
#include <mach/memory.h>
-#include <mach/rk29_iomap.h>
/* SRAM section definitions from the linker */
static struct map_desc sram_code_iomap[] __initdata = {
{
- .virtual = SRAM_CODE_OFFSET,
+ .virtual = SRAM_CODE_OFFSET & PAGE_MASK,
.pfn = __phys_to_pfn(0x0),
.length = 1024*1024,
.type = MT_MEMORY