Skip to contentSkip to conversation

imx: correct speed grading info for i.MX6UL

PATCH New Peng Fan 2 participants 4 messages May 3, 2016 – May 18, 2016 Arm (32-bit)

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/1 imx: correct speed grading info for i.MX6UL

Correct speed grading info for i.MX6UL

Cc Stefano Babic <[email protected]>
---
 arch/arm/cpu/armv7/mx6/soc.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/cpu/armv7/mx6/soc.c +15 -0
index d4b22ad..aaa1adb 100644
@@ -108,6 +108,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;
@@ -120,6 +126,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:
Signature · 1 line
2.6.2
#1 lore raw

PATCH 1/1 imx: correct speed grading info for i.MX6UL

Quoted 32 lines · Peng Fan

Correct speed grading info for i.MX6UL

Cc Stefano Babic <[email protected]>
---
 arch/arm/cpu/armv7/mx6/soc.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/cpu/armv7/mx6/soc.c +8 -0
index d4b22ad..aaa1adb 100644
@@ -108,6 +108,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;
@@ -120,6 +126,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)

arch/arm/cpu/armv7/mx6/soc.c u32 get_cpu_speed_grade_hz(void) · line 140

Quoted 10 lines
arch/arm/cpu/armv7/mx6/soc.c +7 -0
+			return 528000000;
+		else if (val == OCOTP_CFG3_SPEED_696MHZ)
+			return 69600000;
+		else
+			return 0;
+	}
+
 	switch (val) {
 	/* Valid for IMX6DQ */
 	case OCOTP_CFG3_SPEED_1P2GHZ:

Applied to -next, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
author
#2 lore raw

PATCH 1/1 imx: correct speed grading info for i.MX6UL

Hi Stefano,

Quoted 30 lines · Stefano Babic
Quoted 29 lines · Peng Fan

Correct speed grading info for i.MX6UL

Cc Stefano Babic <[email protected]>
---
 arch/arm/cpu/armv7/mx6/soc.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/cpu/armv7/mx6/soc.c +6 -0
index d4b22ad..aaa1adb 100644
@@ -108,6 +108,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;
@@ -120,6 +126,15 @@ u32 get_cpu_speed_grade_hz(void)
 	val >>= OCOTP_CFG3_SPEED_SHIFT;
 	val &= 0x3;
 
Quoted 15 lines

arch/arm/cpu/armv7/mx6/soc.c u32 get_cpu_speed_grade_hz(void) · line 140

Quoted 13 lines
arch/arm/cpu/armv7/mx6/soc.c +9 -0
+	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:

Applied to -next, thanks !

Is this patch applied? I can not find this patch in next or master tree.

Thanks,
Peng.

Quoted 10 lines

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 1/1 imx: correct speed grading info for i.MX6UL

Quoted 49 lines · Peng Fan

Hi Stefano,

Quoted 30 lines · Stefano Babic
Quoted 29 lines · Peng Fan

Correct speed grading info for i.MX6UL

Cc Stefano Babic <[email protected]>
---
 arch/arm/cpu/armv7/mx6/soc.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/cpu/armv7/mx6/soc.c +6 -0
index d4b22ad..aaa1adb 100644
@@ -108,6 +108,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;
@@ -120,6 +126,15 @@ u32 get_cpu_speed_grade_hz(void)
 	val >>= OCOTP_CFG3_SPEED_SHIFT;
 	val &= 0x3;
 
Quoted 15 lines

arch/arm/cpu/armv7/mx6/soc.c u32 get_cpu_speed_grade_hz(void) · line 140

Quoted 13 lines
arch/arm/cpu/armv7/mx6/soc.c +9 -0
+	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:

Applied to -next, thanks !

Quoted 1 line

Is this patch applied? I can not find this patch in next or master tree.

I have supposed, too. Thanks for reporting this, it is now on master.

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================