clock.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * arch/arm/mach-pnx4008/include/mach/clock.h
  3. *
  4. * Clock control driver for PNX4008 - header file
  5. *
  6. * Authors: Vitaly Wool, Dmitry Chigirev <source@mvista.com>
  7. *
  8. * 2005 (c) MontaVista Software, Inc. This file is licensed under
  9. * the terms of the GNU General Public License version 2. This program
  10. * is licensed "as is" without any warranty of any kind, whether express
  11. * or implied.
  12. */
  13. #ifndef __PNX4008_CLOCK_H__
  14. #define __PNX4008_CLOCK_H__
  15. struct module;
  16. struct clk;
  17. #define PWRMAN_VA_BASE IO_ADDRESS(PNX4008_PWRMAN_BASE)
  18. #define HCLKDIVCTRL_REG (PWRMAN_VA_BASE + 0x40)
  19. #define PWRCTRL_REG (PWRMAN_VA_BASE + 0x44)
  20. #define PLLCTRL_REG (PWRMAN_VA_BASE + 0x48)
  21. #define OSC13CTRL_REG (PWRMAN_VA_BASE + 0x4c)
  22. #define SYSCLKCTRL_REG (PWRMAN_VA_BASE + 0x50)
  23. #define HCLKPLLCTRL_REG (PWRMAN_VA_BASE + 0x58)
  24. #define USBCTRL_REG (PWRMAN_VA_BASE + 0x64)
  25. #define SDRAMCLKCTRL_REG (PWRMAN_VA_BASE + 0x68)
  26. #define MSCTRL_REG (PWRMAN_VA_BASE + 0x80)
  27. #define BTCLKCTRL (PWRMAN_VA_BASE + 0x84)
  28. #define DUMCLKCTRL_REG (PWRMAN_VA_BASE + 0x90)
  29. #define I2CCLKCTRL_REG (PWRMAN_VA_BASE + 0xac)
  30. #define KEYCLKCTRL_REG (PWRMAN_VA_BASE + 0xb0)
  31. #define TSCLKCTRL_REG (PWRMAN_VA_BASE + 0xb4)
  32. #define PWMCLKCTRL_REG (PWRMAN_VA_BASE + 0xb8)
  33. #define TIMCLKCTRL_REG (PWRMAN_VA_BASE + 0xbc)
  34. #define SPICTRL_REG (PWRMAN_VA_BASE + 0xc4)
  35. #define FLASHCLKCTRL_REG (PWRMAN_VA_BASE + 0xc8)
  36. #define UART3CLK_REG (PWRMAN_VA_BASE + 0xd0)
  37. #define UARTCLKCTRL_REG (PWRMAN_VA_BASE + 0xe4)
  38. #define DMACLKCTRL_REG (PWRMAN_VA_BASE + 0xe8)
  39. #define AUTOCLK_CTRL (PWRMAN_VA_BASE + 0xec)
  40. #define JPEGCLKCTRL_REG (PWRMAN_VA_BASE + 0xfc)
  41. #define AUDIOCONFIG_VA_BASE IO_ADDRESS(PNX4008_AUDIOCONFIG_BASE)
  42. #define DSPPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x60)
  43. #define DSPCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x64)
  44. #define AUDIOCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x68)
  45. #define AUDIOPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x6C)
  46. #define USB_OTG_CLKCTRL_REG IO_ADDRESS(PNX4008_USB_CONFIG_BASE + 0xff4)
  47. #define VFP9CLKCTRL_REG IO_ADDRESS(PNX4008_DEBUG_BASE)
  48. #define CLK_RATE_13MHZ 13000
  49. #define CLK_RATE_1MHZ 1000
  50. #define CLK_RATE_208MHZ 208000
  51. #define CLK_RATE_48MHZ 48000
  52. #define CLK_RATE_32KHZ 32
  53. #define PNX4008_UART_CLK CLK_RATE_13MHZ * 1000 /* in MHz */
  54. #endif