0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef __MPIC_TIMER__
0014 #define __MPIC_TIMER__
0015
0016 #include <linux/interrupt.h>
0017 #include <linux/time.h>
0018
0019 struct mpic_timer {
0020 void *dev;
0021 struct cascade_priv *cascade_handle;
0022 unsigned int num;
0023 unsigned int irq;
0024 };
0025
0026 #ifdef CONFIG_MPIC_TIMER
0027 struct mpic_timer *mpic_request_timer(irq_handler_t fn, void *dev,
0028 time64_t time);
0029 void mpic_start_timer(struct mpic_timer *handle);
0030 void mpic_stop_timer(struct mpic_timer *handle);
0031 void mpic_get_remain_time(struct mpic_timer *handle, time64_t *time);
0032 void mpic_free_timer(struct mpic_timer *handle);
0033 #else
0034 struct mpic_timer *mpic_request_timer(irq_handler_t fn, void *dev,
0035 time64_t time) { return NULL; }
0036 void mpic_start_timer(struct mpic_timer *handle) { }
0037 void mpic_stop_timer(struct mpic_timer *handle) { }
0038 void mpic_get_remain_time(struct mpic_timer *handle, time64_t *time) { }
0039 void mpic_free_timer(struct mpic_timer *handle) { }
0040 #endif
0041
0042 #endif