public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] imx: correct speed grading info for i.MX6UL
@ 2016-05-03  3:13 Peng Fan
  2016-05-09  7:30 ` Stefano Babic
  0 siblings, 1 reply; 4+ messages in thread
From: Peng Fan @ 2016-05-03  3:13 UTC (permalink / raw)
  To: u-boot

Correct speed grading info for i.MX6UL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/cpu/armv7/mx6/soc.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index d4b22ad..aaa1adb 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -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:
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] imx: correct speed grading info for i.MX6UL
  2016-05-03  3:13 [U-Boot] [PATCH] imx: correct speed grading info for i.MX6UL Peng Fan
@ 2016-05-09  7:30 ` Stefano Babic
  2016-05-18  5:45   ` Peng Fan
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2016-05-09  7:30 UTC (permalink / raw)
  To: u-boot

On 03/05/2016 05:13, Peng Fan wrote:
> Correct speed grading info for i.MX6UL
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  arch/arm/cpu/armv7/mx6/soc.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
> index d4b22ad..aaa1adb 100644
> --- a/arch/arm/cpu/armv7/mx6/soc.c
> +++ b/arch/arm/cpu/armv7/mx6/soc.c
> @@ -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:
> 

Applied to -next, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] imx: correct speed grading info for i.MX6UL
  2016-05-09  7:30 ` Stefano Babic
@ 2016-05-18  5:45   ` Peng Fan
  2016-05-18  7:48     ` Stefano Babic
  0 siblings, 1 reply; 4+ messages in thread
From: Peng Fan @ 2016-05-18  5:45 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On Mon, May 09, 2016 at 09:30:28AM +0200, Stefano Babic wrote:
>On 03/05/2016 05:13, Peng Fan wrote:
>> Correct speed grading info for i.MX6UL
>> 
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> ---
>>  arch/arm/cpu/armv7/mx6/soc.c | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>> 
>> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
>> index d4b22ad..aaa1adb 100644
>> --- a/arch/arm/cpu/armv7/mx6/soc.c
>> +++ b/arch/arm/cpu/armv7/mx6/soc.c
>> @@ -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:
>> 
>
>Applied to -next, thanks !

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

Thanks,
Peng.

>
>Best regards,
>Stefano Babic
>
>-- 
>=====================================================================
>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
>=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] imx: correct speed grading info for i.MX6UL
  2016-05-18  5:45   ` Peng Fan
@ 2016-05-18  7:48     ` Stefano Babic
  0 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2016-05-18  7:48 UTC (permalink / raw)
  To: u-boot

On 18/05/2016 07:45, Peng Fan wrote:
> Hi Stefano,
> 
> On Mon, May 09, 2016 at 09:30:28AM +0200, Stefano Babic wrote:
>> On 03/05/2016 05:13, Peng Fan wrote:
>>> Correct speed grading info for i.MX6UL
>>>
>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>>> Cc: Stefano Babic <sbabic@denx.de>
>>> ---
>>>  arch/arm/cpu/armv7/mx6/soc.c | 15 +++++++++++++++
>>>  1 file changed, 15 insertions(+)
>>>
>>> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
>>> index d4b22ad..aaa1adb 100644
>>> --- a/arch/arm/cpu/armv7/mx6/soc.c
>>> +++ b/arch/arm/cpu/armv7/mx6/soc.c
>>> @@ -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:
>>>
>>
>> Applied to -next, thanks !
> 
> 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



-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-18  7:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03  3:13 [U-Boot] [PATCH] imx: correct speed grading info for i.MX6UL Peng Fan
2016-05-09  7:30 ` Stefano Babic
2016-05-18  5:45   ` Peng Fan
2016-05-18  7:48     ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox