GEODE: MFGPT support for Geode-class machines
PATCH 2/3 GEODE: MFGPT support for Geode-class machines
This adds support for Multi-Function General Purpose Timers. It detects the available timers during southbridge init, and provides an API for allocating and setting the timers. They're higher resolution than the standard PIT, so the MFGPTs come in handy for quite a few things.
Note that we never clobber the timers that the BIOS might have opted to use; we just check for unused timers.
Signed-off-by Jordan Crouse <[email protected]>
Signed-off-by Andres Salomon <[email protected]>
--- arch/i386/kernel/Makefile | 2 +- arch/i386/kernel/geode.c | 4 + arch/i386/kernel/mfgpt.c | 200 +++++++++++++++++++++++++++++++++++++++++++++ include/asm-i386/geode.h | 50 +++++++++++ 4 files changed, 255 insertions(+), 1 deletions(-) create mode 100644 arch/i386/kernel/mfgpt.c
arch/i386/kernel/Makefile +1 -1
@@ -40,7 +40,7 @@ obj-$(CONFIG_VM86) += vm86.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_HPET_TIMER) += hpet.o obj-$(CONFIG_K8_NB) += k8.o -obj-$(CONFIG_MGEODE_LX) += geode.o +obj-$(CONFIG_MGEODE_LX) += geode.o mfgpt.o obj-$(CONFIG_VMI) += vmi.o vmiclock.o obj-$(CONFIG_PARAVIRT) += paravirt.o
arch/i386/kernel/geode.c +4 -0
@@ -146,10 +146,14 @@ EXPORT_SYMBOL_GPL(geode_gpio_setup_event);static int __init geode_southbridge_init (void ) { +int timers; +if (!is_geode ())return -ENODEV ;init_lbars (); + timers =geode_mfgpt_detect (); +printk (KERN_INFO "geode: %d MFGPT timers available.\n" , timers);return 0 ; }
arch/i386/kernel/mfgpt.c new file +200 -0
200 lines not on this page · raw message
include/asm-i386/geode.h +50 -0
54 lines not on this page · raw message
Signature · 1 line
1.5.2.2