diff mbox series

[2/2] ARM: imx: Fix ocotp_compat for 6ull/6ulz

Message ID e142d7f53cdc9a536939aeb9dc4e1d42af67929b.1576014367.git.leonard.crestez@nxp.com (mailing list archive)
State Superseded
Headers show
Series Fix imx6ull/6ulz boot crash | expand

Commit Message

Leonard Crestez Dec. 10, 2019, 9:49 p.m. UTC
The ocotp compatible string on imx6ull and imx6ulz is currently
"fsl,imx6ull-ocotp" but the imx_soc_device_init function attempts to
lookup for "fsl,imx6ul-ocotp" (single L).

Fix the constant and make cat /sys/devices/soc0/serial_number print
useful information instead of all-zeros.

Fixes: 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
---
 arch/arm/mach-imx/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Fabio Estevam Dec. 10, 2019, 9:53 p.m. UTC | #1
On Tue, Dec 10, 2019 at 6:50 PM Leonard Crestez <leonard.crestez@nxp.com> wrote:
>
> The ocotp compatible string on imx6ull and imx6ulz is currently
> "fsl,imx6ull-ocotp" but the imx_soc_device_init function attempts to
> lookup for "fsl,imx6ul-ocotp" (single L).
>
> Fix the constant and make cat /sys/devices/soc0/serial_number print
> useful information instead of all-zeros.
>
> Fixes: 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs")
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>

This fix has already been submitted by Christoph:
http://lists.infradead.org/pipermail/linux-arm-kernel/2019-December/697761.html
Leonard Crestez Dec. 10, 2019, 11 p.m. UTC | #2
On 10.12.2019 23:53, Fabio Estevam wrote:
> On Tue, Dec 10, 2019 at 6:50 PM Leonard Crestez <leonard.crestez@nxp.com> wrote:
>>
>> The ocotp compatible string on imx6ull and imx6ulz is currently
>> "fsl,imx6ull-ocotp" but the imx_soc_device_init function attempts to
>> lookup for "fsl,imx6ul-ocotp" (single L).
>>
>> Fix the constant and make cat /sys/devices/soc0/serial_number print
>> useful information instead of all-zeros.
>>
>> Fixes: 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs")
>> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> 
> This fix has already been submitted by Christoph:

Sorry, didn't notice.

My [PATCH 1/2] is still relevant though: for example the kernel could 
run against a very old DTB or maybe there's some other scenario where 
ocotp regmap lookup could fail.

--
Regards,
Leonard
Christoph Niedermaier Dec. 11, 2019, 10:34 a.m. UTC | #3
From: Leonard Crestez <leonard.crestez@nxp.com>
Sent: Tuesday, December 10, 2019 10:49 PM
> The ocotp compatible string on imx6ull and imx6ulz is currently
> "fsl,imx6ull-ocotp" but the imx_soc_device_init function attempts to
> lookup for "fsl,imx6ul-ocotp" (single L).
>
> Fix the constant and make cat /sys/devices/soc0/serial_number print
> useful information instead of all-zeros.
>
> Fixes: 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs")
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
>  arch/arm/mach-imx/cpu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
> index 484bf6cdb363..06f8d64b65af 100644
> --- a/arch/arm/mach-imx/cpu.c
> +++ b/arch/arm/mach-imx/cpu.c
> @@ -151,15 +151,15 @@ struct device * __init imx_soc_device_init(void)
>  	case MXC_CPU_IMX6UL:
>  		ocotp_compat = "fsl,imx6ul-ocotp";
>  		soc_id = "i.MX6UL";
>  		break;
>  	case MXC_CPU_IMX6ULL:
> -		ocotp_compat = "fsl,imx6ul-ocotp";
> +		ocotp_compat = "fsl,imx6ull-ocotp";
>  		soc_id = "i.MX6ULL";
>  		break;
>  	case MXC_CPU_IMX6ULZ:
> -		ocotp_compat = "fsl,imx6ul-ocotp";
> +		ocotp_compat = "fsl,imx6ull-ocotp";
>  		soc_id = "i.MX6ULZ";
>  		break;
>  	case MXC_CPU_IMX6SLL:
>  		ocotp_compat = "fsl,imx6sll-ocotp";
>  		soc_id = "i.MX6SLL";
>

I also had this problem and therefore already submitted a patch
("ARM: imx: Correct ocotp id for serial number support of i.MX6ULL/ULZ SoCs").
I hope this isn't a problem.

Best regards,
Christoph
Leonard Crestez Dec. 11, 2019, 12:19 p.m. UTC | #4
On 2019-12-11 12:34 PM, Christoph Niedermaier wrote:
> From: Leonard Crestez <leonard.crestez@nxp.com>
> Sent: Tuesday, December 10, 2019 10:49 PM
>> The ocotp compatible string on imx6ull and imx6ulz is currently
>> "fsl,imx6ull-ocotp" but the imx_soc_device_init function attempts to
>> lookup for "fsl,imx6ul-ocotp" (single L).
>>
>> Fix the constant and make cat /sys/devices/soc0/serial_number print
>> useful information instead of all-zeros.
>>
>> Fixes: 8267ff89b713 ("ARM: imx: Add serial number support for i.MX6/7 SoCs")
>> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
>> ---
>>   arch/arm/mach-imx/cpu.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
>> index 484bf6cdb363..06f8d64b65af 100644
>> --- a/arch/arm/mach-imx/cpu.c
>> +++ b/arch/arm/mach-imx/cpu.c
>> @@ -151,15 +151,15 @@ struct device * __init imx_soc_device_init(void)
>>   	case MXC_CPU_IMX6UL:
>>   		ocotp_compat = "fsl,imx6ul-ocotp";
>>   		soc_id = "i.MX6UL";
>>   		break;
>>   	case MXC_CPU_IMX6ULL:
>> -		ocotp_compat = "fsl,imx6ul-ocotp";
>> +		ocotp_compat = "fsl,imx6ull-ocotp";
>>   		soc_id = "i.MX6ULL";
>>   		break;
>>   	case MXC_CPU_IMX6ULZ:
>> -		ocotp_compat = "fsl,imx6ul-ocotp";
>> +		ocotp_compat = "fsl,imx6ull-ocotp";
>>   		soc_id = "i.MX6ULZ";
>>   		break;
>>   	case MXC_CPU_IMX6SLL:
>>   		ocotp_compat = "fsl,imx6sll-ocotp";
>>   		soc_id = "i.MX6SLL";
>>
> 
> I also had this problem and therefore already submitted a patch
> ("ARM: imx: Correct ocotp id for serial number support of i.MX6ULL/ULZ SoCs").
> I hope this isn't a problem.

No problem; I should have noticed your patch.

--
Regards,
Leonard
diff mbox series

Patch

diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index 484bf6cdb363..06f8d64b65af 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -151,15 +151,15 @@  struct device * __init imx_soc_device_init(void)
 	case MXC_CPU_IMX6UL:
 		ocotp_compat = "fsl,imx6ul-ocotp";
 		soc_id = "i.MX6UL";
 		break;
 	case MXC_CPU_IMX6ULL:
-		ocotp_compat = "fsl,imx6ul-ocotp";
+		ocotp_compat = "fsl,imx6ull-ocotp";
 		soc_id = "i.MX6ULL";
 		break;
 	case MXC_CPU_IMX6ULZ:
-		ocotp_compat = "fsl,imx6ul-ocotp";
+		ocotp_compat = "fsl,imx6ull-ocotp";
 		soc_id = "i.MX6ULZ";
 		break;
 	case MXC_CPU_IMX6SLL:
 		ocotp_compat = "fsl,imx6sll-ocotp";
 		soc_id = "i.MX6SLL";