Path: blob/master/arch/mn10300/kernel/csrc-mn10300.c
10817 views
/* MN10300 clocksource1*2* Copyright (C) 2010 Red Hat, Inc. All Rights Reserved.3* Written by Mark Salter ([email protected])4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public Licence7* as published by the Free Software Foundation; either version8* 2 of the Licence, or (at your option) any later version.9*/10#include <linux/clocksource.h>11#include <linux/init.h>12#include <asm/timex.h>13#include "internal.h"1415static cycle_t mn10300_read(struct clocksource *cs)16{17return read_timestamp_counter();18}1920static struct clocksource clocksource_mn10300 = {21.name = "TSC",22.rating = 200,23.read = mn10300_read,24.mask = CLOCKSOURCE_MASK(32),25.flags = CLOCK_SOURCE_IS_CONTINUOUS,26};2728int __init init_clocksource(void)29{30startup_timestamp_counter();31clocksource_register_hz(&clocksource_mn10300, MN10300_TSCCLK);32return 0;33}343536