public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] pxa: Add support for board specific reset function
@ 2013-01-12 21:39 Lukasz Dalek
  2013-01-12 21:39 ` [U-Boot] [PATCH 2/3] h2200: Add board reset support Lukasz Dalek
  2013-01-12 21:39 ` [U-Boot] [PATCH 3/3] pxa: Save lr register in relocate_code function Lukasz Dalek
  0 siblings, 2 replies; 10+ messages in thread
From: Lukasz Dalek @ 2013-01-12 21:39 UTC (permalink / raw)
  To: u-boot

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

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-01-14 23:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-12 21:39 [U-Boot] [PATCH 1/3] pxa: Add support for board specific reset function Lukasz Dalek
2013-01-12 21:39 ` [U-Boot] [PATCH 2/3] h2200: Add board reset support Lukasz Dalek
2013-01-12 23:54   ` Marek Vasut
2013-01-13  1:00     ` Łukasz Dałek
2013-01-13  1:05       ` Marek Vasut
2013-01-13  1:32         ` [U-Boot] [PATCH v2] " Lukasz Dalek
2013-01-13  1:32           ` [U-Boot] [PATCH] pxa: Add weak attribute to reset_cpu() function Lukasz Dalek
2013-01-12 21:39 ` [U-Boot] [PATCH 3/3] pxa: Save lr register in relocate_code function Lukasz Dalek
2013-01-12 23:53   ` Marek Vasut
2013-01-14 23:23   ` [U-Boot] [U-Boot, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox