aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-stmp37xx/include/mach/regs-clkctrl.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-stmp37xx/include/mach/regs-clkctrl.h')
-rw-r--r--arch/arm/mach-stmp37xx/include/mach/regs-clkctrl.h149
1 files changed, 68 insertions, 81 deletions
diff --git a/arch/arm/mach-stmp37xx/include/mach/regs-clkctrl.h b/arch/arm/mach-stmp37xx/include/mach/regs-clkctrl.h
index 229ee75f90d9..47f5c92fdaf6 100644
--- a/arch/arm/mach-stmp37xx/include/mach/regs-clkctrl.h
+++ b/arch/arm/mach-stmp37xx/include/mach/regs-clkctrl.h
@@ -1,85 +1,72 @@
1#ifndef _INCLUDE_ASM_ARCH_REGS_CLKCTRL_H 1/*
2#define _INCLUDE_ASM_ARCH_REGS_CLKCTRL_H 2 * stmp37xx: CLKCTRL register definitions
3 *
4 * Copyright (c) 2008 Freescale Semiconductor
5 * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef _MACH_REGS_CLKCTRL
22#define _MACH_REGS_CLKCTRL
3 23
4#include <mach/stmp3xxx_regs.h> 24#define REGS_CLKCTRL_BASE (STMP3XXX_REGS_BASE + 0x40000)
5 25
6#define REGS_CLKCTRL_BASE (REGS_BASE + 0x00040000) 26#define HW_CLKCTRL_PLLCTRL0 0x0
7
8#define HW_CLKCTRL_PLLCTRL0_ADDR (REGS_CLKCTRL_BASE + 0x00)
9HW_REGISTER(HW_CLKCTRL_PLLCTRL0, REGS_CLKCTRL_BASE, 0x00)
10#define BM_CLKCTRL_PLLCTRL0_EN_USB_CLKS 0x00040000 27#define BM_CLKCTRL_PLLCTRL0_EN_USB_CLKS 0x00040000
11#define HW_CLKCTRL_PLLCTRL1_ADDR (REGS_CLKCTRL_BASE + 0x10) 28
12HW_REGISTER(HW_CLKCTRL_PLLCTRL1, REGS_CLKCTRL_BASE, 0x10) 29#define HW_CLKCTRL_CPU 0x20
13 30#define BM_CLKCTRL_CPU_DIV_CPU 0x0000003F
14#define HW_CLKCTRL_CPU_ADDR (REGS_CLKCTRL_BASE + 0x20) 31#define BP_CLKCTRL_CPU_DIV_CPU 0
15HW_REGISTER(HW_CLKCTRL_CPU, REGS_CLKCTRL_BASE, 0x20) 32
16#define BM_CLKCTRL_CPU_DIV_CPU 0x0000003F 33#define HW_CLKCTRL_HBUS 0x30
17#define BF_CLKCTRL_CPU_DIV_CPU(v) \ 34#define BM_CLKCTRL_HBUS_DIV 0x0000001F
18 (((v) << 0) & BM_CLKCTRL_CPU_DIV_CPU) 35#define BP_CLKCTRL_HBUS_DIV 0
19 36
20#define HW_CLKCTRL_HBUS_ADDR (REGS_CLKCTRL_BASE + 0x30) 37#define HW_CLKCTRL_XBUS 0x40
21HW_REGISTER(HW_CLKCTRL_HBUS, REGS_CLKCTRL_BASE, 0x30) 38
22#define BM_CLKCTRL_HBUS_DIV_FRAC_EN 0 /* for compatitibility */ 39#define HW_CLKCTRL_XTAL 0x50
23#define BM_CLKCTRL_HBUS_DIV 0x0000001F 40
24#define BF_CLKCTRL_HBUS_DIV(v) \ 41#define HW_CLKCTRL_PIX 0x60
25 (((v) << 0) & BM_CLKCTRL_HBUS_DIV) 42#define BM_CLKCTRL_PIX_DIV 0x00007FFF
26#define HW_CLKCTRL_XBUS_ADDR (REGS_CLKCTRL_BASE + 0x40) 43#define BP_CLKCTRL_PIX_DIV 0
27HW_REGISTER(HW_CLKCTRL_XBUS, REGS_CLKCTRL_BASE, 0x40) 44#define BM_CLKCTRL_PIX_CLKGATE 0x80000000
28#define HW_CLKCTRL_XTAL_ADDR (REGS_CLKCTRL_BASE + 0x50) 45
29HW_REGISTER(HW_CLKCTRL_XTAL, REGS_CLKCTRL_BASE, 0x50) 46#define HW_CLKCTRL_SSP 0x70
30#define HW_CLKCTRL_PIX_ADDR (REGS_CLKCTRL_BASE + 0x60) 47
31HW_REGISTER(HW_CLKCTRL_PIX, REGS_CLKCTRL_BASE, 0x60) 48#define HW_CLKCTRL_GPMI 0x80
32#define BM_CLKCTRL_PIX_CLKGATE 0x80000000 49
33#define BM_CLKCTRL_PIX_BUSY 0x20000000 50#define HW_CLKCTRL_SPDIF 0x90
34#define BM_CLKCTRL_PIX_DIV 0x00007FFF 51
35#define BP_CLKCTRL_PIX_DIV 0 52#define HW_CLKCTRL_EMI 0xA0
36#define BF_CLKCTRL_PIX_DIV(v) \ 53
37 (((v) << BP_CLKCTRL_PIX_DIV) & BM_CLKCTRL_PIX_DIV) 54#define HW_CLKCTRL_IR 0xB0
38#define HW_CLKCTRL_SSP_ADDR (REGS_CLKCTRL_BASE + 0x70) 55
39HW_REGISTER(HW_CLKCTRL_SSP, REGS_CLKCTRL_BASE, 0x70) 56#define HW_CLKCTRL_SAIF 0xC0
40#define HW_CLKCTRL_GPMI_ADDR (REGS_CLKCTRL_BASE + 0x80) 57
41HW_REGISTER(HW_CLKCTRL_GPMI, REGS_CLKCTRL_BASE, 0x80) 58#define HW_CLKCTRL_FRAC 0xD0
42#define HW_CLKCTRL_SPDIF_ADDR (REGS_CLKCTRL_BASE + 0x90) 59#define BM_CLKCTRL_FRAC_EMIFRAC 0x00003F00
43HW_REGISTER(HW_CLKCTRL_SPDIF, REGS_CLKCTRL_BASE, 0x90) 60#define BP_CLKCTRL_FRAC_EMIFRAC 8
44#define HW_CLKCTRL_EMI_ADDR (REGS_CLKCTRL_BASE + 0xA0) 61#define BM_CLKCTRL_FRAC_PIXFRAC 0x003F0000
45HW_REGISTER(HW_CLKCTRL_EMI, REGS_CLKCTRL_BASE, 0xA0) 62#define BP_CLKCTRL_FRAC_PIXFRAC 16
46#define HW_CLKCTRL_IR_ADDR (REGS_CLKCTRL_BASE + 0xB0)
47HW_REGISTER(HW_CLKCTRL_IR, REGS_CLKCTRL_BASE, 0xB0)
48#define HW_CLKCTRL_SAIF_ADDR (REGS_CLKCTRL_BASE + 0xC0)
49HW_REGISTER(HW_CLKCTRL_SAIF, REGS_CLKCTRL_BASE, 0xC0)
50#define HW_CLKCTRL_FRAC_ADDR (REGS_CLKCTRL_BASE + 0xD0)
51HW_REGISTER(HW_CLKCTRL_FRAC, REGS_CLKCTRL_BASE, 0xD0)
52#define BM_CLKCTRL_FRAC_CLKGATEIO 0x80000000
53#define BM_CLKCTRL_FRAC_IO_STABLE 0x40000000
54#define BM_CLKCTRL_FRAC_IOFRAC 0x3F000000
55#define BP_CLKCTRL_FRAC_IOFRAC 24
56#define BF_CLKCTRL_FRAC_IOFRAC(v) \
57 (((v) << BP_CLKCTRL_FRAC_IOFRAC) & BM_CLKCTRL_FRAC_IOFRAC)
58#define BM_CLKCTRL_FRAC_CLKGATEPIX 0x00800000 63#define BM_CLKCTRL_FRAC_CLKGATEPIX 0x00800000
59#define BM_CLKCTRL_FRAC_PIXFRAC 0x003F0000 64
60#define BP_CLKCTRL_FRAC_PIXFRAC 16 65#define HW_CLKCTRL_CLKSEQ 0xE0
61#define BF_CLKCTRL_FRAC_PIXFRAC(v) \ 66#define BM_CLKCTRL_CLKSEQ_BYPASS_PIX 0x00000002
62 (((v) << BP_CLKCTRL_FRAC_PIXFRAC) & BM_CLKCTRL_FRAC_PIXFRAC) 67
63#define BM_CLKCTRL_FRAC_CLKGATEEMI 0x00008000 68#define HW_CLKCTRL_RESET 0xF0
64#define BM_CLKCTRL_FRAC_EMIFRAC 0x00003F00 69#define BM_CLKCTRL_RESET_DIG 0x00000001
65#define BP_CLKCTRL_FRAC_EMIFRAC 8 70#define BP_CLKCTRL_RESET_DIG 0
66#define BF_CLKCTRL_FRAC_EMIFRAC(v) \ 71
67 (((v) << BP_CLKCTRL_FRAC_EMIFRAC) & BM_CLKCTRL_FRAC_EMIFRAC) 72#endif
68#define BM_CLKCTRL_FRAC_CLKGATECPU 0x00000080
69#define BM_CLKCTRL_FRAC_CPUFRAC 0x0000003F
70#define BP_CLKCTRL_FRAC_CPUFRAC 0
71#define BF_CLKCTRL_FRAC_CPUFRAC(v) \
72 (((v) << BP_CLKCTRL_FRAC_CPUFRAC) & BM_CLKCTRL_FRAC_CPUFRAC)
73#define HW_CLKCTRL_CLKSEQ_ADDR (REGS_CLKCTRL_BASE + 0xE0)
74HW_REGISTER(HW_CLKCTRL_CLKSEQ, REGS_CLKCTRL_BASE, 0xE0)
75#define BM_CLKCTRL_CLKSEQ_BYPASS_CPU 0x00000080
76#define BM_CLKCTRL_CLKSEQ_BYPASS_EMI 0x00000040
77#define BM_CLKCTRL_CLKSEQ_BYPASS_SSP 0x00000020
78#define BM_CLKCTRL_CLKSEQ_BYPASS_GPMI 0x00000010
79#define BM_CLKCTRL_CLKSEQ_BYPASS_IR 0x00000008
80#define BM_CLKCTRL_CLKSEQ_BYPASS_PIX 0x00000002
81#define BM_CLKCTRL_CLKSEQ_BYPASS_SAIF 0x00000001
82HW_REGISTER_WO(HW_CLKCTRL_RESET, REGS_CLKCTRL_BASE, 0xF0)
83#define BM_CLKCTRL_RESET_CHIP 0x00000002
84#define BM_CLKCTRL_RESET_DIG 0x00000001
85#endif /* _INCLUDE_ASM_ARCH_REGS_CLKCTRL_H */