Skip to content

Commit 9d07156

Browse files
committed
Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: clocksource: apb: Share APB timer code with other platforms
2 parents c0c463d + 06c3df4 commit 9d07156

7 files changed

Lines changed: 533 additions & 360 deletions

File tree

‎arch/x86/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ config HPET_EMULATE_RTC
623623
config APB_TIMER
624624
def_bool y if MRST
625625
prompt "Langwell APB Timer Support" if X86_MRST
626+
select DW_APB_TIMER
626627
help
627628
APB timer is the replacement for 8254, HPET on X86 MID platforms.
628629
The APBT provides a stable time base on SMP

‎arch/x86/include/asm/apb_timer.h‎

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,15 @@
1818

1919
#ifdef CONFIG_APB_TIMER
2020

21-
/* Langwell DW APB timer registers */
22-
#define APBTMR_N_LOAD_COUNT 0x00
23-
#define APBTMR_N_CURRENT_VALUE 0x04
24-
#define APBTMR_N_CONTROL 0x08
25-
#define APBTMR_N_EOI 0x0c
26-
#define APBTMR_N_INT_STATUS 0x10
27-
28-
#define APBTMRS_INT_STATUS 0xa0
29-
#define APBTMRS_EOI 0xa4
30-
#define APBTMRS_RAW_INT_STATUS 0xa8
31-
#define APBTMRS_COMP_VERSION 0xac
32-
#define APBTMRS_REG_SIZE 0x14
33-
34-
/* register bits */
35-
#define APBTMR_CONTROL_ENABLE (1<<0)
36-
#define APBTMR_CONTROL_MODE_PERIODIC (1<<1) /*1: periodic 0:free running */
37-
#define APBTMR_CONTROL_INT (1<<2)
38-
3921
/* default memory mapped register base */
4022
#define LNW_SCU_ADDR 0xFF100000
4123
#define LNW_EXT_TIMER_OFFSET 0x1B800
4224
#define APBT_DEFAULT_BASE (LNW_SCU_ADDR+LNW_EXT_TIMER_OFFSET)
4325
#define LNW_EXT_TIMER_PGOFFSET 0x800
4426

4527
/* APBT clock speed range from PCLK to fabric base, 25-100MHz */
46-
#define APBT_MAX_FREQ 50
47-
#define APBT_MIN_FREQ 1
28+
#define APBT_MAX_FREQ 50000000
29+
#define APBT_MIN_FREQ 1000000
4830
#define APBT_MMAP_SIZE 1024
4931

5032
#define APBT_DEV_USED 1

0 commit comments

Comments
 (0)