Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-btrfs-devel.git] / arch / x86 / include / asm / apb_timer.h
blob0acbac299e49b5d2be2c58efe308d4ac1bb760a1
1 /*
2 * apb_timer.h: Driver for Langwell APB timer based on Synopsis DesignWare
4 * (C) Copyright 2009 Intel Corporation
5 * Author: Jacob Pan (jacob.jun.pan@intel.com)
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; version 2
10 * of the License.
12 * Note:
15 #ifndef ASM_X86_APBT_H
16 #define ASM_X86_APBT_H
17 #include <linux/sfi.h>
19 #ifdef CONFIG_APB_TIMER
21 /* default memory mapped register base */
22 #define LNW_SCU_ADDR 0xFF100000
23 #define LNW_EXT_TIMER_OFFSET 0x1B800
24 #define APBT_DEFAULT_BASE (LNW_SCU_ADDR+LNW_EXT_TIMER_OFFSET)
25 #define LNW_EXT_TIMER_PGOFFSET 0x800
27 /* APBT clock speed range from PCLK to fabric base, 25-100MHz */
28 #define APBT_MAX_FREQ 50000000
29 #define APBT_MIN_FREQ 1000000
30 #define APBT_MMAP_SIZE 1024
32 #define APBT_DEV_USED 1
34 extern void apbt_time_init(void);
35 extern unsigned long apbt_quick_calibrate(void);
36 extern int arch_setup_apbt_irqs(int irq, int trigger, int mask, int cpu);
37 extern void apbt_setup_secondary_clock(void);
39 extern struct sfi_timer_table_entry *sfi_get_mtmr(int hint);
40 extern void sfi_free_mtmr(struct sfi_timer_table_entry *mtmr);
41 extern int sfi_mtimer_num;
43 #else /* CONFIG_APB_TIMER */
45 static inline unsigned long apbt_quick_calibrate(void) {return 0; }
46 static inline void apbt_time_init(void) { }
48 #endif
49 #endif /* ASM_X86_APBT_H */