2012-08-31 08:30:09 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2012
|
|
|
|
* NVIDIA Inc, <www.nvidia.com>
|
|
|
|
*
|
|
|
|
* Allen Martin <amartin@nvidia.com>
|
|
|
|
*
|
|
|
|
* 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 <common.h>
|
|
|
|
#include "cpu.h"
|
2012-10-19 21:08:23 +00:00
|
|
|
#include <spl.h>
|
2012-08-31 08:30:09 +00:00
|
|
|
|
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/arch/clock.h>
|
|
|
|
#include <asm/arch/pinmux.h>
|
2012-09-19 22:50:56 +00:00
|
|
|
#include <asm/arch/tegra.h>
|
2012-09-29 10:02:08 +00:00
|
|
|
#include <asm/arch-tegra/board.h>
|
2012-10-19 21:08:23 +00:00
|
|
|
#include <asm/arch/spl.h>
|
2012-08-31 08:30:09 +00:00
|
|
|
|
|
|
|
|
2012-10-19 21:08:23 +00:00
|
|
|
void spl_board_init(void)
|
2012-08-31 08:30:09 +00:00
|
|
|
{
|
2012-10-19 21:08:23 +00:00
|
|
|
struct pmux_tri_ctlr *pmt = (struct pmux_tri_ctlr *)NV_PA_APB_MISC_BASE;
|
|
|
|
|
|
|
|
/* enable JTAG */
|
|
|
|
writel(0xC0, &pmt->pmt_cfg_ctl);
|
2012-08-31 08:30:09 +00:00
|
|
|
|
|
|
|
board_init_uart_f();
|
|
|
|
|
|
|
|
/* Initialize periph GPIOs */
|
|
|
|
gpio_early_init_uart();
|
|
|
|
|
2012-10-19 21:08:23 +00:00
|
|
|
clock_early_init();
|
|
|
|
preloader_console_init();
|
2012-08-31 08:30:09 +00:00
|
|
|
}
|
|
|
|
|
2012-10-19 21:08:23 +00:00
|
|
|
u32 spl_boot_device(void)
|
2012-08-31 08:30:09 +00:00
|
|
|
{
|
2012-10-19 21:08:23 +00:00
|
|
|
return BOOT_DEVICE_RAM;
|
2012-08-31 08:30:09 +00:00
|
|
|
}
|
|
|
|
|
2012-10-19 21:08:23 +00:00
|
|
|
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
|
2012-08-31 08:30:09 +00:00
|
|
|
{
|
2012-10-19 21:08:23 +00:00
|
|
|
debug("image entry point: 0x%X\n", spl_image->entry_point);
|
2012-08-31 08:30:09 +00:00
|
|
|
|
2012-10-19 21:08:23 +00:00
|
|
|
start_cpu((u32)spl_image->entry_point);
|
2012-08-31 08:30:09 +00:00
|
|
|
halt_avp();
|
|
|
|
}
|