blob: 9b9ed165e035f38f4449a6a374e032e0af353ef3 [file] [log] [blame]
Prafulla Wadaskar6c08d5d2010-10-12 16:31:40 +05301/*
2 * (C) Copyright 2010
3 * Marvell Semiconductor <www.marvell.com>
4 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
5 * Contributor: Mahavir Jain <mjain@marvell.com>
6 *
7 * See file CREDITS for list of people who contributed to this
8 * project.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23 * MA 02110-1301 USA
24 */
25
26#ifndef _ASM_ARCH_ARMADA100_H
27#define _ASM_ARCH_ARMADA100_H
28
29#ifndef __ASSEMBLY__
30#include <asm/types.h>
31#include <asm/io.h>
32#endif /* __ASSEMBLY__ */
33
34#if defined (CONFIG_ARMADA100)
35#include <asm/arch/cpu.h>
36
37/* Common APB clock register bit definitions */
38#define APBC_APBCLK (1<<0) /* APB Bus Clock Enable */
39#define APBC_FNCLK (1<<1) /* Functional Clock Enable */
40#define APBC_RST (1<<2) /* Reset Generation */
41/* Functional Clock Selection Mask */
42#define APBC_FNCLKSEL(x) (((x) & 0xf) << 4)
43
44/* Register Base Addresses */
45#define ARMD1_DRAM_BASE 0xB0000000
Ajay Bhargav79788bb2011-09-13 22:21:58 +053046#define ARMD1_FEC_BASE 0xC0800000
Prafulla Wadaskar6c08d5d2010-10-12 16:31:40 +053047#define ARMD1_TIMER_BASE 0xD4014000
48#define ARMD1_APBC1_BASE 0xD4015000
49#define ARMD1_APBC2_BASE 0xD4015800
50#define ARMD1_UART1_BASE 0xD4017000
51#define ARMD1_UART2_BASE 0xD4018000
52#define ARMD1_GPIO_BASE 0xD4019000
53#define ARMD1_SSP1_BASE 0xD401B000
54#define ARMD1_SSP2_BASE 0xD401C000
55#define ARMD1_MFPR_BASE 0xD401E000
56#define ARMD1_SSP3_BASE 0xD401F000
57#define ARMD1_SSP4_BASE 0xD4020000
58#define ARMD1_SSP5_BASE 0xD4021000
59#define ARMD1_UART3_BASE 0xD4026000
60#define ARMD1_MPMU_BASE 0xD4050000
61#define ARMD1_APMU_BASE 0xD4282800
62#define ARMD1_CPU_BASE 0xD4282C00
63
64/*
65 * Main Power Management (MPMU) Registers
66 * Refer Datasheet Appendix A.8
67 */
68struct armd1mpmu_registers {
69 u8 pad0[0x08 - 0x00];
70 u32 fccr; /*0x0008*/
71 u32 pocr; /*0x000c*/
72 u32 posr; /*0x0010*/
73 u32 succr; /*0x0014*/
74 u8 pad1[0x030 - 0x014 - 4];
75 u32 gpcr; /*0x0030*/
76 u8 pad2[0x200 - 0x030 - 4];
77 u32 wdtpcr; /*0x0200*/
78 u8 pad3[0x1000 - 0x200 - 4];
79 u32 apcr; /*0x1000*/
80 u32 apsr; /*0x1004*/
81 u8 pad4[0x1020 - 0x1004 - 4];
82 u32 aprr; /*0x1020*/
83 u32 acgr; /*0x1024*/
84 u32 arsr; /*0x1028*/
85};
86
87/*
88 * APB1 Clock Reset/Control Registers
89 * Refer Datasheet Appendix A.10
90 */
91struct armd1apb1_registers {
92 u32 uart1; /*0x000*/
93 u32 uart2; /*0x004*/
94 u32 gpio; /*0x008*/
95 u32 pwm1; /*0x00c*/
96 u32 pwm2; /*0x010*/
97 u32 pwm3; /*0x014*/
98 u32 pwm4; /*0x018*/
99 u8 pad0[0x028 - 0x018 - 4];
100 u32 rtc; /*0x028*/
101 u32 twsi0; /*0x02c*/
102 u32 kpc; /*0x030*/
103 u32 timers; /*0x034*/
104 u8 pad1[0x03c - 0x034 - 4];
105 u32 aib; /*0x03c*/
106 u32 sw_jtag; /*0x040*/
107 u32 timer1; /*0x044*/
108 u32 onewire; /*0x048*/
109 u8 pad2[0x050 - 0x048 - 4];
110 u32 asfar; /*0x050 AIB Secure First Access Reg*/
111 u32 assar; /*0x054 AIB Secure Second Access Reg*/
112 u8 pad3[0x06c - 0x054 - 4];
113 u32 twsi1; /*0x06c*/
114 u32 uart3; /*0x070*/
115 u8 pad4[0x07c - 0x070 - 4];
116 u32 timer2; /*0x07C*/
117 u8 pad5[0x084 - 0x07c - 4];
118 u32 ac97; /*0x084*/
119};
120
121#endif /* CONFIG_ARMADA100 */
122#endif /* _ASM_ARCH_ARMADA100_H */