3 * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
38 * TIMER_CONTROL register settings
41 #define GPT_PRESCALER_MASK 0x000F
42 #define GPT_PRESCALER_1 0x0000
43 #define GPT_PRESCALER_2 0x0001
44 #define GPT_PRESCALER_4 0x0002
45 #define GPT_PRESCALER_8 0x0003
46 #define GPT_PRESCALER_16 0x0004
47 #define GPT_PRESCALER_32 0x0005
48 #define GPT_PRESCALER_64 0x0006
49 #define GPT_PRESCALER_128 0x0007
50 #define GPT_PRESCALER_256 0x0008
52 #define GPT_MODE_SINGLE_SHOT 0x0010
53 #define GPT_MODE_AUTO_RELOAD 0x0000
55 #define GPT_ENABLE 0x0020
57 #define GPT_CAPT_MODE_MASK 0x00C0
58 #define GPT_CAPT_MODE_NONE 0x0000
59 #define GPT_CAPT_MODE_RE 0x0040
60 #define GPT_CAPT_MODE_FE 0x0080
61 #define GPT_CAPT_MODE_BOTH 0x00C0
63 #define GPT_INT_MATCH 0x0100
64 #define GPT_INT_FE 0x0200
65 #define GPT_INT_RE 0x0400
68 * TIMER_STATUS register settings
71 #define GPT_STS_MATCH 0x0001
72 #define GPT_STS_FE 0x0002
73 #define GPT_STS_RE 0x0004
76 * TIMER_COMPARE register settings
79 #define GPT_FREE_RUNNING 0xFFFF
81 /* Timer, HZ specific defines */
82 #define CONFIG_SPEAR_HZ (1000)
83 #define CONFIG_SPEAR_HZ_CLOCK (8300000)