Release 4.11 arch/mips/kernel/csrc-ioasic.c
/*
* DEC I/O ASIC's counter clocksource
*
* Copyright (C) 2008 Yoichi Yuasa <yuasa@linux-mips.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/clocksource.h>
#include <linux/sched_clock.h>
#include <linux/init.h>
#include <asm/ds1287.h>
#include <asm/time.h>
#include <asm/dec/ioasic.h>
#include <asm/dec/ioasic_addrs.h>
static u64 dec_ioasic_hpt_read(struct clocksource *cs)
{
return ioasic_read(IO_REG_FCTR);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoichi Yuasa | 12 | 70.59% | 1 | 33.33% |
Magnus Damm | 4 | 23.53% | 1 | 33.33% |
Thomas Gleixner | 1 | 5.88% | 1 | 33.33% |
Total | 17 | 100.00% | 3 | 100.00% |
static struct clocksource clocksource_dec = {
.name = "dec-ioasic",
.read = dec_ioasic_hpt_read,
.mask = CLOCKSOURCE_MASK(32),
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
static u64 notrace dec_ioasic_read_sched_clock(void)
{
return ioasic_read(IO_REG_FCTR);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Deng-Cheng Zhu | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
int __init dec_ioasic_clocksource_init(void)
{
unsigned int freq;
u32 start, end;
int i = HZ / 8;
ds1287_timer_state();
while (!ds1287_timer_state())
;
start = dec_ioasic_hpt_read(&clocksource_dec);
while (i--)
while (!ds1287_timer_state())
;
end = dec_ioasic_hpt_read(&clocksource_dec);
freq = (end - start) * 8;
/* An early revision of the I/O ASIC didn't have the counter. */
if (!freq)
return -ENXIO;
printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq);
clocksource_dec.rating = 200 + freq / 10000000;
clocksource_register_hz(&clocksource_dec, freq);
sched_clock_register(dec_ioasic_read_sched_clock, 32, freq);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoichi Yuasa | 83 | 69.17% | 1 | 16.67% |
Maciej W. Rozycki | 19 | 15.83% | 2 | 33.33% |
Deng-Cheng Zhu | 9 | 7.50% | 1 | 16.67% |
Magnus Damm | 8 | 6.67% | 1 | 16.67% |
John Stultz | 1 | 0.83% | 1 | 16.67% |
Total | 120 | 100.00% | 6 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoichi Yuasa | 143 | 70.10% | 1 | 12.50% |
Deng-Cheng Zhu | 28 | 13.73% | 2 | 25.00% |
Maciej W. Rozycki | 19 | 9.31% | 2 | 25.00% |
Magnus Damm | 12 | 5.88% | 1 | 12.50% |
Thomas Gleixner | 1 | 0.49% | 1 | 12.50% |
John Stultz | 1 | 0.49% | 1 | 12.50% |
Total | 204 | 100.00% | 8 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.