mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
rk30: add sram support
This commit is contained in:
@@ -259,7 +259,7 @@ SECTIONS
|
||||
__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
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#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>
|
||||
@@ -22,6 +23,7 @@ void __init rk30_map_io(void)
|
||||
{
|
||||
rk30_map_common_io();
|
||||
rk29_setup_early_printk();
|
||||
rk29_sram_init();
|
||||
rk30_clock_init();
|
||||
rk30_iomux_init();
|
||||
}
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
/*
|
||||
* 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 __PLAT_SRAM_H
|
||||
#define __PLAT_SRAM_H
|
||||
|
||||
#ifndef __ARCH_ARM_MACH_RK29_SRAM_H
|
||||
#define __ARCH_ARM_MACH_RK29_SRAM_H
|
||||
#ifdef CONFIG_ARCH_RK29
|
||||
#ifdef CONFIG_PLAT_RK
|
||||
|
||||
/* Tag variables with this */
|
||||
#define __sramdata __section(.sram.data)
|
||||
@@ -35,6 +27,6 @@ static inline unsigned long ddr_save_sp(unsigned long new_sp)
|
||||
#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
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <mach/memory.h>
|
||||
#include <mach/rk29_iomap.h>
|
||||
|
||||
|
||||
/* SRAM section definitions from the linker */
|
||||
@@ -23,7 +22,7 @@ extern char __sram_data_start, __ssram_data, __esram_data;
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user