crm_regs.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
  3. * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
  4. *
  5. * This file may be distributed under the terms of the GNU General
  6. * Public License, version 2.
  7. */
  8. #ifndef __ARCH_ARM_MACH_MX1_CRM_REGS_H__
  9. #define __ARCH_ARM_MACH_MX1_CRM_REGS_H__
  10. #define CCM_BASE IO_ADDRESS(CCM_BASE_ADDR)
  11. #define SCM_BASE IO_ADDRESS(SCM_BASE_ADDR)
  12. /* CCM register addresses */
  13. #define CCM_CSCR (CCM_BASE + 0x0)
  14. #define CCM_MPCTL0 (CCM_BASE + 0x4)
  15. #define CCM_MPCTL1 (CCM_BASE + 0x8)
  16. #define CCM_SPCTL0 (CCM_BASE + 0xC)
  17. #define CCM_SPCTL1 (CCM_BASE + 0x10)
  18. #define CCM_PCDR (CCM_BASE + 0x20)
  19. #define CCM_CSCR_CLKO_OFFSET 29
  20. #define CCM_CSCR_CLKO_MASK (0x7 << 29)
  21. #define CCM_CSCR_USB_OFFSET 26
  22. #define CCM_CSCR_USB_MASK (0x7 << 26)
  23. #define CCM_CSCR_SPLL_RESTART (1 << 22)
  24. #define CCM_CSCR_MPLL_RESTART (1 << 21)
  25. #define CCM_CSCR_OSC_EN_SHIFT 17
  26. #define CCM_CSCR_SYSTEM_SEL (1 << 16)
  27. #define CCM_CSCR_BCLK_OFFSET 10
  28. #define CCM_CSCR_BCLK_MASK (0xF << 10)
  29. #define CCM_CSCR_PRESC (1 << 15)
  30. #define CCM_CSCR_SPEN (1 << 1)
  31. #define CCM_CSCR_MPEN (1 << 0)
  32. #define CCM_PCDR_PCLK3_OFFSET 16
  33. #define CCM_PCDR_PCLK3_MASK (0x7F << 16)
  34. #define CCM_PCDR_PCLK2_OFFSET 4
  35. #define CCM_PCDR_PCLK2_MASK (0xF << 4)
  36. #define CCM_PCDR_PCLK1_OFFSET 0
  37. #define CCM_PCDR_PCLK1_MASK 0xF
  38. /* SCM register addresses */
  39. #define SCM_SIDR (SCM_BASE + 0x0)
  40. #define SCM_FMCR (SCM_BASE + 0x4)
  41. #define SCM_GPCR (SCM_BASE + 0x8)
  42. #define SCM_GCCR (SCM_BASE + 0xC)
  43. #define SCM_GCCR_DMA_CLK_EN_OFFSET 3
  44. #define SCM_GCCR_CSI_CLK_EN_OFFSET 2
  45. #define SCM_GCCR_MMA_CLK_EN_OFFSET 1
  46. #define SCM_GCCR_USBD_CLK_EN_OFFSET 0
  47. #endif /* __ARCH_ARM_MACH_MX2_CRM_REGS_H__ */