regs-clock.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* linux/arch/arm/mach-s3c24a0/include/mach/regs-clock.h
  2. *
  3. * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk>
  4. * http://armlinux.simtec.co.uk/
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * S3C24A0 clock register definitions
  11. */
  12. #ifndef __ASM_ARCH_24A0_REGS_CLOCK_H
  13. #define __ASM_ARCH_24A0_REGS_CLOCK_H __FILE__
  14. #define S3C24A0_MPLLCON S3C2410_CLKREG(0x10)
  15. #define S3C24A0_UPLLCON S3C2410_CLKREG(0x14)
  16. #define S3C24A0_CLKCON S3C2410_CLKREG(0x20)
  17. #define S3C24A0_CLKSRC S3C2410_CLKREG(0x24)
  18. #define S3C24A0_CLKDIVN S3C2410_CLKREG(0x28)
  19. /* CLKCON register bits */
  20. #define S3C24A0_CLKCON_VLX (1<<29)
  21. #define S3C24A0_CLKCON_VPOST (1<<28)
  22. #define S3C24A0_CLKCON_WDT (1<<27) /* reserved */
  23. #define S3C24A0_CLKCON_MPEGDCTQ (1<<26)
  24. #define S3C24A0_CLKCON_VPOSTIF (1<<25)
  25. #define S3C24A0_CLKCON_MPEG4IF (1<<24)
  26. #define S3C24A0_CLKCON_CAM_UPLL (1<<23)
  27. #define S3C24A0_CLKCON_LCDC (1<<22)
  28. #define S3C24A0_CLKCON_CAM_HCLK (1<<21)
  29. #define S3C24A0_CLKCON_MPEG4 (1<<20)
  30. #define S3C24A0_CLKCON_KEYPAD (1<<19)
  31. #define S3C24A0_CLKCON_ADC (1<<18)
  32. #define S3C24A0_CLKCON_SDI (1<<17)
  33. #define S3C24A0_CLKCON_MS (1<<16) /* memory stick */
  34. #define S3C24A0_CLKCON_USBD (1<<15)
  35. #define S3C24A0_CLKCON_GPIO (1<<14)
  36. #define S3C24A0_CLKCON_IIS (1<<13)
  37. #define S3C24A0_CLKCON_IIC (1<<12)
  38. #define S3C24A0_CLKCON_SPI (1<<11)
  39. #define S3C24A0_CLKCON_UART1 (1<<10)
  40. #define S3C24A0_CLKCON_UART0 (1<<9)
  41. #define S3C24A0_CLKCON_PWMT (1<<8)
  42. #define S3C24A0_CLKCON_USBH (1<<7)
  43. #define S3C24A0_CLKCON_AC97 (1<<6)
  44. #define S3C24A0_CLKCON_IrDA (1<<4)
  45. #define S3C24A0_CLKCON_IDLE (1<<2)
  46. #define S3C24A0_CLKCON_MON (1<<1)
  47. #define S3C24A0_CLKCON_STOP (1<<0)
  48. /* CLKSRC register bits */
  49. #define S3C24A0_CLKSRC_OSC (1<<8) /* CLKSRC */
  50. #define S3C24A0_CLKSRC_UPLL (1<<7)
  51. #define S3C24A0_CLKSRC_MPLL (1<<5)
  52. #define S3C24A0_CLKSRC_EXT (1<<4)
  53. /* Use a single interface with the common code, for s3c24xx */
  54. #define S3C2410_MPLLCON S3C24A0_MPLLCON
  55. #define S3C2410_UPLLCON S3C24A0_UPLLCON
  56. #define S3C2410_CLKCON S3C24A0_CLKCON
  57. #define S3C2410_CLKSLOW S3C24A0_CLKSRC
  58. #define S3C2410_CLKDIVN S3C24A0_CLKDIVN
  59. #define S3C2410_CLKCON_IDLE S3C24A0_CLKCON_IDLE
  60. #define S3C2410_CLKCON_POWER S3C24A0_CLKCON_STOP
  61. #define S3C2410_CLKCON_LCDC S3C24A0_CLKCON_LCDC
  62. #define S3C2410_CLKCON_USBH S3C24A0_CLKCON_USBH
  63. #define S3C2410_CLKCON_USBD S3C24A0_CLKCON_USBD
  64. #define S3C2410_CLKCON_PWMT S3C24A0_CLKCON_PWMT
  65. #define S3C2410_CLKCON_SDI S3C24A0_CLKCON_SDI
  66. #define S3C2410_CLKCON_UART0 S3C24A0_CLKCON_UART0
  67. #define S3C2410_CLKCON_UART1 S3C24A0_CLKCON_UART1
  68. #define S3C2410_CLKCON_GPIO S3C24A0_CLKCON_GPIO
  69. #define S3C2410_CLKCON_ADC S3C24A0_CLKCON_ADC
  70. #define S3C2410_CLKCON_IIC S3C24A0_CLKCON_IIC
  71. #define S3C2410_CLKCON_IIS S3C24A0_CLKCON_IIS
  72. #define S3C2410_CLKCON_SPI S3C24A0_CLKCON_SPI
  73. #define S3C2410_CLKSLOW_UCLK_OFF S3C24A0_CLKSRC_UPLL
  74. #define S3C2410_CLKSLOW_MPLL_OFF S3C24A0_CLKSRC_MPLL
  75. #define S3C2410_CLKSLOW_SLOW (0xFF)
  76. #define S3C2410_CLKSLOW_GET_SLOWVAL(x) (0x1)
  77. #endif /* __ASM_ARCH_24A0_REGS_CLOCK_H */