Skip to contentSkip to conversation

omap watchdog boot status

DISCUSSION Cor Peters 2 participants 3 messages Nov 7, 2016 – Nov 9, 2016 Watchdog device drivers

lore
Share & tools
lore

Cor Peters

author
#0 lore raw

Hello everybody

I was looking into an issue with the omap-wdt.c. The watchdog driver not is reporting a different boot status when a reset is being triggered by the watchdog.

Quoted 1 line

From what I gathered, the issue is that in the omap_wdt_probe function,

pdev->dev->platform_data requires to be a reference to the PRM module, however it has not been set, and I was wondering how this should work in an environment that uses the device tree method. (Link to usage:
http://lxr.free-electrons.com/source/drivers/watchdog/omap_wdt.c#L268[1] ).

My questions are as follows:
1) Is my assertion correct that the current method does not work when the driver is being initialised from an device tree instead of a old style board file.
2) If that is the case, what would be the best method of fixing this situation.

Thank you very much in advance.

Signature · 11 lines
Met vriendelijke groet,
With kind regards,
   Cor Peters

Victron Energy B.V.
Koldingweg 9a, 9723HL Groningen
Tel. +31 36 535 9774   Fax. +31 36 531 1666
www.victronenergy.com

--------
[1] http://lxr.free-electrons.com/source/drivers/watchdog/omap_wdt.c#L268
maintainer
#1 lore raw
Quoted 12 lines · Cor Peters

Hello everybody

I was looking into an issue with the omap-wdt.c. The watchdog driver not is reporting a different boot status when a reset is being triggered by the watchdog.

Quoted 1 line

From what I gathered, the issue is that in the omap_wdt_probe function,

pdev->dev->platform_data requires to be a reference to the PRM module, however it has not been set, and I was wondering how this should work in an environment that uses the device tree method. (Link to usage:
http://lxr.free-electrons.com/source/drivers/watchdog/omap_wdt.c#L268[1] ).

Quoted 4 lines

My questions are as follows:
1) Is my assertion correct that the current method does not work when the driver is being initialised from an device tree instead of a old style board file.

I think you are correct.

Quoted 2 lines

2) If that is the case, what would be the best method of fixing this situation.

I am not a devicetree expert, but you may have to define a property to point to the register and bit providing the necessary information. This could possibly be done with syscon, but I really don't know enough about it to really know for sure what the best approach would be.

Guenter

author
#2 lore raw
Quoted 18 lines · On Monday 07 November 2016 17:12:56 Guenter Roeck wrote:
Quoted 12 lines · Cor Peters

Hello everybody

I was looking into an issue with the omap-wdt.c. The watchdog driver not is reporting a different boot status when a reset is being triggered by the watchdog.

Quoted 1 line

From what I gathered, the issue is that in the omap_wdt_probe function,

pdev->dev->platform_data requires to be a reference to the PRM module, however it has not been set, and I was wondering how this should work in an environment that uses the device tree method. (Link to usage:
http://lxr.free-electrons.com/source/drivers/watchdog/omap_wdt.c#L268[1] ).

Quoted 4 lines

My questions are as follows:
1) Is my assertion correct that the current method does not work when the driver is being initialised from an device tree instead of a old style board file.

Quoted 8 lines

I think you are correct.

Quoted 2 lines

2) If that is the case, what would be the best method of fixing this situation.

I am not a devicetree expert, but you may have to define a property to point to the register and bit providing the necessary information. This could possibly be done with syscon, but I really don't know enough about it to really know for sure what the best approach would be.

Thanks, syscon seems like a good solution.

Quoted 2 lines

Guenter

Cor