* [U-Boot] [PATCH V2] imx25: Fix reset
@ 2010-10-26 9:17 Matthias Weisser
2010-10-26 9:27 ` Reinhard Meyer
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Weisser @ 2010-10-26 9:17 UTC (permalink / raw)
To: u-boot
This patch fixes the reset command on imx25
Signed-off-by: Matthias Weisser <weisserm@arcor.de>
---
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(-)
diff --git a/arch/arm/cpu/arm926ejs/mx25/reset.c b/arch/arm/cpu/arm926ejs/mx25/reset.c
index 1e33150..27270c3 100644
--- a/arch/arm/cpu/arm926ejs/mx25/reset.c
+++ b/arch/arm/cpu/arm926ejs/mx25/reset.c
@@ -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, ®s->wcr);
+ writew(0x00000000, ®s->wcr);
/* Write Service Sequence */
- writel (0x00005555, ®s->wsr);
- writel (0x0000AAAA, ®s->wsr);
+ writew(0x00005555, ®s->wsr);
+ writew(0x0000AAAA, ®s->wsr);
/* Enable watchdog */
- writel (WCR_WDE, ®s->wcr);
+ writew(WCR_WDE, ®s->wcr);
while (1) ;
}
diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h b/arch/arm/include/asm/arch-mx25/imx-regs.h
index f709bd8..fe258a8 100644
--- a/arch/arm/include/asm/arch-mx25/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx25/imx-regs.h
@@ -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 */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [U-Boot] [PATCH V2] imx25: Fix reset
2010-10-26 9:17 [U-Boot] [PATCH V2] imx25: Fix reset Matthias Weisser
@ 2010-10-26 9:27 ` Reinhard Meyer
2010-10-26 11:39 ` Matthias Weißer
0 siblings, 1 reply; 4+ messages in thread
From: Reinhard Meyer @ 2010-10-26 9:27 UTC (permalink / raw)
To: u-boot
Dear Matthias Weisser,
> This patch fixes the reset command on imx25
>
> Signed-off-by: Matthias Weisser <weisserm@arcor.de>
> + writew(0x00000000, ®s->wcr);
> + writew(0x00005555, ®s->wsr);
> + writew(0x0000AAAA, ®s->wsr);
It might be "nicer" to use 16 Bit constants (with 4 hex digits)
here..?
Best Regards,
Reinhard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V2] imx25: Fix reset
2010-10-26 9:27 ` Reinhard Meyer
@ 2010-10-26 11:39 ` Matthias Weißer
2010-10-26 16:44 ` Jason Liu
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Weißer @ 2010-10-26 11:39 UTC (permalink / raw)
To: u-boot
Am 26.10.2010 11:27, schrieb Reinhard Meyer:
> Dear Matthias Weisser,
>> This patch fixes the reset command on imx25
>>
>> Signed-off-by: Matthias Weisser<weisserm@arcor.de>
>> + writew(0x00000000,®s->wcr);
>> + writew(0x00005555,®s->wsr);
>> + writew(0x0000AAAA,®s->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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V2] imx25: Fix reset
2010-10-26 11:39 ` Matthias Weißer
@ 2010-10-26 16:44 ` Jason Liu
0 siblings, 0 replies; 4+ messages in thread
From: Jason Liu @ 2010-10-26 16:44 UTC (permalink / raw)
To: u-boot
Hi,
2010/10/26 Matthias Wei?er <weisserm@arcor.de>:
> Am 26.10.2010 11:27, schrieb Reinhard Meyer:
>> Dear Matthias Weisser,
>>> This patch fixes the reset command on imx25
>>>
>>> Signed-off-by: Matthias Weisser<weisserm@arcor.de>
>>> + ? ?writew(0x00000000,®s->wcr);
>>> + ? ?writew(0x00005555,®s->wsr);
>>> + ? ?writew(0x0000AAAA,®s->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.
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.
>
> Matthias
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-26 16:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-26 9:17 [U-Boot] [PATCH V2] imx25: Fix reset Matthias Weisser
2010-10-26 9:27 ` Reinhard Meyer
2010-10-26 11:39 ` Matthias Weißer
2010-10-26 16:44 ` Jason Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox