summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2016-04-28 12:55:30 +0800
committerPeng Fan <peng.fan@nxp.com>2016-04-28 12:55:30 +0800
commit2ad1304aec9fdfc4a4c90862aa581b207e2665cb (patch)
tree3e039527fed6f35e75dfe693f7fff3cb21dd68b1 /arch
parent519bc30d20c53ca3a1b7309299964e4cf3f5b976 (diff)
downloadu-boot-imx-2ad1304aec9fdfc4a4c90862aa581b207e2665cb.zip
u-boot-imx-2ad1304aec9fdfc4a4c90862aa581b207e2665cb.tar.gz
u-boot-imx-2ad1304aec9fdfc4a4c90862aa581b207e2665cb.tar.bz2
MLK-12711 imx: correct speed grading info for i.MX6UL
Correct speed grading info for i.MX6UL Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/mx6/soc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index ee832a3..086904e 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -112,6 +112,12 @@ u32 get_cpu_rev(void)
#define OCOTP_CFG3_SPEED_1GHZ 2
#define OCOTP_CFG3_SPEED_1P2GHZ 3
+/*
+ * For i.MX6UL
+ */
+#define OCOTP_CFG3_SPEED_528MHZ 1
+#define OCOTP_CFG3_SPEED_696MHZ 2
+
u32 get_cpu_speed_grade_hz(void)
{
struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
@@ -124,6 +130,15 @@ u32 get_cpu_speed_grade_hz(void)
val >>= OCOTP_CFG3_SPEED_SHIFT;
val &= 0x3;
+ if (is_cpu_type(MXC_CPU_MX6UL)) {
+ if (val == OCOTP_CFG3_SPEED_528MHZ)
+ return 528000000;
+ else if (val == OCOTP_CFG3_SPEED_696MHZ)
+ return 69600000;
+ else
+ return 0;
+ }
+
switch (val) {
/* Valid for IMX6DQ */
case OCOTP_CFG3_SPEED_1P2GHZ: