time.c (4e73e0eb633f8a1b5cbf20e7f42c6dbfec1d1ca7) time.c (7b6a09f3d6aedeaac923824af2a5df30300b56e9)
1/*
2 * PS3 time and rtc routines.
3 *
4 * Copyright (C) 2006 Sony Computer Entertainment Inc.
5 * Copyright 2006 Sony Corp.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 7 unchanged lines hidden (view full) ---

16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/kernel.h>
22#include <linux/platform_device.h>
23
1/*
2 * PS3 time and rtc routines.
3 *
4 * Copyright (C) 2006 Sony Computer Entertainment Inc.
5 * Copyright 2006 Sony Corp.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 7 unchanged lines hidden (view full) ---

16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/kernel.h>
22#include <linux/platform_device.h>
23
24#include <asm/firmware.h>
24#include <asm/rtc.h>
25#include <asm/lv1call.h>
26#include <asm/ps3.h>
27
28#include "platform.h"
29
30#define dump_tm(_a) _dump_tm(_a, __func__, __LINE__)
31static void _dump_tm(const struct rtc_time *tm, const char* func, int line)

--- 47 unchanged lines hidden (view full) ---

79{
80 return read_rtc() + ps3_os_area_get_rtc_diff();
81}
82
83static int __init ps3_rtc_init(void)
84{
85 struct platform_device *pdev;
86
25#include <asm/rtc.h>
26#include <asm/lv1call.h>
27#include <asm/ps3.h>
28
29#include "platform.h"
30
31#define dump_tm(_a) _dump_tm(_a, __func__, __LINE__)
32static void _dump_tm(const struct rtc_time *tm, const char* func, int line)

--- 47 unchanged lines hidden (view full) ---

80{
81 return read_rtc() + ps3_os_area_get_rtc_diff();
82}
83
84static int __init ps3_rtc_init(void)
85{
86 struct platform_device *pdev;
87
88 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
89 return -ENODEV;
90
87 pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
88 if (IS_ERR(pdev))
89 return PTR_ERR(pdev);
90
91 return 0;
92}
93
94module_init(ps3_rtc_init);
91 pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
92 if (IS_ERR(pdev))
93 return PTR_ERR(pdev);
94
95 return 0;
96}
97
98module_init(ps3_rtc_init);