Message ID | 1425154848-15441-1-git-send-email-andrew@lunn.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Andrew, On 28/02/2015 21:20, Andrew Lunn wrote: > Add a DSA section to the DT blob representing the Ethernet switch. > > Signed-off-by: Andrew Lunn <andrew@lunn.ch> > --- > This patch requires at runtime patches in net-next, > 4c732668f98b96a0fa2645ac220fd9bbc17838c4 This dts fragment looks sane. The dependencies is only at runtime so it is less annoying for bissectability. So I tend applying it, however what happens if patch 4c732668f98b96a0fa2645ac220fd9bbc17838c4 is not present. Does the kernel crash? Or does it only make the Ethernet switch not available? Thanks, Gregory > --- > arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 45 +++++++++++++++++++++++++++ > 1 file changed, 45 insertions(+) > > diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts > index 485a6eb86910..a2cf2154dcdb 100644 > --- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts > +++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts > @@ -327,6 +327,51 @@ > gpio-fan,speed-map = <0 0 > 4500 1>; > }; > + > + dsa@0 { > + compatible = "marvell,dsa"; > + #address-cells = <2>; > + #size-cells = <0>; > + > + dsa,ethernet = <ð0>; > + dsa,mii-bus = <&mdio>; > + > + switch@0 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0x0 0>; /* MDIO address 0, switch 0 in tree */ > + > + port@0 { > + reg = <0>; > + label = "lan4"; > + }; > + > + port@1 { > + reg = <1>; > + label = "lan3"; > + }; > + > + port@2 { > + reg = <2>; > + label = "lan2"; > + }; > + > + port@3 { > + reg = <3>; > + label = "lan1"; > + }; > + > + port@4 { > + reg = <4>; > + label = "internet"; > + }; > + > + port@5 { > + reg = <5>; > + label = "cpu"; > + }; > + }; > + }; > }; > > &pinctrl { >
On Tue, Mar 03, 2015 at 10:09:21AM +0100, Gregory CLEMENT wrote: > Hi Andrew, > > On 28/02/2015 21:20, Andrew Lunn wrote: > > Add a DSA section to the DT blob representing the Ethernet switch. > > > > Signed-off-by: Andrew Lunn <andrew@lunn.ch> > > --- > > This patch requires at runtime patches in net-next, > > 4c732668f98b96a0fa2645ac220fd9bbc17838c4 > > This dts fragment looks sane. The dependencies is only at runtime so > it is less annoying for bissectability. So I tend applying it, however > what happens if patch 4c732668f98b96a0fa2645ac220fd9bbc17838c4 is not > present. Does the kernel crash? Or does it only make the Ethernet > switch not available? Hi Gregory It does not crash. During probe of DSA, it fails to find the phy's attached to the switch ports. This causes the probe to fail and the switch drive gets unloaded. Andrew
On 03/03/2015 11:44, Andrew Lunn wrote: > On Tue, Mar 03, 2015 at 10:09:21AM +0100, Gregory CLEMENT wrote: >> Hi Andrew, >> >> On 28/02/2015 21:20, Andrew Lunn wrote: >>> Add a DSA section to the DT blob representing the Ethernet switch. >>> >>> Signed-off-by: Andrew Lunn <andrew@lunn.ch> >>> --- >>> This patch requires at runtime patches in net-next, >>> 4c732668f98b96a0fa2645ac220fd9bbc17838c4 >> >> This dts fragment looks sane. The dependencies is only at runtime so >> it is less annoying for bissectability. So I tend applying it, however >> what happens if patch 4c732668f98b96a0fa2645ac220fd9bbc17838c4 is not >> present. Does the kernel crash? Or does it only make the Ethernet >> switch not available? > > Hi Gregory > > It does not crash. During probe of DSA, it fails to find the phy's > attached to the switch ports. This causes the probe to fail and the > switch drive gets unloaded. Good. So it is safe to apply this patch to mvebu/dt now. Thanks, Gregory > > Andrew >
On 03/03/2015 13:52, Gregory CLEMENT wrote: > On 03/03/2015 11:44, Andrew Lunn wrote: >> On Tue, Mar 03, 2015 at 10:09:21AM +0100, Gregory CLEMENT wrote: >>> Hi Andrew, >>> >>> On 28/02/2015 21:20, Andrew Lunn wrote: >>>> Add a DSA section to the DT blob representing the Ethernet switch. >>>> >>>> Signed-off-by: Andrew Lunn <andrew@lunn.ch> >>>> --- >>>> This patch requires at runtime patches in net-next, >>>> 4c732668f98b96a0fa2645ac220fd9bbc17838c4 >>> >>> This dts fragment looks sane. The dependencies is only at runtime so >>> it is less annoying for bissectability. So I tend applying it, however >>> what happens if patch 4c732668f98b96a0fa2645ac220fd9bbc17838c4 is not >>> present. Does the kernel crash? Or does it only make the Ethernet >>> switch not available? >> >> Hi Gregory >> >> It does not crash. During probe of DSA, it fails to find the phy's >> attached to the switch ports. This causes the probe to fail and the >> switch drive gets unloaded. > > Good. So it is safe to apply this patch to mvebu/dt now. > Now applied on mvebu/dt Thanks, Gregory > > >> >> Andrew >> > >
diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts index 485a6eb86910..a2cf2154dcdb 100644 --- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts @@ -327,6 +327,51 @@ gpio-fan,speed-map = <0 0 4500 1>; }; + + dsa@0 { + compatible = "marvell,dsa"; + #address-cells = <2>; + #size-cells = <0>; + + dsa,ethernet = <ð0>; + dsa,mii-bus = <&mdio>; + + switch@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x0 0>; /* MDIO address 0, switch 0 in tree */ + + port@0 { + reg = <0>; + label = "lan4"; + }; + + port@1 { + reg = <1>; + label = "lan3"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan1"; + }; + + port@4 { + reg = <4>; + label = "internet"; + }; + + port@5 { + reg = <5>; + label = "cpu"; + }; + }; + }; }; &pinctrl {
Add a DSA section to the DT blob representing the Ethernet switch. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- This patch requires at runtime patches in net-next, 4c732668f98b96a0fa2645ac220fd9bbc17838c4 --- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+)