clocks.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * (C) Copyright 2006-2008
  3. * Texas Instruments, <www.ti.com>
  4. * Richard Woodruff <r-woodruff2@ti.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  19. * MA 02111-1307 USA
  20. */
  21. #ifndef _CLOCKS_H_
  22. #define _CLOCKS_H_
  23. #define LDELAY 12000000
  24. #define S12M 12000000
  25. #define S13M 13000000
  26. #define S19_2M 19200000
  27. #define S24M 24000000
  28. #define S26M 26000000
  29. #define S38_4M 38400000
  30. #define FCK_IVA2_ON 0x00000001
  31. #define FCK_CORE1_ON 0x03fffe29
  32. #define ICK_CORE1_ON 0x3ffffffb
  33. #define ICK_CORE2_ON 0x0000001f
  34. #define FCK_WKUP_ON 0x000000e9
  35. #define ICK_WKUP_ON 0x0000003f
  36. #define FCK_DSS_ON 0x00000005
  37. #define ICK_DSS_ON 0x00000001
  38. #define FCK_CAM_ON 0x00000001
  39. #define ICK_CAM_ON 0x00000001
  40. #define FCK_PER_ON 0x0003ffff
  41. #define ICK_PER_ON 0x0003ffff
  42. /* Used to index into DPLL parameter tables */
  43. typedef struct {
  44. unsigned int m;
  45. unsigned int n;
  46. unsigned int fsel;
  47. unsigned int m2;
  48. } dpll_param;
  49. struct dpll_per_36x_param {
  50. unsigned int sys_clk;
  51. unsigned int m;
  52. unsigned int n;
  53. unsigned int m2;
  54. unsigned int m3;
  55. unsigned int m4;
  56. unsigned int m5;
  57. unsigned int m6;
  58. unsigned int m2div;
  59. };
  60. /* Following functions are exported from lowlevel_init.S */
  61. extern dpll_param *get_mpu_dpll_param(void);
  62. extern dpll_param *get_iva_dpll_param(void);
  63. extern dpll_param *get_core_dpll_param(void);
  64. extern dpll_param *get_per_dpll_param(void);
  65. extern dpll_param *get_36x_mpu_dpll_param(void);
  66. extern dpll_param *get_36x_iva_dpll_param(void);
  67. extern dpll_param *get_36x_core_dpll_param(void);
  68. extern dpll_param *get_36x_per_dpll_param(void);
  69. extern void *_end_vect, *_start;
  70. #endif