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 allows to configure the mc13892 to reboot the
system as expected by imx system.c throught platform_data and enables the
watchdog on the efika mx/sb systems.
Arnaud
v2:
- make the mc13892 behaviour configurable
- modify main mc13xxx driver instead of mc13892 regulator
- reorder Kconfig entry.
Hello Arnaud,
On Wed, Mar 02, 2011 at 07:45:13PM +0100, Arnaud Patard wrote:
quoted hunk
By default, on wdi (watchdog input) event the mc13892 is powering off.
This patch allows to change this behaviour throught platform_data.
v2:
- move to mc13xxx-core
- make it configurable
Signed-off-by: Arnaud Patard <redacted>
Index: linux-2.6-submit/drivers/mfd/mc13xxx-core.c
===================================================================
@@ -734,6 +738,15 @@if(ret||id==MC13XXX_ID_INVALID)gotoerr_revision;+if((id==MC13XXX_ID_MC13892)&&pdata->wdi_reboot){+/* allows to reboot on wdi event */+ret=mc13xxx_reg_read(mc13xxx,MC13892_POWERCTL2,&val);+if(!ret){+val|=MC13892_POWERCTL2_WDIRESET;+mc13xxx_reg_write(mc13xxx,MC13892_POWERCTL2,val);+}+}+/* mask all irqs */ret=mc13xxx_reg_write(mc13xxx,MC13XXX_IRQMASK0,0x00ffffff);if(ret)
git diff provide some info about the context after the @@ hunk header.
I consider this really useful. GNU diff is able to do this, too (option
-p).
int num_regulators;
struct mc13xxx_regulator_init_data *regulators;
struct mc13xxx_leds_platform_data *leds;
+
+ unsigned int wdi_reboot;
there is already a member .flags. What about defining another bit for
that?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Arnaud,
On Wed, Mar 02, 2011 at 07:45:14PM +0100, Arnaud Patard wrote:
Register watchdog for efika mx and sb systems.
I promised myself to keep a better eye on patches I can't take because
they have dependencies to other subsystems. This patch is one of those
as it depends on the wdi_reboot field in the platform data.
Can you please resend this once the other patches have hit mainline?
Sascha
quoted hunk
v2:
- reorder Kconfig entry
- set wdi_reboot in mc13xxx platform data
Signed-off-by: Arnaud Patard <redacted>
Index: linux-2.6-submit/arch/arm/mach-mx5/mx51_efika.c
===================================================================
@@ -611,6 +612,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. */