1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2009 Samsung Electronics
4 * Kyungmin Park <kyungmin.park@samsung.com>
5 * Minkyu Kang <mk7.kang@samsung.com>
8 #ifndef __ASM_ARM_ARCH_PWM_H_
9 #define __ASM_ARM_ARCH_PWM_H_
11 #define PRESCALER_0 (8 - 1) /* prescaler of timer 0, 1 */
12 #define PRESCALER_1 (16 - 1) /* prescaler of timer 2, 3, 4 */
15 #define MUX_DIV_1 0 /* 1/1 period */
16 #define MUX_DIV_2 1 /* 1/2 period */
17 #define MUX_DIV_4 2 /* 1/4 period */
18 #define MUX_DIV_8 3 /* 1/8 period */
19 #define MUX_DIV_16 4 /* 1/16 period */
21 #define MUX_DIV_SHIFT(x) (x * 4)
23 #define TCON_OFFSET(x) ((x + 1) * (!!x) << 2)
25 #define TCON_START(x) (1 << TCON_OFFSET(x))
26 #define TCON_UPDATE(x) (1 << (TCON_OFFSET(x) + 1))
27 #define TCON_INVERTER(x) (1 << (TCON_OFFSET(x) + 2))
28 #define TCON_AUTO_RELOAD(x) (1 << (TCON_OFFSET(x) + 3))
29 #define TCON4_AUTO_RELOAD (1 << 22)
50 unsigned int tintcstat;
52 #endif /* __ASSEMBLY__ */