mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] ARM i.MX28: make chip reset via reset pin work again
@ 2013-04-19 14:36 Marc Kleine-Budde
  2013-04-24  8:28 ` Marc Kleine-Budde
  0 siblings, 1 reply; 6+ messages in thread
From: Marc Kleine-Budde @ 2013-04-19 14:36 UTC (permalink / raw)
  To: barebox; +Cc: Steffen Trumtrar

Since commit:

    2ccd451 ARM i.MX28: change default watchdog reset method

the external reset via the reset pin is broken. That commit overwrites the
HW_CLKCTRL_RESET register with only WDOG_POR_DISABLE set, which results in
disabling the external reset.

This patch uses read-modify-write to set the WDOG_POR_DISABLE, leaving the
WDOG_POR_DISABLE untouched.

Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
changes since v1:
* use r-m-w to change HW_CLKCTRL_RESET register (thanks jbe)

 arch/arm/mach-mxs/soc-imx28.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-mxs/soc-imx28.c b/arch/arm/mach-mxs/soc-imx28.c
index 8972a3d..ed931af 100644
--- a/arch/arm/mach-mxs/soc-imx28.c
+++ b/arch/arm/mach-mxs/soc-imx28.c
@@ -39,12 +39,16 @@ EXPORT_SYMBOL(reset_cpu);
 
 static int imx28_init(void)
 {
+	u32 reg;
+
 	/*
 	 * The default setting for the WDT is to do a POR. If the SoC is only
 	 * powered via battery, then a WDT reset powers the chip down instead
 	 * of resetting it. Use a software reset only.
 	 */
-	writel(HW_CLKCTRL_WDOG_POR_DISABLE, IMX_CCM_BASE + HW_CLKCTRL_RESET);
+	reg = readl(IMX_CCM_BASE + HW_CLKCTRL_RESET) |
+		HW_CLKCTRL_WDOG_POR_DISABLE;
+	writel(reg, IMX_CCM_BASE + HW_CLKCTRL_RESET);
 
 	return 0;
 }
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2] ARM i.MX28: make chip reset via reset pin work again
  2013-04-19 14:36 [PATCH v2] ARM i.MX28: make chip reset via reset pin work again Marc Kleine-Budde
@ 2013-04-24  8:28 ` Marc Kleine-Budde
  2013-04-24  8:35   ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Marc Kleine-Budde @ 2013-04-24  8:28 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox, Steffen Trumtrar


[-- Attachment #1.1: Type: text/plain, Size: 847 bytes --]

On 04/19/2013 04:36 PM, Marc Kleine-Budde wrote:
> Since commit:
> 
>     2ccd451 ARM i.MX28: change default watchdog reset method
> 
> the external reset via the reset pin is broken. That commit overwrites the
> HW_CLKCTRL_RESET register with only WDOG_POR_DISABLE set, which results in
> disabling the external reset.
> 
> This patch uses read-modify-write to set the WDOG_POR_DISABLE, leaving the
> WDOG_POR_DISABLE untouched.
> 
> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

ping

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2] ARM i.MX28: make chip reset via reset pin work again
  2013-04-24  8:28 ` Marc Kleine-Budde
@ 2013-04-24  8:35   ` Sascha Hauer
  2013-04-24  8:37     ` Marc Kleine-Budde
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2013-04-24  8:35 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox, Steffen Trumtrar

On Wed, Apr 24, 2013 at 10:28:53AM +0200, Marc Kleine-Budde wrote:
> On 04/19/2013 04:36 PM, Marc Kleine-Budde wrote:
> > Since commit:
> > 
> >     2ccd451 ARM i.MX28: change default watchdog reset method
> > 
> > the external reset via the reset pin is broken. That commit overwrites the
> > HW_CLKCTRL_RESET register with only WDOG_POR_DISABLE set, which results in
> > disabling the external reset.
> > 
> > This patch uses read-modify-write to set the WDOG_POR_DISABLE, leaving the
> > WDOG_POR_DISABLE untouched.
> > 
> > Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> 
> ping

pong.

For master?

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2] ARM i.MX28: make chip reset via reset pin work again
  2013-04-24  8:35   ` Sascha Hauer
@ 2013-04-24  8:37     ` Marc Kleine-Budde
  2013-04-24 14:45       ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Marc Kleine-Budde @ 2013-04-24  8:37 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox, Steffen Trumtrar


[-- Attachment #1.1: Type: text/plain, Size: 1036 bytes --]

On 04/24/2013 10:35 AM, Sascha Hauer wrote:
> On Wed, Apr 24, 2013 at 10:28:53AM +0200, Marc Kleine-Budde wrote:
>> On 04/19/2013 04:36 PM, Marc Kleine-Budde wrote:
>>> Since commit:
>>>
>>>     2ccd451 ARM i.MX28: change default watchdog reset method
>>>
>>> the external reset via the reset pin is broken. That commit overwrites the
>>> HW_CLKCTRL_RESET register with only WDOG_POR_DISABLE set, which results in
>>> disabling the external reset.
>>>
>>> This patch uses read-modify-write to set the WDOG_POR_DISABLE, leaving the
>>> WDOG_POR_DISABLE untouched.
>>>
>>> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>>
>> ping
> 
> pong.
> 
> For master?

at least

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2] ARM i.MX28: make chip reset via reset pin work again
  2013-04-24  8:37     ` Marc Kleine-Budde
@ 2013-04-24 14:45       ` Sascha Hauer
  2013-04-24 14:55         ` Marc Kleine-Budde
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2013-04-24 14:45 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox, Steffen Trumtrar

On Wed, Apr 24, 2013 at 10:37:12AM +0200, Marc Kleine-Budde wrote:
> On 04/24/2013 10:35 AM, Sascha Hauer wrote:
> > On Wed, Apr 24, 2013 at 10:28:53AM +0200, Marc Kleine-Budde wrote:
> >> On 04/19/2013 04:36 PM, Marc Kleine-Budde wrote:
> >>> Since commit:
> >>>
> >>>     2ccd451 ARM i.MX28: change default watchdog reset method
> >>>
> >>> the external reset via the reset pin is broken. That commit overwrites the
> >>> HW_CLKCTRL_RESET register with only WDOG_POR_DISABLE set, which results in
> >>> disabling the external reset.
> >>>
> >>> This patch uses read-modify-write to set the WDOG_POR_DISABLE, leaving the
> >>> WDOG_POR_DISABLE untouched.
> >>>
> >>> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> >>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> >>
> >> ping
> > 
> > pong.
> > 
> > For master?
> 
> at least

Applied now.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2] ARM i.MX28: make chip reset via reset pin work again
  2013-04-24 14:45       ` Sascha Hauer
@ 2013-04-24 14:55         ` Marc Kleine-Budde
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2013-04-24 14:55 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox, Steffen Trumtrar


[-- Attachment #1.1: Type: text/plain, Size: 1218 bytes --]

On 04/24/2013 04:45 PM, Sascha Hauer wrote:
> On Wed, Apr 24, 2013 at 10:37:12AM +0200, Marc Kleine-Budde wrote:
>> On 04/24/2013 10:35 AM, Sascha Hauer wrote:
>>> On Wed, Apr 24, 2013 at 10:28:53AM +0200, Marc Kleine-Budde wrote:
>>>> On 04/19/2013 04:36 PM, Marc Kleine-Budde wrote:
>>>>> Since commit:
>>>>>
>>>>>     2ccd451 ARM i.MX28: change default watchdog reset method
>>>>>
>>>>> the external reset via the reset pin is broken. That commit overwrites the
>>>>> HW_CLKCTRL_RESET register with only WDOG_POR_DISABLE set, which results in
>>>>> disabling the external reset.
>>>>>
>>>>> This patch uses read-modify-write to set the WDOG_POR_DISABLE, leaving the
>>>>> WDOG_POR_DISABLE untouched.
>>>>>
>>>>> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>>>>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>>>>
>>>> ping
>>>
>>> pong.
>>>
>>> For master?
>>
>> at least
> 
> Applied now.

tnx

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2013-04-24 14:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-19 14:36 [PATCH v2] ARM i.MX28: make chip reset via reset pin work again Marc Kleine-Budde
2013-04-24  8:28 ` Marc Kleine-Budde
2013-04-24  8:35   ` Sascha Hauer
2013-04-24  8:37     ` Marc Kleine-Budde
2013-04-24 14:45       ` Sascha Hauer
2013-04-24 14:55         ` Marc Kleine-Budde

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