1*39f0023eSMatthias Weisser /*
2*39f0023eSMatthias Weisser  * (C) Copyright 2011
3*39f0023eSMatthias Weisser  * Matthias Weisser <weisserm@arcor.de>
4*39f0023eSMatthias Weisser  *
5*39f0023eSMatthias Weisser  * (C) Copyright 2009 DENX Software Engineering
6*39f0023eSMatthias Weisser  * Author: John Rigby <jrigby@gmail.com>
7*39f0023eSMatthias Weisser  *
8*39f0023eSMatthias Weisser  * Common asm macros for imx25
9*39f0023eSMatthias Weisser  *
10*39f0023eSMatthias Weisser  * See file CREDITS for list of people who contributed to this
11*39f0023eSMatthias Weisser  * project.
12*39f0023eSMatthias Weisser  *
13*39f0023eSMatthias Weisser  * This program is free software; you can redistribute it and/or
14*39f0023eSMatthias Weisser  * modify it under the terms of the GNU General Public License as
15*39f0023eSMatthias Weisser  * published by the Free Software Foundation; either version 2 of
16*39f0023eSMatthias Weisser  * the License, or (at your option) any later version.
17*39f0023eSMatthias Weisser  *
18*39f0023eSMatthias Weisser  * This program is distributed in the hope that it will be useful,
19*39f0023eSMatthias Weisser  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20*39f0023eSMatthias Weisser  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21*39f0023eSMatthias Weisser  * GNU General Public License for more details.
22*39f0023eSMatthias Weisser  *
23*39f0023eSMatthias Weisser  * You should have received a copy of the GNU General Public License
24*39f0023eSMatthias Weisser  * along with this program; if not, write to the Free Software
25*39f0023eSMatthias Weisser  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26*39f0023eSMatthias Weisser  * MA 02111-1307 USA
27*39f0023eSMatthias Weisser  */
28*39f0023eSMatthias Weisser 
29*39f0023eSMatthias Weisser #ifndef __ASM_ARM_ARCH_MACRO_H__
30*39f0023eSMatthias Weisser #define __ASM_ARM_ARCH_MACRO_H__
31*39f0023eSMatthias Weisser #ifdef __ASSEMBLY__
32*39f0023eSMatthias Weisser 
33*39f0023eSMatthias Weisser #include <asm/arch/imx-regs.h>
34*39f0023eSMatthias Weisser #include <asm/arch/asm-offsets.h>
35*39f0023eSMatthias Weisser 
36*39f0023eSMatthias Weisser .macro init_aips
37*39f0023eSMatthias Weisser 	write32	IMX_AIPS1_BASE + AIPS_MPR_0_7, 0x77777777
38*39f0023eSMatthias Weisser 	write32	IMX_AIPS1_BASE + AIPS_MPR_8_15, 0x77777777
39*39f0023eSMatthias Weisser 	write32	IMX_AIPS2_BASE + AIPS_MPR_0_7, 0x77777777
40*39f0023eSMatthias Weisser 	write32	IMX_AIPS2_BASE + AIPS_MPR_8_15, 0x77777777
41*39f0023eSMatthias Weisser .endm
42*39f0023eSMatthias Weisser 
43*39f0023eSMatthias Weisser .macro init_max
44*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR0, 0x43210
45*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR1, 0x43210
46*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR2, 0x43210
47*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR3, 0x43210
48*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR4, 0x43210
49*39f0023eSMatthias Weisser 
50*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR0, 0x10
51*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR1, 0x10
52*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR2, 0x10
53*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR3, 0x10
54*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR4, 0x10
55*39f0023eSMatthias Weisser 
56*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR0, 0x0
57*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR1, 0x0
58*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR2, 0x0
59*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR3, 0x0
60*39f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR4, 0x0
61*39f0023eSMatthias Weisser .endm
62*39f0023eSMatthias Weisser 
63*39f0023eSMatthias Weisser #endif /* __ASSEMBLY__ */
64*39f0023eSMatthias Weisser #endif /* __ASM_ARM_ARCH_MACRO_H__ */
65