summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm926ejs/davinci
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2011-11-01 20:00:29 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-11-03 22:56:25 +0100
commit435199f38020c294659a44607ca0e1b6f0ed1542 (patch)
tree373d8b4f4b04e63386572069319508a643566c1f /arch/arm/cpu/arm926ejs/davinci
parent18e8ff18fa3cbd302866bdfd4d510e7cb465c568 (diff)
downloadu-boot-imx-435199f38020c294659a44607ca0e1b6f0ed1542.zip
u-boot-imx-435199f38020c294659a44607ca0e1b6f0ed1542.tar.gz
u-boot-imx-435199f38020c294659a44607ca0e1b6f0ed1542.tar.bz2
arm, davinci: add support for new spl framework
Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Sandeep Paulraj <s-paulraj@ti.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/davinci')
-rw-r--r--arch/arm/cpu/arm926ejs/davinci/Makefile5
-rw-r--r--arch/arm/cpu/arm926ejs/davinci/spl.c63
2 files changed, 68 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile b/arch/arm/cpu/arm926ejs/davinci/Makefile
index 0310957..98c7e55 100644
--- a/arch/arm/cpu/arm926ejs/davinci/Makefile
+++ b/arch/arm/cpu/arm926ejs/davinci/Makefile
@@ -35,6 +35,11 @@ COBJS-$(CONFIG_SOC_DM644X) += dm644x.o
COBJS-$(CONFIG_SOC_DM646X) += dm646x.o
COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o
+ifdef CONFIG_SPL_BUILD
+COBJS-y += spl.o
+COBJS-y += dm365_lowlevel.o
+endif
+
SOBJS = reset.o
ifndef CONFIG_SKIP_LOWLEVEL_INIT
diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
new file mode 100644
index 0000000..d9b9398
--- /dev/null
+++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2011
+ * Heiko Schocher, DENX Software Engineering, hs@denx.de.
+ *
+ * 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 <asm/u-boot.h>
+#include <asm/utils.h>
+#include <nand.h>
+#include <asm/arch/dm365_lowlevel.h>
+#include <ns16550.h>
+
+void puts(const char *str)
+{
+ while (*str)
+ putc(*str++);
+}
+
+void putc(char c)
+{
+ if (c == '\n')
+ NS16550_putc((NS16550_t)(CONFIG_SYS_NS16550_COM1), '\r');
+
+ NS16550_putc((NS16550_t)(CONFIG_SYS_NS16550_COM1), c);
+}
+
+inline void hang(void)
+{
+ puts("### ERROR ### Please RESET the board ###\n");
+ for (;;)
+ ;
+}
+
+void board_init_f(ulong dummy)
+{
+ dm36x_lowlevel_init(0);
+ relocate_code(CONFIG_SPL_STACK, NULL, CONFIG_SPL_TEXT_BASE);
+}
+
+void board_init_r(gd_t *id, ulong dummy)
+{
+
+ nand_init();
+ puts("Nand boot...\n");
+ nand_boot();
+}