summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-01-30 11:56:15 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2009-01-30 12:07:23 +0100
commit4aae146beeea02c48e6169080aedaa8c6ce5e6b7 (patch)
treecb2a65cfc54a2e2e963cee71d5478cb14c87d0e3
parentc09d002ecae054fdf667d3a5d16794eeb2346cd2 (diff)
downloadbarebox-4aae146beeea02c48e6169080aedaa8c6ce5e6b7.tar.gz
barebox-4aae146beeea02c48e6169080aedaa8c6ce5e6b7.tar.xz
[i.MX] Add header file for PLL registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--include/asm-arm/arch-imx/imx-pll.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/asm-arm/arch-imx/imx-pll.h b/include/asm-arm/arch-imx/imx-pll.h
new file mode 100644
index 0000000000..df7e73efea
--- /dev/null
+++ b/include/asm-arm/arch-imx/imx-pll.h
@@ -0,0 +1,18 @@
+#ifndef __INCLUDE_ASM_ARCH_IMX_PLL_H
+#define __INCLUDE_ASM_ARCH_IMX_PLL_H
+
+/*
+ * This can be used for various PLLs found on
+ * i.MX SoCs.
+ *
+ * mfi + mfn / (mfd + 1)
+ * fpll = 2 * fref * ---------------------
+ * pd + 1
+ */
+#define IMX_PLL_PD(x) (((x) & 0xf) << 26)
+#define IMX_PLL_MFD(x) (((x) & 0x3ff) << 16)
+#define IMX_PLL_MFI(x) (((x) & 0xf) << 10)
+#define IMX_PLL_MFN(x) (((x) & 0x3ff) << 0)
+#define IMX_PLL_BRMO (1 << 31)
+
+#endif /* __INCLUDE_ASM_ARCH_IMX_PLL_H*/