提交 4098d206 编写于 作者: V Vikas Manocha 提交者: Tom Rini

arvm7m: add cleanup before linux booting

Data cache memory needs to be disabled before handing over control to
linux kernel. This patch populates the cleanup_before_linux stub.
Signed-off-by: NVikas Manocha <vikas.manocha@st.com>
上级 a0ee014f
...@@ -18,6 +18,25 @@ ...@@ -18,6 +18,25 @@
*/ */
int cleanup_before_linux(void) int cleanup_before_linux(void)
{ {
/*
* this function is called just before we call linux
* it prepares the processor for linux
*
* disable interrupt and turn off caches etc ...
*/
disable_interrupts();
/*
* turn off D-cache
* dcache_disable() in turn flushes the d-cache
* MPU is still enabled & can't be disabled as the u-boot
* code might be running in sdram which by default is not
* executable area.
*/
dcache_disable();
/* invalidate to make sure no cache line gets dirty between
* dcache flushing and disabling dcache */
invalidate_dcache_all();
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册