All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/2] Get watchdog reboot working on efika smartbook
@ 2011-02-28 13:21 Arnaud Patard (Rtp)
  2011-02-28 13:21 ` [patch 1/2] mc13892: reboot on wdi event Arnaud Patard (Rtp)
  2011-02-28 13:21 ` [patch 2/2] efika mx/sb: enable watchdog Arnaud Patard (Rtp)
  0 siblings, 2 replies; 11+ messages in thread
From: Arnaud Patard (Rtp) @ 2011-02-28 13:21 UTC (permalink / raw)
  To: linux-arm-kernel


Hi,

With current patches in Sascha Hauer's tree, the efika smartbook is powering
off when rebooting. The cause of this bug is the default behaviour of the
mc13892 pmic. This patchset is configuring the pmic to reboot the system 
as expected by imx system.c (the reboot is done throught watchdog) and enables
the watchdog on the efika mx/sb systems.

Arnaud

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

* [patch 1/2] mc13892: reboot on wdi event
  2011-02-28 13:21 [patch 0/2] Get watchdog reboot working on efika smartbook Arnaud Patard (Rtp)
@ 2011-02-28 13:21 ` Arnaud Patard (Rtp)
  2011-02-28 14:35   ` Mark Brown
  2011-02-28 14:37   ` Mark Brown
  2011-02-28 13:21 ` [patch 2/2] efika mx/sb: enable watchdog Arnaud Patard (Rtp)
  1 sibling, 2 replies; 11+ messages in thread
From: Arnaud Patard (Rtp) @ 2011-02-28 13:21 UTC (permalink / raw)
  To: linux-arm-kernel

An embedded and charset-unspecified text was scrubbed...
Name: mc13892_wdog_reboot.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110228/562257ca/attachment.ksh>

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

* [patch 2/2] efika mx/sb: enable watchdog
  2011-02-28 13:21 [patch 0/2] Get watchdog reboot working on efika smartbook Arnaud Patard (Rtp)
  2011-02-28 13:21 ` [patch 1/2] mc13892: reboot on wdi event Arnaud Patard (Rtp)
@ 2011-02-28 13:21 ` Arnaud Patard (Rtp)
  2011-02-28 14:47   ` Uwe Kleine-König
  1 sibling, 1 reply; 11+ messages in thread
From: Arnaud Patard (Rtp) @ 2011-02-28 13:21 UTC (permalink / raw)
  To: linux-arm-kernel

An embedded and charset-unspecified text was scrubbed...
Name: wdt.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110228/0e4de70b/attachment.ksh>

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

* [patch 1/2] mc13892: reboot on wdi event
  2011-02-28 13:21 ` [patch 1/2] mc13892: reboot on wdi event Arnaud Patard (Rtp)
@ 2011-02-28 14:35   ` Mark Brown
  2011-02-28 15:25     ` Arnaud Patard (Rtp)
  2011-02-28 14:37   ` Mark Brown
  1 sibling, 1 reply; 11+ messages in thread
From: Mark Brown @ 2011-02-28 14:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 28, 2011 at 02:21:33PM +0100, Arnaud Patard wrote:
> By default, on wdi (watchdog input) event the mc13892 is powering off.
> This patch is changing this to reboot on wdi event.
> 
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

This strikes me as something that should be configurable by platforms.

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

* [patch 1/2] mc13892: reboot on wdi event
  2011-02-28 13:21 ` [patch 1/2] mc13892: reboot on wdi event Arnaud Patard (Rtp)
  2011-02-28 14:35   ` Mark Brown
@ 2011-02-28 14:37   ` Mark Brown
  2011-02-28 15:30     ` Arnaud Patard (Rtp)
  1 sibling, 1 reply; 11+ messages in thread
From: Mark Brown @ 2011-02-28 14:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 28, 2011 at 02:21:33PM +0100, Arnaud Patard wrote:

> +
> +	/* allows to reboot on wdi event */
> +	ret = mc13xxx_reg_read(mc13892, MC13892_POWERCTL2, &val);
> +	if (!ret) {
> +		val |= MC13892_POWERCTL2_WDIRESET;
> +		mc13xxx_reg_write(mc13892, MC13892_POWERCTL2, val);
> +	}
> +

Also, why is this in the regulator driver?  The MFD core for the device
might be a better choice - that'll ensure it gets done even if regulator
support isn't enabled for some reason.

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

* [patch 2/2] efika mx/sb: enable watchdog
  2011-02-28 13:21 ` [patch 2/2] efika mx/sb: enable watchdog Arnaud Patard (Rtp)
@ 2011-02-28 14:47   ` Uwe Kleine-König
  0 siblings, 0 replies; 11+ messages in thread
From: Uwe Kleine-König @ 2011-02-28 14:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnaud,

just one nitpick below ...

On Mon, Feb 28, 2011 at 02:21:34PM +0100, Arnaud Patard wrote:
> Register watchdog for efika mx and sb systems.
> 
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
> 
> Index: linux-2.6-submit/arch/arm/mach-mx5/mx51_efika.c
> ===================================================================
> --- linux-2.6-submit.orig/arch/arm/mach-mx5/mx51_efika.c	2011-02-27 23:13:37.000000000 +0100
> +++ linux-2.6-submit/arch/arm/mach-mx5/mx51_efika.c	2011-02-27 23:20:38.000000000 +0100
> @@ -611,6 +611,7 @@
>  					ARRAY_SIZE(mx51efika_pads));
>  	imx51_add_imx_uart(0, &uart_pdata);
>  	mx51_efika_usb();
> +	imx51_add_imx2_wdt(0, NULL);
>  	imx51_add_sdhci_esdhc_imx(0, NULL);
>  
>  	/* FIXME: comes from original code. check this. */
> Index: linux-2.6-submit/arch/arm/mach-mx5/Kconfig
> ===================================================================
> --- linux-2.6-submit.orig/arch/arm/mach-mx5/Kconfig	2011-02-27 23:13:42.000000000 +0100
> +++ linux-2.6-submit/arch/arm/mach-mx5/Kconfig	2011-02-27 23:20:38.000000000 +0100
> @@ -117,6 +117,7 @@
>  	bool
>  	select SOC_IMX51
>  	select IMX_HAVE_PLATFORM_IMX_UART
> +	select IMX_HAVE_PLATFORM_IMX2_WDT
>  	select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
>  	select IMX_HAVE_PLATFORM_SPI_IMX
These IMX_HAVE_PLATFORM entries are sorted alphabetically and 2 sorts
before _, so IMX_HAVE_PLATFORM_IMX2_WDT should be the first entry here.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [patch 1/2] mc13892: reboot on wdi event
  2011-02-28 14:35   ` Mark Brown
@ 2011-02-28 15:25     ` Arnaud Patard (Rtp)
  2011-02-28 18:11       ` Mark Brown
  2011-03-01 20:56       ` Liam Girdwood
  0 siblings, 2 replies; 11+ messages in thread
From: Arnaud Patard (Rtp) @ 2011-02-28 15:25 UTC (permalink / raw)
  To: linux-arm-kernel

Mark Brown <broonie@opensource.wolfsonmicro.com> writes:

> On Mon, Feb 28, 2011 at 02:21:33PM +0100, Arnaud Patard wrote:
>> By default, on wdi (watchdog input) event the mc13892 is powering off.
>> This patch is changing this to reboot on wdi event.
>> 
>> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
>
> This strikes me as something that should be configurable by platforms.

afaik, mc13892 is used only on imx designs and the reset for imx is done
only throught the watchdog. From this point of view,  I don't see any
valid reason for powering off instead of rebooting on watchdog event


Arnaud

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

* [patch 1/2] mc13892: reboot on wdi event
  2011-02-28 14:37   ` Mark Brown
@ 2011-02-28 15:30     ` Arnaud Patard (Rtp)
  0 siblings, 0 replies; 11+ messages in thread
From: Arnaud Patard (Rtp) @ 2011-02-28 15:30 UTC (permalink / raw)
  To: linux-arm-kernel

Mark Brown <broonie@opensource.wolfsonmicro.com> writes:

> On Mon, Feb 28, 2011 at 02:21:33PM +0100, Arnaud Patard wrote:
>
>> +
>> +	/* allows to reboot on wdi event */
>> +	ret = mc13xxx_reg_read(mc13892, MC13892_POWERCTL2, &val);
>> +	if (!ret) {
>> +		val |= MC13892_POWERCTL2_WDIRESET;
>> +		mc13xxx_reg_write(mc13892, MC13892_POWERCTL2, val);
>> +	}
>> +
>
> Also, why is this in the regulator driver?  The MFD core for the device
> might be a better choice - that'll ensure it gets done even if regulator
> support isn't enabled for some reason.

I was not sure where to put it so I put it in the place where the power
management is done. I can move it to the mfd driver. I'll only have to
make sure it's done only for mc13892 (I don't know what would be the
consequences to do it on mc13783 too and if there's a similar
configuration setting).

Arnaud

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

* [patch 1/2] mc13892: reboot on wdi event
  2011-02-28 15:25     ` Arnaud Patard (Rtp)
@ 2011-02-28 18:11       ` Mark Brown
  2011-02-28 19:19         ` Arnaud Patard (Rtp)
  2011-03-01 20:56       ` Liam Girdwood
  1 sibling, 1 reply; 11+ messages in thread
From: Mark Brown @ 2011-02-28 18:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 28, 2011 at 04:25:45PM +0100, Arnaud Patard wrote:

> afaik, mc13892 is used only on imx designs and the reset for imx is done
> only throught the watchdog. From this point of view,  I don't see any
> valid reason for powering off instead of rebooting on watchdog event

Is there a separate way to do power off?

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

* [patch 1/2] mc13892: reboot on wdi event
  2011-02-28 18:11       ` Mark Brown
@ 2011-02-28 19:19         ` Arnaud Patard (Rtp)
  0 siblings, 0 replies; 11+ messages in thread
From: Arnaud Patard (Rtp) @ 2011-02-28 19:19 UTC (permalink / raw)
  To: linux-arm-kernel

Mark Brown <broonie@opensource.wolfsonmicro.com> writes:

> On Mon, Feb 28, 2011 at 04:25:45PM +0100, Arnaud Patard wrote:
>
>> afaik, mc13892 is used only on imx designs and the reset for imx is done
>> only throught the watchdog. From this point of view,  I don't see any
>> valid reason for powering off instead of rebooting on watchdog event
>
> Is there a separate way to do power off?

yeah. You can either disable pwgt1 and pwgt2 regulators or set the
useroff bit of the power control 0 register.

Arnaud

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

* [patch 1/2] mc13892: reboot on wdi event
  2011-02-28 15:25     ` Arnaud Patard (Rtp)
  2011-02-28 18:11       ` Mark Brown
@ 2011-03-01 20:56       ` Liam Girdwood
  1 sibling, 0 replies; 11+ messages in thread
From: Liam Girdwood @ 2011-03-01 20:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 2011-02-28 at 16:25 +0100, Arnaud Patard wrote:
> Mark Brown <broonie@opensource.wolfsonmicro.com> writes:
> 
> > On Mon, Feb 28, 2011 at 02:21:33PM +0100, Arnaud Patard wrote:
> >> By default, on wdi (watchdog input) event the mc13892 is powering off.
> >> This patch is changing this to reboot on wdi event.
> >> 
> >> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
> >
> > This strikes me as something that should be configurable by platforms.
> 
> afaik, mc13892 is used only on imx designs and the reset for imx is done
> only throught the watchdog. From this point of view,  I don't see any
> valid reason for powering off instead of rebooting on watchdog event
> 

If this change is for i.MX only then it should be optional as Freescale
probably will sell this PMIC to non i.MX users.

Thanks

Liam

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

end of thread, other threads:[~2011-03-01 20:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-28 13:21 [patch 0/2] Get watchdog reboot working on efika smartbook Arnaud Patard (Rtp)
2011-02-28 13:21 ` [patch 1/2] mc13892: reboot on wdi event Arnaud Patard (Rtp)
2011-02-28 14:35   ` Mark Brown
2011-02-28 15:25     ` Arnaud Patard (Rtp)
2011-02-28 18:11       ` Mark Brown
2011-02-28 19:19         ` Arnaud Patard (Rtp)
2011-03-01 20:56       ` Liam Girdwood
2011-02-28 14:37   ` Mark Brown
2011-02-28 15:30     ` Arnaud Patard (Rtp)
2011-02-28 13:21 ` [patch 2/2] efika mx/sb: enable watchdog Arnaud Patard (Rtp)
2011-02-28 14:47   ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.