[U-Boot] [2/5]devkit8000 nand_spl: omap3 support nand_spl boot
simonschwarzcor at googlemail.com
simonschwarzcor at googlemail.com
Tue Jun 28 16:14:37 CEST 2011
Deactivates caching in SPL. Add call to preloader_console_init for early console output.
Signed-off-by: Simon Schwarz <schwarz at corscience.de>
--
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 6c2a132..bb38289 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -37,6 +37,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/arch/mem.h>
#include <asm/cache.h>
+#include <asm/omap_common.h>
extern omap3_sysinfo sysinfo;
@@ -166,10 +167,15 @@ void s_init(void)
try_unlock_memory();
+#ifdef CONFIG_PRELOADER
+ v7_flush_cache_all();
+#endif
+
/*
* Right now flushing at low MPU speed.
* Need to move after clock init
*/
+#ifndef CONFIG_PRELOADER
invalidate_dcache(get_device_type());
#ifndef CONFIG_ICACHE_OFF
icache_enable();
@@ -187,13 +193,15 @@ void s_init(void)
*/
if (get_device_type() == GP_DEVICE)
setup_auxcr();
-
+#endif /*CONFIG_PRELOADER*/
set_muxconf_regs();
delay(100);
prcm_init();
-
per_clocks_enable();
+#ifdef CONFIG_PRELOADER
+ preloader_console_init();
+#endif
if (!in_sdram)
mem_init();
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
new file mode 100644
index 0000000..375938b
--- /dev/null
+++ b/arch/arm/include/asm/omap_common.h
@@ -0,0 +1,30 @@
+/*
+ * (C) Copyright 2010
+ * Texas Instruments, <www.ti.com>
+ *
+ * Aneesh V <aneesh at ti.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
+ */
+#ifndef _OMAP_COMMON_H_
+#define _OMAP_COMMON_H_
+
+void preloader_console_init(void);
+
+#endif /* _OMAP_COMMON_H_ */
More information about the U-Boot
mailing list