1*41aebf81STom Rini/* 2*41aebf81STom Rini * A lowlevel_init function that sets up the stack to call a C function to 3*41aebf81STom Rini * perform further init. 4*41aebf81STom Rini * 5*41aebf81STom Rini * (C) Copyright 2010 6*41aebf81STom Rini * Texas Instruments, <www.ti.com> 7*41aebf81STom Rini * 8*41aebf81STom Rini * Author : 9*41aebf81STom Rini * Aneesh V <aneesh@ti.com> 10*41aebf81STom Rini * 11*41aebf81STom Rini * See file CREDITS for list of people who contributed to this 12*41aebf81STom Rini * project. 13*41aebf81STom Rini * 14*41aebf81STom Rini * This program is free software; you can redistribute it and/or 15*41aebf81STom Rini * modify it under the terms of the GNU General Public License as 16*41aebf81STom Rini * published by the Free Software Foundation; either version 2 of 17*41aebf81STom Rini * the License, or (at your option) any later version. 18*41aebf81STom Rini * 19*41aebf81STom Rini * This program is distributed in the hope that it will be useful, 20*41aebf81STom Rini * but WITHOUT ANY WARRANTY; without even the implied warranty of 21*41aebf81STom Rini * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22*41aebf81STom Rini * GNU General Public License for more details. 23*41aebf81STom Rini * 24*41aebf81STom Rini * You should have received a copy of the GNU General Public License 25*41aebf81STom Rini * along with this program; if not, write to the Free Software 26*41aebf81STom Rini * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 27*41aebf81STom Rini * MA 02111-1307 USA 28*41aebf81STom Rini */ 29*41aebf81STom Rini 30*41aebf81STom Rini#include <asm-offsets.h> 31*41aebf81STom Rini#include <config.h> 32*41aebf81STom Rini#include <linux/linkage.h> 33*41aebf81STom Rini 34*41aebf81STom RiniENTRY(lowlevel_init) 35*41aebf81STom Rini /* 36*41aebf81STom Rini * Setup a temporary stack 37*41aebf81STom Rini */ 38*41aebf81STom Rini ldr sp, =CONFIG_SYS_INIT_SP_ADDR 39*41aebf81STom Rini 40*41aebf81STom Rini /* 41*41aebf81STom Rini * Save the old lr(passed in ip) and the current lr to stack 42*41aebf81STom Rini */ 43*41aebf81STom Rini push {ip, lr} 44*41aebf81STom Rini 45*41aebf81STom Rini /* 46*41aebf81STom Rini * go setup pll, mux, memory 47*41aebf81STom Rini */ 48*41aebf81STom Rini bl s_init 49*41aebf81STom Rini pop {ip, pc} 50*41aebf81STom RiniENDPROC(lowlevel_init) 51