]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-arm/arch-omap/clock.h
ARM: OMAP: implement CPUfreq frequency table based on PRCM table
[linux-2.6-omap-h63xx.git] / include / asm-arm / arch-omap / clock.h
index 45294a73ad285bdba3230cf4c911d2e8ca7f26f3..971d167b5eba7c4ac6a0750af056a051d4785a4c 100644 (file)
  * published by the Free Software Foundation.
  */
 
+#include <linux/cpufreq.h>
+
 #ifndef __ARCH_ARM_OMAP_CLOCK_H
 #define __ARCH_ARM_OMAP_CLOCK_H
 
 struct module;
 struct clk;
 
-#if defined(CONFIG_ARCH_OMAP2)
+#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
 
 struct clksel_rate {
        u8                      div;
@@ -33,8 +35,15 @@ struct dpll_data {
        void __iomem            *mult_div1_reg;
        u32                     mult_mask;
        u32                     div1_mask;
-       u32                     auto_idle_mask;
-       u8                      auto_idle_val;
+       void __iomem            *div2_reg;
+       u32                     div2_mask;
+#  if defined(CONFIG_ARCH_OMAP3)
+       void __iomem            *control_reg;
+       u32                     enable_mask;
+       u8                      auto_recal_bit;
+       u8                      recal_en_bit;
+       u8                      recal_st_bit;
+#  endif
 };
 
 #endif
@@ -78,6 +87,9 @@ struct clk_functions {
        void            (*clk_allow_idle)(struct clk *clk);
        void            (*clk_deny_idle)(struct clk *clk);
        void            (*clk_disable_unused)(struct clk *clk);
+#ifdef CONFIG_CPU_FREQ
+       void            (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **table);
+#endif
 };
 
 extern unsigned int mpurate;
@@ -92,6 +104,9 @@ extern void clk_allow_idle(struct clk *clk);
 extern void clk_deny_idle(struct clk *clk);
 extern int clk_get_usecount(struct clk *clk);
 extern void clk_enable_init_clocks(void);
+#ifdef CONFIG_CPU_FREQ
+extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
+#endif
 
 /* Clock flags */
 #define RATE_CKCTL             (1 << 0)        /* Main fixed ratio clocks */
@@ -106,7 +121,8 @@ extern void clk_enable_init_clocks(void);
 #define DELAYED_APP            (1 << 9)        /* Delay application of clock */
 #define CONFIG_PARTICIPANT     (1 << 10)       /* Fundamental clock */
 #define ENABLE_ON_INIT         (1 << 11)       /* Enable upon framework init */
-/* bits 12-20 are currently free */
+#define INVERT_ENABLE           (1 << 12)       /* 0 enables, 1 disables */
+/* bits 13-20 are currently free */
 #define CLOCK_IN_OMAP310       (1 << 21)
 #define CLOCK_IN_OMAP730       (1 << 22)
 #define CLOCK_IN_OMAP1510      (1 << 23)