diff mbox

[2/3] dtb: change binding name to match with newer firmware DT

Message ID 1425067710-14879-3-git-send-email-isubramanian@apm.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Iyappan Subramanian Feb. 27, 2015, 8:08 p.m. UTC
This patch fixes the backward compatibility of the older driver with the
newer firmware by making the binding unique so that the older driver won't
recognize the non-supported interfaces.

The new bindings are in sync with the newer firmware.

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
Tested-by: Mark Langsdorf <mlangsdo@redhat.com>
---
 arch/arm64/boot/dts/apm/apm-storm.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Arnd Bergmann Feb. 27, 2015, 8:33 p.m. UTC | #1
On Friday 27 February 2015 12:08:29 Iyappan Subramanian wrote:
> diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi
> index f1ad9c2..a857794 100644
> --- a/arch/arm64/boot/dts/apm/apm-storm.dtsi
> +++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi
> @@ -622,7 +622,7 @@
>                 };
>  
>                 sgenet0: ethernet@1f210000 {
> -                       compatible = "apm,xgene-enet";
> +                       compatible = "apm,xgene1-sgenet";
>                         status = "disabled";
>                         reg = <0x0 0x1f210000 0x0 0xd100>,
>                               <0x0 0x1f200000 0x0 0Xc300>,
> 

This will break booting the new dtb on older kernels, right?

You should normally list the most generic model in addition to the
specific one.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Iyappan Subramanian Feb. 27, 2015, 11:52 p.m. UTC | #2
On Fri, Feb 27, 2015 at 12:33 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Friday 27 February 2015 12:08:29 Iyappan Subramanian wrote:
>> diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi
>> index f1ad9c2..a857794 100644
>> --- a/arch/arm64/boot/dts/apm/apm-storm.dtsi
>> +++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi
>> @@ -622,7 +622,7 @@
>>                 };
>>
>>                 sgenet0: ethernet@1f210000 {
>> -                       compatible = "apm,xgene-enet";
>> +                       compatible = "apm,xgene1-sgenet";
>>                         status = "disabled";
>>                         reg = <0x0 0x1f210000 0x0 0xd100>,
>>                               <0x0 0x1f200000 0x0 0Xc300>,
>>
>
> This will break booting the new dtb on older kernels, right?

This will not break booting older kernels.  In fact, this will fix it,
by having the specific binding,
older kernel that does not have support for these interfaces, will not
call probe.

For example, 3.17 kernel that does not have support for SGMII based 1G
and XFI 10G interfaces
will not probe these interfaces when booted with newer dtb.

>
> You should normally list the most generic model in addition to the
> specific one.

If we list generic model ("xgene-enet") as well, probe will be called
for the interfaces that the kernel does not have support for,
which is what we are trying to fix.

>
>         Arnd
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Rutland March 2, 2015, 2:48 p.m. UTC | #3
On Fri, Feb 27, 2015 at 11:52:54PM +0000, Iyappan Subramanian wrote:
> On Fri, Feb 27, 2015 at 12:33 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Friday 27 February 2015 12:08:29 Iyappan Subramanian wrote:
> >> diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi
> >> index f1ad9c2..a857794 100644
> >> --- a/arch/arm64/boot/dts/apm/apm-storm.dtsi
> >> +++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi
> >> @@ -622,7 +622,7 @@
> >>                 };
> >>
> >>                 sgenet0: ethernet@1f210000 {
> >> -                       compatible = "apm,xgene-enet";
> >> +                       compatible = "apm,xgene1-sgenet";
> >>                         status = "disabled";
> >>                         reg = <0x0 0x1f210000 0x0 0xd100>,
> >>                               <0x0 0x1f200000 0x0 0Xc300>,
> >>
> >
> > This will break booting the new dtb on older kernels, right?
> 
> This will not break booting older kernels.  In fact, this will fix it,
> by having the specific binding,
> older kernel that does not have support for these interfaces, will not
> call probe.
> 
> For example, 3.17 kernel that does not have support for SGMII based 1G
> and XFI 10G interfaces
> will not probe these interfaces when booted with newer dtb.

I'm guessing that in the existing DTBs, these nodes are always disabled?

If that's the case then we don't have a problem; we'll never probe these
nodes for an existing DTB.

Mark.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Iyappan Subramanian March 3, 2015, 12:59 a.m. UTC | #4
On Mon, Mar 2, 2015 at 6:48 AM, Mark Rutland <mark.rutland@arm.com> wrote:
> On Fri, Feb 27, 2015 at 11:52:54PM +0000, Iyappan Subramanian wrote:
>> On Fri, Feb 27, 2015 at 12:33 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> > On Friday 27 February 2015 12:08:29 Iyappan Subramanian wrote:
>> >> diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi
>> >> index f1ad9c2..a857794 100644
>> >> --- a/arch/arm64/boot/dts/apm/apm-storm.dtsi
>> >> +++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi
>> >> @@ -622,7 +622,7 @@
>> >>                 };
>> >>
>> >>                 sgenet0: ethernet@1f210000 {
>> >> -                       compatible = "apm,xgene-enet";
>> >> +                       compatible = "apm,xgene1-sgenet";
>> >>                         status = "disabled";
>> >>                         reg = <0x0 0x1f210000 0x0 0xd100>,
>> >>                               <0x0 0x1f200000 0x0 0Xc300>,
>> >>
>> >
>> > This will break booting the new dtb on older kernels, right?
>>
>> This will not break booting older kernels.  In fact, this will fix it,
>> by having the specific binding,
>> older kernel that does not have support for these interfaces, will not
>> call probe.
>>
>> For example, 3.17 kernel that does not have support for SGMII based 1G
>> and XFI 10G interfaces
>> will not probe these interfaces when booted with newer dtb.
>
> I'm guessing that in the existing DTBs, these nodes are always disabled?

These nodes does not exist on 3.17 kernel dtb.
The problem was reported when booted using Tianocore with Device tree,
which has these nodes, but the 3.17 kernel does not have support for
these nodes.

>
> If that's the case then we don't have a problem; we'll never probe these
> nodes for an existing DTB.

With this patch, the following combinations were tested,
u-boot + 3.17 kernel + 3.17 dtb -> this patch will no effect on this
combination, only RGMII based 1G will be probed
u-boot + 3.19 kernel + 3.19 dtb + this patch -> all the 3 ethernet
interfaces was probed
Tianocore (w/ Device Tree) + 3.19 kernel + this patch -> all the 3
ethernet interfaces were probed
Tianocore (w/ ACPI) + 3.19 kernel + this patch -> all the 3 ethernet
interfaces were probed


>
> Mark.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi
index f1ad9c2..a857794 100644
--- a/arch/arm64/boot/dts/apm/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi
@@ -622,7 +622,7 @@ 
 		};
 
 		sgenet0: ethernet@1f210000 {
-			compatible = "apm,xgene-enet";
+			compatible = "apm,xgene1-sgenet";
 			status = "disabled";
 			reg = <0x0 0x1f210000 0x0 0xd100>,
 			      <0x0 0x1f200000 0x0 0Xc300>,
@@ -636,7 +636,7 @@ 
 		};
 
 		xgenet: ethernet@1f610000 {
-			compatible = "apm,xgene-enet";
+			compatible = "apm,xgene1-xgenet";
 			status = "disabled";
 			reg = <0x0 0x1f610000 0x0 0xd100>,
 			      <0x0 0x1f600000 0x0 0Xc300>,