[U-Boot] [PATCH 1/3] pxa: Add support for board specific reset function

Lukasz Dalek luk0104 at gmail.com
Sat Jan 12 22:39:25 CET 2013


Some boards have its own way to reset board. This patch adds support for
board_reset() function which is called from reset_cpu() to do board
specific actions before/instead main reset_cpu() actions.

Signed-off-by: Lukasz Dalek <luk0104 at gmail.com>
---
 arch/arm/cpu/pxa/pxa2xx.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index 09e8177..5520f4f 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -284,12 +284,19 @@ void i2c_clk_enable(void)
 	writel(readl(CKEN) | CKEN14_I2C, CKEN);
 }
 
+void __attribute__((weak)) board_reset(void)
+{
+	/* do nothing */
+}
+
 void reset_cpu(ulong ignored) __attribute__((noreturn));
 
 void reset_cpu(ulong ignored)
 {
 	uint32_t tmp;
 
+	board_reset();
+
 	setbits_le32(OWER, OWER_WME);
 
 	tmp = readl(OSCR);
-- 
1.7.8.6



More information about the U-Boot mailing list