mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/6] Switch EEPROM aliases to ZII boards
@ 2018-10-27  1:31 Andrey Smirnov
  2018-10-27  1:31 ` [PATCH 1/6] ARM: rdu2: Add switch EEPROM alias Andrey Smirnov
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-27  1:31 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Everyone:

With Marvell driver patches in 'next' a number of ZII boards now
expose a switch EEPROM device in devfs. By default those NVMEM devices
are given rather unwieldy long names, so this series introduces
appropriate aliases to shorten those to either "switch-eeprom" or
"switchN-eeprom" for cases of just one or multiple EEPROMs
correspondingly.

Feedback is wellcome!

Thanks,
Andrey Smirnov

Andrey Smirnov (6):
  ARM: rdu2: Add switch EEPROM alias
  ARM: rdu1: Add switch EEPROM alias
  ARM: vf610-zii-dev-rev-c: Add switch EEPROM alias
  ARM: vf610-zii-cfu1: Add switch EEPROM alias
  ARM: vf610-zii-ssmb-spu3: Add switch EEPROM alias
  ARM: imx7d-zii-rpu2: Add switch EEPROM alias

 arch/arm/dts/imx51-zii-rdu1.dts      | 13 +++++++++++++
 arch/arm/dts/imx6qdl-zii-rdu2.dtsi   |  6 ++++++
 arch/arm/dts/imx7d-zii-rpu2.dts      |  9 +++++++++
 arch/arm/dts/vf610-zii-cfu1.dts      | 11 +++++++++++
 arch/arm/dts/vf610-zii-dev-rev-c.dts | 12 ++++++++++++
 arch/arm/dts/vf610-zii-ssmb-spu3.dts | 11 +++++++++++
 6 files changed, 62 insertions(+)

-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 1/6] ARM: rdu2: Add switch EEPROM alias
  2018-10-27  1:31 [PATCH 0/6] Switch EEPROM aliases to ZII boards Andrey Smirnov
@ 2018-10-27  1:31 ` Andrey Smirnov
  2018-10-27  1:31 ` [PATCH] miitool: Fix inconsistent spacing Andrey Smirnov
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-27  1:31 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/dts/imx6qdl-zii-rdu2.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/dts/imx6qdl-zii-rdu2.dtsi
index f63b5d2ed..3915c34df 100644
--- a/arch/arm/dts/imx6qdl-zii-rdu2.dtsi
+++ b/arch/arm/dts/imx6qdl-zii-rdu2.dtsi
@@ -52,6 +52,12 @@
 	aliases {
 		ethernet0 = &fec;
 		ethernet1 = &i210;
+		/*
+		 * NVMEM device corresponding to EEPROM attached to
+                 * the switch shared DT node with it, so we use that
+                 * fact to create a desirable naming
+		 */
+		switch-eeprom = &switch;
 	};
 };
 
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH] miitool: Fix inconsistent spacing
  2018-10-27  1:31 [PATCH 0/6] Switch EEPROM aliases to ZII boards Andrey Smirnov
  2018-10-27  1:31 ` [PATCH 1/6] ARM: rdu2: Add switch EEPROM alias Andrey Smirnov
@ 2018-10-27  1:31 ` Andrey Smirnov
  2018-10-27  1:34   ` Andrey Smirnov
  2018-10-27  1:31 ` [PATCH 2/6] ARM: rdu1: Add switch EEPROM alias Andrey Smirnov
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-27  1:31 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Make sure that there's a space between device name and it's status
string regardless if if device is using "id" field or not.

Before:

barebox@ZII RDU2 Board:/ miitool
mdio0-phy00: mdio:no link
mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok
mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok

After:

barebox@ZII RDU2 Board:/ miitool
mdio0-phy00: mdio: no link
mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio3-phy01: eth1: no link

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 commands/miitool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/miitool.c b/commands/miitool.c
index dea4f853c..acf61421b 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
 	for (i = 0; i < 32; i++)
 		mii_val[i] = mii->read(mii, phydev->addr, i);
 
-	printf((mii->parent->id) < 0 ? "%s: %s:" : "%s: %s%d: ",
+	printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ",
 	       phydev->cdev.name, mii->parent->name, mii->parent->id);
 
 
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/6] ARM: rdu1: Add switch EEPROM alias
  2018-10-27  1:31 [PATCH 0/6] Switch EEPROM aliases to ZII boards Andrey Smirnov
  2018-10-27  1:31 ` [PATCH 1/6] ARM: rdu2: Add switch EEPROM alias Andrey Smirnov
  2018-10-27  1:31 ` [PATCH] miitool: Fix inconsistent spacing Andrey Smirnov
@ 2018-10-27  1:31 ` Andrey Smirnov
  2018-10-27  1:31 ` [PATCH 3/6] ARM: vf610-zii-dev-rev-c: " Andrey Smirnov
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-27  1:31 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/dts/imx51-zii-rdu1.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/dts/imx51-zii-rdu1.dts b/arch/arm/dts/imx51-zii-rdu1.dts
index 93bb344f5..c649db45c 100644
--- a/arch/arm/dts/imx51-zii-rdu1.dts
+++ b/arch/arm/dts/imx51-zii-rdu1.dts
@@ -24,6 +24,15 @@
 			device-path = &spinor, "partname:barebox-environment";
 		};
 	};
+
+	aliases {
+		/*
+		 * NVMEM device corresponding to EEPROM attached to
+                 * the switch shared DT node with it, so we use that
+                 * fact to create a desirable naming
+		 */
+		switch-eeprom = &switch;
+	};
 };
 
 &ecspi1 {
@@ -51,6 +60,10 @@
 	};
 };
 
+&mdio_gpio {
+	switch: switch@0 {};
+};
+
 &uart3 {
 	rave-sp {
 		watchdog {
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 3/6] ARM: vf610-zii-dev-rev-c: Add switch EEPROM alias
  2018-10-27  1:31 [PATCH 0/6] Switch EEPROM aliases to ZII boards Andrey Smirnov
                   ` (2 preceding siblings ...)
  2018-10-27  1:31 ` [PATCH 2/6] ARM: rdu1: Add switch EEPROM alias Andrey Smirnov
@ 2018-10-27  1:31 ` Andrey Smirnov
  2018-10-27  1:31 ` [PATCH 4/6] ARM: vf610-zii-cfu1: " Andrey Smirnov
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-27  1:31 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/dts/vf610-zii-dev-rev-c.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/dts/vf610-zii-dev-rev-c.dts b/arch/arm/dts/vf610-zii-dev-rev-c.dts
index 797b31bef..c6341a027 100644
--- a/arch/arm/dts/vf610-zii-dev-rev-c.dts
+++ b/arch/arm/dts/vf610-zii-dev-rev-c.dts
@@ -46,6 +46,18 @@
 
 #include "vf610-zii-dev.dtsi"
 
+/ {
+	aliases {
+		/*
+		 * NVMEM device corresponding to EEPROM attached to
+                 * the switch shared DT node with it, so we use that
+                 * fact to create a desirable naming
+		 */
+		switch0-eeprom = &switch0;
+		switch1-eeprom = &switch1;
+	};
+};
+
 &dspi0 {
 	m25p128@0 {
 		partition@0 {
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 4/6] ARM: vf610-zii-cfu1: Add switch EEPROM alias
  2018-10-27  1:31 [PATCH 0/6] Switch EEPROM aliases to ZII boards Andrey Smirnov
                   ` (3 preceding siblings ...)
  2018-10-27  1:31 ` [PATCH 3/6] ARM: vf610-zii-dev-rev-c: " Andrey Smirnov
@ 2018-10-27  1:31 ` Andrey Smirnov
  2018-10-27  1:31 ` [PATCH 5/6] ARM: vf610-zii-ssmb-spu3: " Andrey Smirnov
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-27  1:31 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/dts/vf610-zii-cfu1.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/dts/vf610-zii-cfu1.dts b/arch/arm/dts/vf610-zii-cfu1.dts
index 80d3f54f7..149333596 100644
--- a/arch/arm/dts/vf610-zii-cfu1.dts
+++ b/arch/arm/dts/vf610-zii-cfu1.dts
@@ -8,3 +8,14 @@
 
 #include "vf610-zii-dev.dtsi"
 
+/ {
+	aliases {
+		/*
+		* NVMEM device corresponding to EEPROM attached to
+		* the switch shared DT node with it, so we use that
+		* fact to create a desirable naming
+		*/
+		switch-eeprom = &switch0;
+	};
+};
+
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 5/6] ARM: vf610-zii-ssmb-spu3: Add switch EEPROM alias
  2018-10-27  1:31 [PATCH 0/6] Switch EEPROM aliases to ZII boards Andrey Smirnov
                   ` (4 preceding siblings ...)
  2018-10-27  1:31 ` [PATCH 4/6] ARM: vf610-zii-cfu1: " Andrey Smirnov
@ 2018-10-27  1:31 ` Andrey Smirnov
  2018-10-27  1:31 ` [PATCH 6/6] ARM: imx7d-zii-rpu2: " Andrey Smirnov
  2018-10-29  7:50 ` [PATCH 0/6] Switch EEPROM aliases to ZII boards Sascha Hauer
  7 siblings, 0 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-27  1:31 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/dts/vf610-zii-ssmb-spu3.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/dts/vf610-zii-ssmb-spu3.dts b/arch/arm/dts/vf610-zii-ssmb-spu3.dts
index e030109ce..5b2460caf 100644
--- a/arch/arm/dts/vf610-zii-ssmb-spu3.dts
+++ b/arch/arm/dts/vf610-zii-ssmb-spu3.dts
@@ -3,3 +3,14 @@
 #include <arm/vf610-zii-ssmb-spu3.dts>
 
 #include "vf610-zii-dev.dtsi"
+
+/ {
+	aliases {
+		/*
+		* NVMEM device corresponding to EEPROM attached to
+		* the switch shared DT node with it, so we use that
+		* fact to create a desirable naming
+		*/
+		switch-eeprom = &switch0;
+	};
+};
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 6/6] ARM: imx7d-zii-rpu2: Add switch EEPROM alias
  2018-10-27  1:31 [PATCH 0/6] Switch EEPROM aliases to ZII boards Andrey Smirnov
                   ` (5 preceding siblings ...)
  2018-10-27  1:31 ` [PATCH 5/6] ARM: vf610-zii-ssmb-spu3: " Andrey Smirnov
@ 2018-10-27  1:31 ` Andrey Smirnov
  2018-10-29  7:50 ` [PATCH 0/6] Switch EEPROM aliases to ZII boards Sascha Hauer
  7 siblings, 0 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-27  1:31 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/dts/imx7d-zii-rpu2.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/dts/imx7d-zii-rpu2.dts b/arch/arm/dts/imx7d-zii-rpu2.dts
index 6fba73f43..24a6d40f7 100644
--- a/arch/arm/dts/imx7d-zii-rpu2.dts
+++ b/arch/arm/dts/imx7d-zii-rpu2.dts
@@ -19,6 +19,15 @@
 		stdout-path = &uart2;
 	};
 
+	aliases {
+		/*
+		 * NVMEM device corresponding to EEPROM attached to
+                 * the switch shared DT node with it, so we use that
+                 * fact to create a desirable naming
+		 */
+		switch-eeprom = &switch0;
+	};
+
 	gpio-leds {
 		compatible = "gpio-leds";
 		pinctrl-0 = <&pinctrl_leds_debug>;
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] miitool: Fix inconsistent spacing
  2018-10-27  1:31 ` [PATCH] miitool: Fix inconsistent spacing Andrey Smirnov
@ 2018-10-27  1:34   ` Andrey Smirnov
  0 siblings, 0 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-27  1:34 UTC (permalink / raw)
  To: Barebox List

On Fri, Oct 26, 2018 at 6:31 PM Andrey Smirnov <andrew.smirnov@gmail.com> wrote:
>
> Make sure that there's a space between device name and it's status
> string regardless if if device is using "id" field or not.
>
> Before:
>
> barebox@ZII RDU2 Board:/ miitool
> mdio0-phy00: mdio:no link
> mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
> mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
> mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok
> mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok
>
> After:
>
> barebox@ZII RDU2 Board:/ miitool
> mdio0-phy00: mdio: no link
> mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
> mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
> mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio3-phy01: eth1: no link
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>

Ugh, didn't mean to send this patch out. Sorry for the noise.

Thanks,
Andrey Smirnov


> ---
>  commands/miitool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/commands/miitool.c b/commands/miitool.c
> index dea4f853c..acf61421b 100644
> --- a/commands/miitool.c
> +++ b/commands/miitool.c
> @@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
>         for (i = 0; i < 32; i++)
>                 mii_val[i] = mii->read(mii, phydev->addr, i);
>
> -       printf((mii->parent->id) < 0 ? "%s: %s:" : "%s: %s%d: ",
> +       printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ",
>                phydev->cdev.name, mii->parent->name, mii->parent->id);
>
>
> --
> 2.17.1
>

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 0/6] Switch EEPROM aliases to ZII boards
  2018-10-27  1:31 [PATCH 0/6] Switch EEPROM aliases to ZII boards Andrey Smirnov
                   ` (6 preceding siblings ...)
  2018-10-27  1:31 ` [PATCH 6/6] ARM: imx7d-zii-rpu2: " Andrey Smirnov
@ 2018-10-29  7:50 ` Sascha Hauer
  7 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2018-10-29  7:50 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: barebox

On Fri, Oct 26, 2018 at 06:31:20PM -0700, Andrey Smirnov wrote:
> Everyone:
> 
> With Marvell driver patches in 'next' a number of ZII boards now
> expose a switch EEPROM device in devfs. By default those NVMEM devices
> are given rather unwieldy long names, so this series introduces
> appropriate aliases to shorten those to either "switch-eeprom" or
> "switchN-eeprom" for cases of just one or multiple EEPROMs
> correspondingly.
> 
> Feedback is wellcome!
> 
> Thanks,
> Andrey Smirnov

Applied, thanks

Sascha

> 
> Andrey Smirnov (6):
>   ARM: rdu2: Add switch EEPROM alias
>   ARM: rdu1: Add switch EEPROM alias
>   ARM: vf610-zii-dev-rev-c: Add switch EEPROM alias
>   ARM: vf610-zii-cfu1: Add switch EEPROM alias
>   ARM: vf610-zii-ssmb-spu3: Add switch EEPROM alias
>   ARM: imx7d-zii-rpu2: Add switch EEPROM alias
> 
>  arch/arm/dts/imx51-zii-rdu1.dts      | 13 +++++++++++++
>  arch/arm/dts/imx6qdl-zii-rdu2.dtsi   |  6 ++++++
>  arch/arm/dts/imx7d-zii-rpu2.dts      |  9 +++++++++
>  arch/arm/dts/vf610-zii-cfu1.dts      | 11 +++++++++++
>  arch/arm/dts/vf610-zii-dev-rev-c.dts | 12 ++++++++++++
>  arch/arm/dts/vf610-zii-ssmb-spu3.dts | 11 +++++++++++
>  6 files changed, 62 insertions(+)
> 
> -- 
> 2.17.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] miitool: Fix inconsistent spacing
  2018-10-16  0:38 [PATCH] miitool: Fix inconsistent spacing Andrey Smirnov
  2018-10-16  6:15 ` Uwe Kleine-König
@ 2018-10-16  7:06 ` Sascha Hauer
  1 sibling, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2018-10-16  7:06 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: barebox

On Mon, Oct 15, 2018 at 05:38:35PM -0700, Andrey Smirnov wrote:
> Make sure that there's a space between device name and it's status
> string regardless if if device is using "id" field or not.
> 
> Before:
> 
> barebox@ZII RDU2 Board:/ miitool
> mdio0-phy00: mdio:no link
> mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
> mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
> mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok
> mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok
> 
> After:
> 
> barebox@ZII RDU2 Board:/ miitool
> mdio0-phy00: mdio: no link
> mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
> mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
> mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio3-phy01: eth1: no link

Looks better. Applied, thanks

Sascha

> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  commands/miitool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/commands/miitool.c b/commands/miitool.c
> index dea4f853c..acf61421b 100644
> --- a/commands/miitool.c
> +++ b/commands/miitool.c
> @@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
>  	for (i = 0; i < 32; i++)
>  		mii_val[i] = mii->read(mii, phydev->addr, i);
>  
> -	printf((mii->parent->id) < 0 ? "%s: %s:" : "%s: %s%d: ",
> +	printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ",
>  	       phydev->cdev.name, mii->parent->name, mii->parent->id);
>  
>  
> -- 
> 2.17.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] miitool: Fix inconsistent spacing
  2018-10-16  0:38 [PATCH] miitool: Fix inconsistent spacing Andrey Smirnov
@ 2018-10-16  6:15 ` Uwe Kleine-König
  2018-10-16  7:06 ` Sascha Hauer
  1 sibling, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2018-10-16  6:15 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: barebox

On Mon, Oct 15, 2018 at 05:38:35PM -0700, Andrey Smirnov wrote:
> Make sure that there's a space between device name and it's status
> string regardless if if device is using "id" field or not.
> 
> Before:
> 
> barebox@ZII RDU2 Board:/ miitool
> mdio0-phy00: mdio:no link
> mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
> mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
> mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok
> mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link
> mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok
> 
> After:
> 
> barebox@ZII RDU2 Board:/ miitool
> mdio0-phy00: mdio: no link
> mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
> mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
> mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link
> mdio3-phy01: eth1: no link

the patch seems to have some impact on the link status of mdio2-phy02
and mdio3-phy01. I wonder where this comes from :-)

Other than that:

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

because it makes the output better readable.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH] miitool: Fix inconsistent spacing
@ 2018-10-16  0:38 Andrey Smirnov
  2018-10-16  6:15 ` Uwe Kleine-König
  2018-10-16  7:06 ` Sascha Hauer
  0 siblings, 2 replies; 13+ messages in thread
From: Andrey Smirnov @ 2018-10-16  0:38 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Make sure that there's a space between device name and it's status
string regardless if if device is using "id" field or not.

Before:

barebox@ZII RDU2 Board:/ miitool
mdio0-phy00: mdio:no link
mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok
mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok

After:

barebox@ZII RDU2 Board:/ miitool
mdio0-phy00: mdio: no link
mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio3-phy01: eth1: no link

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 commands/miitool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/miitool.c b/commands/miitool.c
index dea4f853c..acf61421b 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
 	for (i = 0; i < 32; i++)
 		mii_val[i] = mii->read(mii, phydev->addr, i);
 
-	printf((mii->parent->id) < 0 ? "%s: %s:" : "%s: %s%d: ",
+	printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ",
 	       phydev->cdev.name, mii->parent->name, mii->parent->id);
 
 
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2018-10-29  7:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-27  1:31 [PATCH 0/6] Switch EEPROM aliases to ZII boards Andrey Smirnov
2018-10-27  1:31 ` [PATCH 1/6] ARM: rdu2: Add switch EEPROM alias Andrey Smirnov
2018-10-27  1:31 ` [PATCH] miitool: Fix inconsistent spacing Andrey Smirnov
2018-10-27  1:34   ` Andrey Smirnov
2018-10-27  1:31 ` [PATCH 2/6] ARM: rdu1: Add switch EEPROM alias Andrey Smirnov
2018-10-27  1:31 ` [PATCH 3/6] ARM: vf610-zii-dev-rev-c: " Andrey Smirnov
2018-10-27  1:31 ` [PATCH 4/6] ARM: vf610-zii-cfu1: " Andrey Smirnov
2018-10-27  1:31 ` [PATCH 5/6] ARM: vf610-zii-ssmb-spu3: " Andrey Smirnov
2018-10-27  1:31 ` [PATCH 6/6] ARM: imx7d-zii-rpu2: " Andrey Smirnov
2018-10-29  7:50 ` [PATCH 0/6] Switch EEPROM aliases to ZII boards Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2018-10-16  0:38 [PATCH] miitool: Fix inconsistent spacing Andrey Smirnov
2018-10-16  6:15 ` Uwe Kleine-König
2018-10-16  7:06 ` Sascha Hauer

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