analysisDataOperation.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * OMAP2420 clock data
  3. *
  4. * Copyright (C) 2005-2012 Texas Instruments, Inc.
  5. * Copyright (C) 2004-2011 Nokia Corporation
  6. *
  7. * Contacts:
  8. * Richard Woodruff <r-woodruff2@ti.com>
  9. * Paul Walmsley
  10. * Updated to COMMON clk format by Rajendra Nayak <rnayak@ti.com>
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License version 2 as
  14. * published by the Free Software Foundation.
  15. */
  16. #include <linux/kernel.h>
  17. #include <linux/io.h>
  18. #include <linux/clk.h>
  19. #include <linux/clk-private.h>
  20. #include <linux/list.h>
  21. #include "soc.h"
  22. #include "iomap.h"
  23. #include "clock.h"
  24. #include "clock2xxx.h"
  25. #include "opp2xxx.h"
  26. #include "cm2xxx.h"
  27. #include "prm2xxx.h"
  28. #include "prm-regbits-24xx.h"
  29. #include "cm-regbits-24xx.h"
  30. #include "sdrc.h"
  31. #include "control.h"
  32. #define OMAP_CM_REGADDR OMAP2420_CM_REGADDR
  33. /*
  34. * 2420 clock tree.
  35. *
  36. * NOTE:In many cases here we are assigning a 'default' parent. In
  37. * many cases the parent is selectable. The set parent calls will
  38. * also switch sources.
  39. *
  40. * Several sources are given initial rates which may be wrong, this will
  41. * be fixed up in the init func.
  42. *
  43. * Things are broadly separated below by clock domains. It is
  44. * noteworthy that most peripherals have dependencies on multiple clock
  45. * domains. Many get their interface clocks from the L4 domain, but get
  46. * functional clocks from fixed sources or other core domain derived
  47. * clocks.
  48. */
  49. DEFINE_CLK_FIXED_RATE(alt_ck, CLK_IS_ROOT, 54000000, 0x0);
  50. DEFINE_CLK_FIXED_RATE(func_32k_ck, CLK_IS_ROOT, 32768, 0x0);
  51. DEFINE_CLK_FIXED_RATE(mcbsp_clks, CLK_IS_ROOT, 0x0, 0x0);
  52. static struct clk osc_ck;
  53. static const struct clk_ops osc_ck_ops = {
  54. .recalc_rate = &omap2_osc_clk_recalc,
  55. };
  56. static struct clk_hw_omap osc_ck_hw = {
  57. .hw = {
  58. .clk = &osc_ck,
  59. },
  60. };
  61. static struct clk osc_ck = {
  62. .name = "osc_ck",
  63. .ops = &osc_ck_ops,
  64. .hw = &osc_ck_hw.hw,
  65. .flags = CLK_IS_ROOT,
  66. };
  67. DEFINE_CLK_FIXED_RATE(secure_32k_ck, CLK_IS_ROOT, 32768, 0x0);
  68. static struct clk sys_ck;
  69. static const char *sys_ck_parent_names[] = {
  70. "osc_ck",
  71. };
  72. static const struct clk_ops sys_ck_ops = {
  73. .init = &omap2_init_clk_clkdm,
  74. .recalc_rate = &omap2xxx_sys_clk_recalc,
  75. };
  76. DEFINE_STRUCT_CLK_HW_OMAP(sys_ck, "wkup_clkdm");
  77. DEFINE_STRUCT_CLK(sys_ck, sys_ck_parent_names, sys_ck_ops);
  78. static struct dpll_data dpll_dd = {
  79. .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
  80. .mult_mask = OMAP24XX_DPLL_MULT_MASK,
  81. .div1_mask = OMAP24XX_DPLL_DIV_MASK,
  82. .clk_bypass = &sys_ck,
  83. .clk_ref = &sys_ck,