139f0023eSMatthias Weisser /*
239f0023eSMatthias Weisser  * (C) Copyright 2011
339f0023eSMatthias Weisser  * Matthias Weisser <weisserm@arcor.de>
439f0023eSMatthias Weisser  *
539f0023eSMatthias Weisser  * (C) Copyright 2009 DENX Software Engineering
639f0023eSMatthias Weisser  * Author: John Rigby <jrigby@gmail.com>
739f0023eSMatthias Weisser  *
839f0023eSMatthias Weisser  * Common asm macros for imx25
939f0023eSMatthias Weisser  *
1039f0023eSMatthias Weisser  * See file CREDITS for list of people who contributed to this
1139f0023eSMatthias Weisser  * project.
1239f0023eSMatthias Weisser  *
1339f0023eSMatthias Weisser  * This program is free software; you can redistribute it and/or
1439f0023eSMatthias Weisser  * modify it under the terms of the GNU General Public License as
1539f0023eSMatthias Weisser  * published by the Free Software Foundation; either version 2 of
1639f0023eSMatthias Weisser  * the License, or (at your option) any later version.
1739f0023eSMatthias Weisser  *
1839f0023eSMatthias Weisser  * This program is distributed in the hope that it will be useful,
1939f0023eSMatthias Weisser  * but WITHOUT ANY WARRANTY; without even the implied warranty of
2039f0023eSMatthias Weisser  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2139f0023eSMatthias Weisser  * GNU General Public License for more details.
2239f0023eSMatthias Weisser  *
2339f0023eSMatthias Weisser  * You should have received a copy of the GNU General Public License
2439f0023eSMatthias Weisser  * along with this program; if not, write to the Free Software
2539f0023eSMatthias Weisser  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2639f0023eSMatthias Weisser  * MA 02111-1307 USA
2739f0023eSMatthias Weisser  */
2839f0023eSMatthias Weisser 
2939f0023eSMatthias Weisser #ifndef __ASM_ARM_ARCH_MACRO_H__
3039f0023eSMatthias Weisser #define __ASM_ARM_ARCH_MACRO_H__
3139f0023eSMatthias Weisser #ifdef __ASSEMBLY__
3239f0023eSMatthias Weisser 
3339f0023eSMatthias Weisser #include <asm/arch/imx-regs.h>
34*a4814a69SStefano Babic #include <generated/asm-offsets.h>
3539f0023eSMatthias Weisser 
3639f0023eSMatthias Weisser .macro init_aips
3739f0023eSMatthias Weisser 	write32	IMX_AIPS1_BASE + AIPS_MPR_0_7, 0x77777777
3839f0023eSMatthias Weisser 	write32	IMX_AIPS1_BASE + AIPS_MPR_8_15, 0x77777777
3939f0023eSMatthias Weisser 	write32	IMX_AIPS2_BASE + AIPS_MPR_0_7, 0x77777777
4039f0023eSMatthias Weisser 	write32	IMX_AIPS2_BASE + AIPS_MPR_8_15, 0x77777777
4139f0023eSMatthias Weisser .endm
4239f0023eSMatthias Weisser 
4339f0023eSMatthias Weisser .macro init_max
4439f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR0, 0x43210
4539f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR1, 0x43210
4639f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR2, 0x43210
4739f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR3, 0x43210
4839f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MPR4, 0x43210
4939f0023eSMatthias Weisser 
5039f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR0, 0x10
5139f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR1, 0x10
5239f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR2, 0x10
5339f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR3, 0x10
5439f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_SGPCR4, 0x10
5539f0023eSMatthias Weisser 
5639f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR0, 0x0
5739f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR1, 0x0
5839f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR2, 0x0
5939f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR3, 0x0
6039f0023eSMatthias Weisser 	write32	IMX_MAX_BASE + MAX_MGPCR4, 0x0
6139f0023eSMatthias Weisser .endm
6239f0023eSMatthias Weisser 
6339f0023eSMatthias Weisser #endif /* __ASSEMBLY__ */
6439f0023eSMatthias Weisser #endif /* __ASM_ARM_ARCH_MACRO_H__ */
65