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

login
register
mail settings
Submitter Łukasz Dałek
Date Jan. 12, 2013, 9:39 p.m.
Message ID <1358026767-28130-1-git-send-email-luk0104@gmail.com>
Download mbox | patch
Permalink /patch/211556/
State Superseded
Delegated to: Marek Vasut
Headers show

Comments

Łukasz Dałek - Jan. 12, 2013, 9:39 p.m.
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@gmail.com>
---
 arch/arm/cpu/pxa/pxa2xx.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Patch

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);