diff mbox

[U-Boot,26/34] imx: ventana: add DT fixup for GW54xx compatibility with older kernels

Message ID 1428522904-8111-27-git-send-email-tharvey@gateworks.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Tim Harvey April 8, 2015, 7:54 p.m. UTC
Certain older kernels in use by some customers erroneously define a uart3
for GW54xx with a pinmux that conflicts with NAND. This will remove
that node to avoid such conflicts.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/gw_ventana/gw_ventana.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Stefano Babic April 16, 2015, 7:46 a.m. UTC | #1
Hi Tim,

I have no problem with the whole series, I will start to apply. Just a
couple of questions:

On 08/04/2015 21:54, Tim Harvey wrote:
> Certain older kernels in use by some customers erroneously define a uart3
> for GW54xx with a pinmux that conflicts with NAND. This will remove
> that node to avoid such conflicts.
> 
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
>  board/gateworks/gw_ventana/gw_ventana.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
> index 068c726..06611b5 100644
> --- a/board/gateworks/gw_ventana/gw_ventana.c
> +++ b/board/gateworks/gw_ventana/gw_ventana.c
> @@ -1599,6 +1599,17 @@ int ft_board_setup(void *blob, bd_t *bd)
>  		    strlen((const char *)info->model) + 1);
>  
>  	/*
> +	 * disable serial2 node for GW54xx for compatibility with older
> +	 * 3.10.x kernel that improperly had this node enabled in the DT
> +	 */

I understand the issue, but I guess you have a dtb file for your
(Freescale) 3.10 kernel and another one for kernel mainline. So why this
issue should be fixed here and not in the related DTS file ?

> +	if (board_type == GW54xx) {
> +		i = fdt_path_offset(blob,
> +				    "/soc/aips-bus@02100000/serial@021ec000");
> +		if (i)
> +			fdt_del_node(blob, i);
> +	}
> +
> +	/*
>  	 * disable wdog1/wdog2 nodes for GW51xx below revC to work around
>  	 * errata causing wdog timer to be unreliable.
>  	 */
> 

Best regards,
Stefano Babic
Tim Harvey April 16, 2015, 1:20 p.m. UTC | #2
On Thu, Apr 16, 2015 at 12:46 AM, Stefano Babic <sbabic@denx.de> wrote:
> Hi Tim,
>
> I have no problem with the whole series, I will start to apply. Just a
> couple of questions:
>
> On 08/04/2015 21:54, Tim Harvey wrote:
>> Certain older kernels in use by some customers erroneously define a uart3
>> for GW54xx with a pinmux that conflicts with NAND. This will remove
>> that node to avoid such conflicts.
>>
>> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
>> ---
>>  board/gateworks/gw_ventana/gw_ventana.c | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
>> index 068c726..06611b5 100644
>> --- a/board/gateworks/gw_ventana/gw_ventana.c
>> +++ b/board/gateworks/gw_ventana/gw_ventana.c
>> @@ -1599,6 +1599,17 @@ int ft_board_setup(void *blob, bd_t *bd)
>>                   strlen((const char *)info->model) + 1);
>>
>>       /*
>> +      * disable serial2 node for GW54xx for compatibility with older
>> +      * 3.10.x kernel that improperly had this node enabled in the DT
>> +      */
>
> I understand the issue, but I guess you have a dtb file for your
> (Freescale) 3.10 kernel and another one for kernel mainline. So why this
> issue should be fixed here and not in the related DTS file ?

Stefano,

I only have a single dtb but in this case a customer has an older
kernel with a bug in the dtb and for various reasons required a
bootloader fix (rest of firmware was locked down). In their opinion a
previous bootloader worked (and I never dug in to find out just why...
likely a bootloader bug at the time) and the new one received on newer
boards did not (with their locked down software). I can work around
this in a bootloader script for them if you want to drop this
particular one.

Tim
Stefano Babic April 22, 2015, 12:29 p.m. UTC | #3
On 16/04/2015 15:20, Tim Harvey wrote:
> On Thu, Apr 16, 2015 at 12:46 AM, Stefano Babic <sbabic@denx.de> wrote:
>> Hi Tim,
>>
>> I have no problem with the whole series, I will start to apply. Just a
>> couple of questions:
>>
>> On 08/04/2015 21:54, Tim Harvey wrote:
>>> Certain older kernels in use by some customers erroneously define a uart3
>>> for GW54xx with a pinmux that conflicts with NAND. This will remove
>>> that node to avoid such conflicts.
>>>
>>> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
>>> ---
>>>  board/gateworks/gw_ventana/gw_ventana.c | 11 +++++++++++
>>>  1 file changed, 11 insertions(+)
>>>
>>> diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
>>> index 068c726..06611b5 100644
>>> --- a/board/gateworks/gw_ventana/gw_ventana.c
>>> +++ b/board/gateworks/gw_ventana/gw_ventana.c
>>> @@ -1599,6 +1599,17 @@ int ft_board_setup(void *blob, bd_t *bd)
>>>                   strlen((const char *)info->model) + 1);
>>>
>>>       /*
>>> +      * disable serial2 node for GW54xx for compatibility with older
>>> +      * 3.10.x kernel that improperly had this node enabled in the DT
>>> +      */
>>
>> I understand the issue, but I guess you have a dtb file for your
>> (Freescale) 3.10 kernel and another one for kernel mainline. So why this
>> issue should be fixed here and not in the related DTS file ?
> 
> Stefano,
> 
> I only have a single dtb but in this case a customer has an older
> kernel with a bug in the dtb and for various reasons required a
> bootloader fix (rest of firmware was locked down).

ok, got it.

> In their opinion a
> previous bootloader worked (and I never dug in to find out just why...
> likely a bootloader bug at the time) and the new one received on newer
> boards did not (with their locked down software). I can work around
> this in a bootloader script for them if you want to drop this
> particular one.

No, it is fine - thanks for clarifications.

Stefano
diff mbox

Patch

diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 068c726..06611b5 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -1599,6 +1599,17 @@  int ft_board_setup(void *blob, bd_t *bd)
 		    strlen((const char *)info->model) + 1);
 
 	/*
+	 * disable serial2 node for GW54xx for compatibility with older
+	 * 3.10.x kernel that improperly had this node enabled in the DT
+	 */
+	if (board_type == GW54xx) {
+		i = fdt_path_offset(blob,
+				    "/soc/aips-bus@02100000/serial@021ec000");
+		if (i)
+			fdt_del_node(blob, i);
+	}
+
+	/*
 	 * disable wdog1/wdog2 nodes for GW51xx below revC to work around
 	 * errata causing wdog timer to be unreliable.
 	 */