|
@@ -12,6 +12,7 @@
|
|
* GNU General Public License for more details.
|
|
* GNU General Public License for more details.
|
|
*/
|
|
*/
|
|
#include <linux/clocksource.h>
|
|
#include <linux/clocksource.h>
|
|
|
|
+#include <linux/sched_clock.h>
|
|
|
|
|
|
#include <asm/addrspace.h>
|
|
#include <asm/addrspace.h>
|
|
#include <asm/io.h>
|
|
#include <asm/io.h>
|
|
@@ -53,6 +54,11 @@ struct clocksource bcm1250_clocksource = {
|
|
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
|
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static u64 notrace sb1250_read_sched_clock(void)
|
|
|
|
+{
|
|
|
|
+ return sb1250_hpt_get_cycles();
|
|
|
|
+}
|
|
|
|
+
|
|
void __init sb1250_clocksource_init(void)
|
|
void __init sb1250_clocksource_init(void)
|
|
{
|
|
{
|
|
struct clocksource *cs = &bcm1250_clocksource;
|
|
struct clocksource *cs = &bcm1250_clocksource;
|
|
@@ -69,4 +75,6 @@ void __init sb1250_clocksource_init(void)
|
|
R_SCD_TIMER_CFG)));
|
|
R_SCD_TIMER_CFG)));
|
|
|
|
|
|
clocksource_register_hz(cs, V_SCD_TIMER_FREQ);
|
|
clocksource_register_hz(cs, V_SCD_TIMER_FREQ);
|
|
|
|
+
|
|
|
|
+ sched_clock_register(sb1250_read_sched_clock, 23, V_SCD_TIMER_FREQ);
|
|
}
|
|
}
|