From 400558b561e2bdb47f87b96b3510dda0881a3662 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sat, 2 Apr 2005 23:52:25 +0000 Subject: Prepare for SoC rework of ARM code: - rename CONFIG_BOOTBINFUNC into CONFIG_INIT_CRITICAL - rename memsetup into lowlevel_init (function name and source files) --- board/lart/Makefile | 2 +- board/lart/lowlevel_init.S | 94 ++++++++++++++++++++++++++++++++++++++++++++++ board/lart/memsetup.S | 94 ---------------------------------------------- 3 files changed, 95 insertions(+), 95 deletions(-) create mode 100644 board/lart/lowlevel_init.S delete mode 100644 board/lart/memsetup.S (limited to 'board/lart') diff --git a/board/lart/Makefile b/board/lart/Makefile index 42ceb03..550aa1d 100644 --- a/board/lart/Makefile +++ b/board/lart/Makefile @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = lib$(BOARD).a OBJS := lart.o flash.o -SOBJS := flashasm.o memsetup.o +SOBJS := flashasm.o lowlevel_init.o $(LIB): $(OBJS) $(SOBJS) $(AR) crv $@ $(OBJS) $(SOBJS) diff --git a/board/lart/lowlevel_init.S b/board/lart/lowlevel_init.S new file mode 100644 index 0000000..db9fd63 --- /dev/null +++ b/board/lart/lowlevel_init.S @@ -0,0 +1,94 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and + * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + + +#include +#include + + +/* some parameters for the board */ + +MEM_BASE: .long 0xa0000000 +MEM_START: .long 0xc0000000 + +#define MDCNFG 0x00 +#define MDCAS0 0x04 +#define MDCAS1 0x08 +#define MDCAS2 0x0c +#define MSC0 0x10 +#define MSC1 0x14 +#define MECR 0x18 + +mdcas0: .long 0xc71c703f +mdcas1: .long 0xffc71c71 +mdcas2: .long 0xffffffff +/* mdcnfg: .long 0x0bb2bcbf */ +mdcnfg: .long 0x0334b22f @ alt +/* mcs0: .long 0xfff8fff8 */ +msc0: .long 0xad8c4888 @ alt +mecr: .long 0x00060006 +/* mecr: .long 0x994a994a @ alt */ + +/* setting up the memory */ + +.globl lowlevel_init +lowlevel_init: + ldr r0, MEM_BASE + + /* Setup the flash memory */ + ldr r1, msc0 + str r1, [r0, #MSC0] + + /* Set up the DRAM */ + + /* MDCAS0 */ + ldr r1, mdcas0 + str r1, [r0, #MDCAS0] + + /* MDCAS1 */ + ldr r1, mdcas1 + str r1, [r0, #MDCAS1] + + /* MDCAS2 */ + ldr r1, mdcas2 + str r1, [r0, #MDCAS2] + + /* MDCNFG */ + ldr r1, mdcnfg + str r1, [r0, #MDCNFG] + + /* Set up PCMCIA space */ + ldr r1, mecr + str r1, [r0, #MECR] + + /* Load something to activate bank */ + ldr r1, MEM_START + +.rept 8 + ldr r0, [r1] +.endr + + /* everything is fine now */ + mov pc, lr diff --git a/board/lart/memsetup.S b/board/lart/memsetup.S deleted file mode 100644 index 635f2a0..0000000 --- a/board/lart/memsetup.S +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Memory Setup stuff - taken from blob memsetup.S - * - * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and - * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - - -#include -#include - - -/* some parameters for the board */ - -MEM_BASE: .long 0xa0000000 -MEM_START: .long 0xc0000000 - -#define MDCNFG 0x00 -#define MDCAS0 0x04 -#define MDCAS1 0x08 -#define MDCAS2 0x0c -#define MSC0 0x10 -#define MSC1 0x14 -#define MECR 0x18 - -mdcas0: .long 0xc71c703f -mdcas1: .long 0xffc71c71 -mdcas2: .long 0xffffffff -/* mdcnfg: .long 0x0bb2bcbf */ -mdcnfg: .long 0x0334b22f @ alt -/* mcs0: .long 0xfff8fff8 */ -msc0: .long 0xad8c4888 @ alt -mecr: .long 0x00060006 -/* mecr: .long 0x994a994a @ alt */ - -/* setting up the memory */ - -.globl memsetup -memsetup: - ldr r0, MEM_BASE - - /* Setup the flash memory */ - ldr r1, msc0 - str r1, [r0, #MSC0] - - /* Set up the DRAM */ - - /* MDCAS0 */ - ldr r1, mdcas0 - str r1, [r0, #MDCAS0] - - /* MDCAS1 */ - ldr r1, mdcas1 - str r1, [r0, #MDCAS1] - - /* MDCAS2 */ - ldr r1, mdcas2 - str r1, [r0, #MDCAS2] - - /* MDCNFG */ - ldr r1, mdcnfg - str r1, [r0, #MDCNFG] - - /* Set up PCMCIA space */ - ldr r1, mecr - str r1, [r0, #MECR] - - /* Load something to activate bank */ - ldr r1, MEM_START - -.rept 8 - ldr r0, [r1] -.endr - - /* everything is fine now */ - mov pc, lr -- cgit v1.1