Re: [U-Boot] [2/5]devkit8000 nand_spl: omap3 support nand_spl boot

2011-06-30 Thread Simon Schwarz
Dear Andreas,

thanks for the input!

 well, deactivating caches make the process much slower. I recommend
 don't disabeling it!
Sure, this was for debugging puposes - just forgot to undo. will change

 BTW, this patch also add preloader_console_init() to s_init() .. please
 honor this in commit message (or split off in two patches)
will do.

Regards
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [2/5]devkit8000 nand_spl: omap3 support nand_spl boot

2011-06-30 Thread Aneesh V
On Tuesday 28 June 2011 07:44 PM, simonschwarz...@googlemail.com wrote:
 Deactivates caching in SPL. Add call to preloader_console_init for early 
 console output.

 Signed-off-by: Simon Schwarzschw...@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 @@
   #includeasm/arch/sys_proto.h
   #includeasm/arch/mem.h
   #includeasm/cache.h
 +#includeasm/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
 +

Flush is not needed for initialization. Invalidation is enough. Indeed
flush could be dangerous.

   /*
* 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

Unless you are enabling d-cache invalidate is also not needed. Please
note that enabling d-cache in SPL has some complexities.

Please see this thread for details:
http://lists.denx.de/pipermail/u-boot/2011-May/092865.html


   icache_enable();

With my armv7 cache maintenance series that is now available at u-boot-
arm/master, I-cache will be invalidated and enabled in start.S itself
unless CONFIG_SYS_I_CACHE_OFF is set.

best regards,
Aneesh
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [2/5]devkit8000 nand_spl: omap3 support nand_spl boot

2011-06-29 Thread Andreas Bießmann
Dear Simon Schwarz,


Am 28.06.2011 16:14, schrieb simonschwarz...@googlemail.com:
 Deactivates caching in SPL. Add call to preloader_console_init for early 
 console output.

well, deactivating caches make the process much slower. I recommend
don't disabeling it!

BTW, this patch also add preloader_console_init() to s_init() .. please
honor this in commit message (or split off in two patches)

regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [2/5]devkit8000 nand_spl: omap3 support nand_spl boot

2011-06-28 Thread simonschwarzcor
Deactivates caching in SPL. Add call to preloader_console_init for early 
console output.

Signed-off-by: Simon Schwarz schw...@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 000..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 ane...@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_ */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot