summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/ps3/os-area.c
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2007-10-07 07:35:46 +1000
committerPaul Mackerras <paulus@samba.org>2007-10-09 21:01:58 +1000
commitd7b98e3dd87b4512462f6cdfe646a8e59673e62e (patch)
treee75ad71fca09dd7561528b9e2039ee8f03353b40 /arch/powerpc/platforms/ps3/os-area.c
parent418ef2094eb8b0916d6cbda10e2ab857b9f64d97 (diff)
downloadlinux-d7b98e3dd87b4512462f6cdfe646a8e59673e62e.tar.gz
linux-d7b98e3dd87b4512462f6cdfe646a8e59673e62e.tar.bz2
linux-d7b98e3dd87b4512462f6cdfe646a8e59673e62e.zip
[POWERPC] PS3: Add os-area rtc_diff set/get routines
Updates for PS3 os-area rtc_diff set/get routines o Add a new routine ps3_os_area_set_rtc_diff(). o Rename ps3_os_area_rtc_diff() to ps3_os_area_get_rtc_diff(). o Remove static variable rtc_shift with calls to ps3_os_area_get_rtc_diff(). Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/ps3/os-area.c')
-rw-r--r--arch/powerpc/platforms/ps3/os-area.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index db311a147c28..473aee8580ce 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -261,16 +261,31 @@ void __init ps3_os_area_save_params(void)
}
/**
- * ps3_os_area_rtc_diff - Returns the rtc diff value.
+ * ps3_os_area_get_rtc_diff - Returns the rtc diff value.
*/
-u64 ps3_os_area_rtc_diff(void)
+u64 ps3_os_area_get_rtc_diff(void)
{
return saved_params.rtc_diff ? saved_params.rtc_diff
: SECONDS_FROM_1970_TO_2000;
}
/**
+ * ps3_os_area_set_rtc_diff - Set the rtc diff value.
+ *
+ * An asynchronous write is needed to support writing updates from
+ * the timer interrupt context.
+ */
+
+void ps3_os_area_set_rtc_diff(u64 rtc_diff)
+{
+ if (saved_params.rtc_diff != rtc_diff) {
+ saved_params.rtc_diff = rtc_diff;
+ os_area_queue_work();
+ }
+}
+
+/**
* ps3_os_area_get_av_multi_out - Returns the default video mode.
*/