Merge branch 'master' of git://git.denx.de/u-boot-spi
[oweals/u-boot.git] / arch / arm / include / asm / arch-davinci / pll_defs.h
index 5d3761637df968926f53f3371318e2b83eb21ee8..1c8d83fb5b5a1d06d91750ed1740429dbf65b699 100644 (file)
@@ -57,11 +57,25 @@ struct dv_pll_regs {
        unsigned int    plldiv9;        /* 0x174 */
 };
 
+#define PLL_MASTER_LOCK        (1 << 4)
+
+#define PLLCTL_CLOCK_MODE_SHIFT        8
 #define PLLCTL_PLLEN   (1 << 0)
 #define PLLCTL_PLLPWRDN        (1 << 1)
 #define PLLCTL_PLLRST  (1 << 3)
+#define PLLCTL_PLLDIS  (1 << 4)
 #define PLLCTL_PLLENSRC        (1 << 5)
 #define PLLCTL_RES_9   (1 << 8)
+#define PLLCTL_EXTCLKSRC       (1 << 9)
+
+#define PLL_DIVEN      (1 << 15)
+#define PLL_POSTDEN    PLL_DIVEN
+
+#define PLL_SCSCFG3_DIV45PENA  (1 << 2)
+#define PLL_SCSCFG3_EMA_CLKSRC (1 << 1)
+
+#define PLL_RSTYPE_POR         (1 << 0)
+#define PLL_RSTYPE_XWRST       (1 << 1)
 
 #define PLLSECCTL_TINITZ       (1 << 16)
 #define PLLSECCTL_TENABLE      (1 << 17)
@@ -69,6 +83,7 @@ struct dv_pll_regs {
 #define PLLSECCTL_STOPMODE     (1 << 22)
 
 #define PLLCMD_GOSET           (1 << 0)
+#define PLLCMD_GOSTAT          (1 << 0)
 
 #define PLL0_LOCK              0x07000000
 #define PLL1_LOCK              0x07000000
@@ -76,4 +91,9 @@ struct dv_pll_regs {
 #define dv_pll0_regs ((struct dv_pll_regs *)DAVINCI_PLL_CNTRL0_BASE)
 #define dv_pll1_regs ((struct dv_pll_regs *)DAVINCI_PLL_CNTRL1_BASE)
 
+#define ARM_PLLDIV     (offsetof(struct dv_pll_regs, plldiv2))
+#define DDR_PLLDIV     (offsetof(struct dv_pll_regs, plldiv7))
+#define SPI_PLLDIV     (offsetof(struct dv_pll_regs, plldiv4))
+
+unsigned int davinci_clk_get(unsigned int div);
 #endif /* _DV_PLL_DEFS_H_ */