macro.h 2.0 KB

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