diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-15 17:45:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-15 17:45:52 -0400 |
commit | d8efd82eece89f8a5790b0febf17522affe9e1f1 (patch) | |
tree | f441f9070639e08734de38180027c6a32ebe6c53 /arch/mips/kernel/csrc-ioasic.c | |
parent | cd619e21ea468b02af9eeed75eae2307ec7de1cb (diff) | |
parent | 1b4676330aa6782bd73ec24cb4896467475f29f5 (diff) | |
download | kernel_goldelico_gta04-d8efd82eece89f8a5790b0febf17522affe9e1f1.zip kernel_goldelico_gta04-d8efd82eece89f8a5790b0febf17522affe9e1f1.tar.gz kernel_goldelico_gta04-d8efd82eece89f8a5790b0febf17522affe9e1f1.tar.bz2 |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle:
"These are four patches for three construction sites:
- Fix register decoding for the combination of multi-core processors
and multi-threading.
- Two more fixes that are part of the ongoing DECstation resurrection
work. One of these touches a DECstation-only network driver.
- Finally Markos' trivial build fix for the AP/SP support.
(With this applied now all MIPS defconfigs are building again)"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: kernel: vpe: Make vpe_attrs an array of pointers.
MIPS: Fix SMP core calculations when using MT support.
MIPS: DECstation I/O ASIC DMA interrupt handling fix
MIPS: DECstation HRT initialization rearrangement
Diffstat (limited to 'arch/mips/kernel/csrc-ioasic.c')
-rw-r--r-- | arch/mips/kernel/csrc-ioasic.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips/kernel/csrc-ioasic.c b/arch/mips/kernel/csrc-ioasic.c index 87e88fe..6cbbf6e 100644 --- a/arch/mips/kernel/csrc-ioasic.c +++ b/arch/mips/kernel/csrc-ioasic.c @@ -37,7 +37,7 @@ static struct clocksource clocksource_dec = { .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; -void __init dec_ioasic_clocksource_init(void) +int __init dec_ioasic_clocksource_init(void) { unsigned int freq; u32 start, end; @@ -56,8 +56,14 @@ void __init dec_ioasic_clocksource_init(void) 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); + return 0; } |