Skip to contentSkip to conversation

imx25: Fix reset

PATCH Superseded Matthias Weisser 3 participants 4 messages Oct 26, 2010

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 imx25: Fix reset

This patch fixes the reset command on imx25

---
 arch/arm/cpu/arm926ejs/mx25/reset.c       |    8 ++++----
 arch/arm/include/asm/arch-mx25/imx-regs.h |   10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)
arch/arm/cpu/arm926ejs/mx25/reset.c +4 -4
index 1e33150..27270c3 100644
@@ -43,14 +43,14 @@ void reset_cpu (ulong ignored)
 {
 	struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE;
 	/* Disable watchdog and set Time-Out field to 0 */
-	writel (0x00000000, &regs->wcr);
+	writew(0x00000000, &regs->wcr);
 
 	/* Write Service Sequence */
-	writel (0x00005555, &regs->wsr);
-	writel (0x0000AAAA, &regs->wsr);
+	writew(0x00005555, &regs->wsr);
+	writew(0x0000AAAA, &regs->wsr);
 
 	/* Enable watchdog */
-	writel (WCR_WDE, &regs->wcr);
+	writew(WCR_WDE, &regs->wcr);
 
 	while (1) ;
 }
arch/arm/include/asm/arch-mx25/imx-regs.h +5 -5
index f709bd8..fe258a8 100644
@@ -108,11 +108,11 @@ struct gpt_regs {
 
 /* Watchdog Timer (WDOG) registers */
 struct wdog_regs {
-	u32 wcr;	/* Control */
-	u32 wsr;	/* Service */
-	u32 wrsr;	/* Reset Status */
-	u32 wicr;	/* Interrupt Control */
-	u32 wmcr;	/* Misc Control */
+	u16 wcr;	/* Control */
+	u16 wsr;	/* Service */
+	u16 wrsr;	/* Reset Status */
+	u16 wicr;	/* Interrupt Control */
+	u16 wmcr;	/* Misc Control */
 };
 
 /* IIM control registers */
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH v2 1/1 imx25: Fix reset

Dear Matthias Weisser,

arch/arm/cpu/arm926ejs/mx25/reset.c void reset_cpu (ulong ignored) · line 50

Quoted 6 lines

This patch fixes the reset command on imx25

arch/arm/cpu/arm926ejs/mx25/reset.c +3 -0
+	writew(0x00000000, &regs->wcr);
+	writew(0x00005555, &regs->wsr);
+	writew(0x0000AAAA, &regs->wsr);

It might be "nicer" to use 16 Bit constants (with 4 hex digits) here..?

Best Regards,
Reinhard

#2 lore raw

PATCH v2 1/1 imx25: Fix reset

Am 26.10.2010 11:27, schrieb Reinhard Meyer:

Quoted 10 lines

Dear Matthias Weisser,

Review

Quoted 6 lines

This patch fixes the reset command on imx25

(quoted diff) +3 -0
+	writew(0x00000000,&regs->wcr);
+	writew(0x00005555,&regs->wsr);
+	writew(0x0000AAAA,&regs->wsr);

It might be "nicer" to use 16 Bit constants (with 4 hex digits) here..?

Sure. Would be nicer. I wait a bit for further comments and will create a V3 then.

Matthias

#3 lore raw

PATCH v2 1/1 imx25: Fix reset

Hi,

2010/10/26 Matthias Wei?er <[email protected]>:

Quoted 9 lines

Am 26.10.2010 11:27, schrieb Reinhard Meyer:

Quoted 8 lines

Dear Matthias Weisser,

Quoted 6 lines

This patch fixes the reset command on imx25

+ ? ?writew(0x00000000,&regs->wcr);
+ ? ?writew(0x00005555,&regs->wsr);
+ ? ?writew(0x0000AAAA,&regs->wsr);

Quoted 5 lines
Quoted 2 lines

It might be "nicer" to use 16 Bit constants (with 4 hex digits) here..?

Sure. Would be nicer. I wait a bit for further comments and will create a V3 then.

Add please append to the commit log about why you make such change? It will be clear to read and understand your change for this patch.

Quoted 7 lines

Matthias
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot