aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/csrc-ioasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/csrc-ioasic.c')
-rw-r--r--arch/mips/kernel/csrc-ioasic.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/mips/kernel/csrc-ioasic.c b/arch/mips/kernel/csrc-ioasic.c
index 6cbbf6e106b9..722f5589cd1d 100644
--- a/arch/mips/kernel/csrc-ioasic.c
+++ b/arch/mips/kernel/csrc-ioasic.c
@@ -12,12 +12,9 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 15 */
20#include <linux/clocksource.h> 16#include <linux/clocksource.h>
17#include <linux/sched_clock.h>
21#include <linux/init.h> 18#include <linux/init.h>
22 19
23#include <asm/ds1287.h> 20#include <asm/ds1287.h>
@@ -37,6 +34,11 @@ static struct clocksource clocksource_dec = {
37 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 34 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
38}; 35};
39 36
37static u64 notrace dec_ioasic_read_sched_clock(void)
38{
39 return ioasic_read(IO_REG_FCTR);
40}
41
40int __init dec_ioasic_clocksource_init(void) 42int __init dec_ioasic_clocksource_init(void)
41{ 43{
42 unsigned int freq; 44 unsigned int freq;
@@ -65,5 +67,8 @@ int __init dec_ioasic_clocksource_init(void)
65 67
66 clocksource_dec.rating = 200 + freq / 10000000; 68 clocksource_dec.rating = 200 + freq / 10000000;
67 clocksource_register_hz(&clocksource_dec, freq); 69 clocksource_register_hz(&clocksource_dec, freq);
70
71 sched_clock_register(dec_ioasic_read_sched_clock, 32, freq);
72
68 return 0; 73 return 0;
69} 74}