rtc-opal driver provides support for rtc alarms via
timed-power-on(tpo). However some Power platforms like BML use a fake
rtc clock and don't support tpo. Such platforms are indicated by the
missing 'has-tpo' property in the device tree.
Current implementation however enables callback for
rtc_class_ops.read/set alarm irrespective of the tpo support from the
platform. This results in a failed opal call when kernel tries to read
an existing alarms via opal_get_tpo_time during rtc device registration.
This patch fixes this issue by setting opal_rtc_ops.read/set_alarm
callback pointers only when tpo is supported.
Acked-by: Michael Neuling <redacted>
Acked-by: Neelesh Gupta <redacted>
Signed-off-by: Vaibhav Jain <redacted>
---
drivers/rtc/rtc-opal.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
From: Stewart Smith <hidden> Date: 2015-07-15 04:09:24
Vaibhav Jain [off-list ref] writes:
rtc-opal driver provides support for rtc alarms via
timed-power-on(tpo). However some Power platforms like BML use a fake
rtc clock and don't support tpo. Such platforms are indicated by the
missing 'has-tpo' property in the device tree.
Current implementation however enables callback for
rtc_class_ops.read/set alarm irrespective of the tpo support from the
platform. This results in a failed opal call when kernel tries to read
an existing alarms via opal_get_tpo_time during rtc device registration.
This patch fixes this issue by setting opal_rtc_ops.read/set_alarm
callback pointers only when tpo is supported.
Acked-by: Michael Neuling <redacted>
Acked-by: Neelesh Gupta <redacted>
Signed-off-by: Vaibhav Jain <redacted>
Acked-by: Stewart Smith <redacted>
FWIW I'm updating OPAL docs with this. The TPO calls aren't actually
documented :(
In future, it'd be great if there was an accompanying skiboot patch
updating the documentation there too.
On 14/07/2015 at 13:28:28 +0530, Vaibhav Jain wrote :
rtc-opal driver provides support for rtc alarms via
timed-power-on(tpo). However some Power platforms like BML use a fake
rtc clock and don't support tpo. Such platforms are indicated by the
missing 'has-tpo' property in the device tree.
Current implementation however enables callback for
rtc_class_ops.read/set alarm irrespective of the tpo support from the
platform. This results in a failed opal call when kernel tries to read
an existing alarms via opal_get_tpo_time during rtc device registration.
This patch fixes this issue by setting opal_rtc_ops.read/set_alarm
callback pointers only when tpo is supported.
Acked-by: Michael Neuling <redacted>
Acked-by: Neelesh Gupta <redacted>
Signed-off-by: Vaibhav Jain <redacted>
---
drivers/rtc/rtc-opal.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)