summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/arch/arm/mach-wmt/include/mach/wmt_mc5.h
blob: ba21407fb40e7fb301b894e05d76131e5ba2831a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*++
linux/include/asm-arm/arch-wmt/wmt_mc5.h

Copyright (c) 2008  WonderMedia Technologies, Inc.

This program is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software Foundation,
either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program.  If not, see <http://www.gnu.org/licenses/>.

WonderMedia Technologies, Inc.
10F, 529, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C.
--*/

/* Be sure that virtual mapping is defined right */
#ifndef __ASM_ARCH_HARDWARE_H
#error "You must include hardware.h, not vt8500_pmc.h"
#endif

#ifndef __VT8500_MC5_H
#define __VT8500_MC5_H

/******************************************************************************
 *
 * Define the register access macros.
 *
 * Note: Current policy in standalone program is using register as a pointer.
 *
 ******************************************************************************/
#include "wmt_mmap.h"

/******************************************************************************
 *
 * VT8500 Power Management Controller Base Address.
 *
 ******************************************************************************/
#ifdef __MC5_BASE
#error "__RTC_BASE has already been defined in another file."
#endif
#ifdef MEMORY_CTRL_V4_CFG_BASE_ADDR               /* From vt8500.mmap.h */
#define __MC5_BASE      MEMORY_CTRL_V4_CFG_BASE_ADDR
#else
#define __MC5_BASE      0xFE000400      /* 64K */
#endif

/******************************************************************************
 *
 * VT8500 memory control registers.
 *
 ******************************************************************************/
/******************************************************************************
 *
 * Address constant for each register.
 *
 ******************************************************************************/
#define MC_CLOCK_CTRL0_ADDR      (__MC5_BASE + 0x0024)
#define MC_CLOCK_CTRL1_ADDR      (__MC5_BASE + 0x0028)
#define MC_CONF_ADDR      (__MC5_BASE + 0x0034)


/******************************************************************************
 *
 * Register pointer.
 *
 ******************************************************************************/
#define MC_CLOCK_CTRL0_REG			(REG32_PTR(MC_CLOCK_CTRL0_ADDR))/*0x24*/
#define MC_CLOCK_CTRL1_REG			(REG32_PTR(MC_CLOCK_CTRL1_ADDR))/*0x28*/
#define MC_CONF_REG      (REG32_PTR(MC_CONF_ADDR))/*0x34*/

/******************************************************************************
 *
 * Register value.
 *
 ******************************************************************************/
#define MC_CLOCK_CTRL0_VAL			(REG32_VAL(MC_CLOCK_CTRL0_ADDR))/*0x24*/
#define MC_CLOCK_CTRL1_VAL			(REG32_VAL(MC_CLOCK_CTRL1_ADDR))/*0x28*/
#define MC_CONF_VAL			(REG32_VAL(MC_CONF_ADDR))/*0x28*/


//#define UDC_HOTPLUG_TIMER

#endif /* __VT8500_PMC_H */