1 /* linux/arch/arm/plat-samsung/include/plat/samsung-time.h 2 * 3 * Copyright 2011 Samsung Electronics Co., Ltd. 4 * http://www.samsung.com/ 5 * 6 * Header file for samsung s3c and s5p time support 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License version 2 as 10 * published by the Free Software Foundation. 11 */ 12 13 #ifndef __ASM_PLAT_SAMSUNG_TIME_H 14 #define __ASM_PLAT_SAMSUNG_TIME_H __FILE__ 15 16 /* SAMSUNG HR-Timer Clock mode */ 17 enum samsung_timer_mode { 18 SAMSUNG_PWM0, 19 SAMSUNG_PWM1, 20 SAMSUNG_PWM2, 21 SAMSUNG_PWM3, 22 SAMSUNG_PWM4, 23 }; 24 25 struct samsung_timer_source { 26 unsigned int event_id; 27 unsigned int source_id; 28 }; 29 30 /* Be able to sleep for atleast 4 seconds (usually more) */ 31 #define SAMSUNG_TIMER_MIN_RANGE 4 32 33 #if defined(CONFIG_ARCH_S3C24XX) || defined(CONFIG_ARCH_S5PC100) 34 #define TCNT_MAX 0xffff 35 #define TSCALER_DIV 25 36 #define TDIV 50 37 #define TSIZE 16 38 #else 39 #define TCNT_MAX 0xffffffff 40 #define TSCALER_DIV 2 41 #define TDIV 2 42 #define TSIZE 32 43 #endif 44 45 #define NON_PERIODIC 0 46 #define PERIODIC 1 47 48 extern void __init samsung_set_timer_source(enum samsung_timer_mode event, 49 enum samsung_timer_mode source); 50 51 extern void __init samsung_timer_init(void); 52 53 #endif /* __ASM_PLAT_SAMSUNG_TIME_H */ 54