mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] net: fec_imx: Fix resource rollback with regulator errors
@ 2019-10-08  8:56 Stefan Riedmueller
  2019-10-08  8:56 ` [PATCH 2/2] ARM: dts: imx6qdl: pfla02: Remove fec phy-supply Stefan Riedmueller
  2019-10-14 10:25 ` [PATCH 1/2] net: fec_imx: Fix resource rollback with regulator errors Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Riedmueller @ 2019-10-08  8:56 UTC (permalink / raw)
  To: barebox

When the driver is not able to get or control the phy regulator memory
resources are already acquired and need to be released during rollback.

Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
---
 drivers/net/fec_imx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
index 31c91021893a..5ef1d4359e91 100644
--- a/drivers/net/fec_imx.c
+++ b/drivers/net/fec_imx.c
@@ -781,7 +781,8 @@ static int fec_probe(struct device_d *dev)
 	if (IS_ERR(fec->reg_phy)) {
 		if (PTR_ERR(fec->reg_phy) == -EPROBE_DEFER) {
 			ret = -EPROBE_DEFER;
-			goto disable_clk;
+			fec->reg_phy = NULL;
+			goto release_res;
 		}
 		fec->reg_phy = NULL;
 	}
@@ -789,7 +790,7 @@ static int fec_probe(struct device_d *dev)
 	ret = regulator_enable(fec->reg_phy);
 	if (ret) {
 		dev_err(dev, "Failed to enable phy regulator: %d\n", ret);
-		goto disable_clk;
+		goto release_res;
 	}
 
 	phy_reset = of_get_named_gpio(dev->device_node, "phy-reset-gpios", 0);
-- 
2.7.4


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

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

* [PATCH 2/2] ARM: dts: imx6qdl: pfla02: Remove fec phy-supply
  2019-10-08  8:56 [PATCH 1/2] net: fec_imx: Fix resource rollback with regulator errors Stefan Riedmueller
@ 2019-10-08  8:56 ` Stefan Riedmueller
  2019-10-14 10:25 ` [PATCH 1/2] net: fec_imx: Fix resource rollback with regulator errors Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Riedmueller @ 2019-10-08  8:56 UTC (permalink / raw)
  To: barebox

There is no driver for the phyFLEX-i.MX 6 phy-supply regulator in
the barebox. Use a dummy regulator instead by simply deleting the
phy-supply property.

Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
---
 arch/arm/dts/imx6qdl-phytec-pfla02.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
index f0bba2e09881..846ebbe6b18b 100644
--- a/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
+++ b/arch/arm/dts/imx6qdl-phytec-pfla02.dtsi
@@ -86,6 +86,10 @@
 	};
 };
 
+&fec {
+	/delete-property/ phy-supply;
+};
+
 &gpmi {
 	partitions {
 		compatible = "fixed-partitions";
-- 
2.7.4


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

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

* Re: [PATCH 1/2] net: fec_imx: Fix resource rollback with regulator errors
  2019-10-08  8:56 [PATCH 1/2] net: fec_imx: Fix resource rollback with regulator errors Stefan Riedmueller
  2019-10-08  8:56 ` [PATCH 2/2] ARM: dts: imx6qdl: pfla02: Remove fec phy-supply Stefan Riedmueller
@ 2019-10-14 10:25 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2019-10-14 10:25 UTC (permalink / raw)
  To: Stefan Riedmueller; +Cc: barebox

On Tue, Oct 08, 2019 at 10:56:11AM +0200, Stefan Riedmueller wrote:
> When the driver is not able to get or control the phy regulator memory
> resources are already acquired and need to be released during rollback.
> 
> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
> ---
>  drivers/net/fec_imx.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 

Applied, thanks

Sascha

-- 
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] 3+ messages in thread

end of thread, other threads:[~2019-10-14 10:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08  8:56 [PATCH 1/2] net: fec_imx: Fix resource rollback with regulator errors Stefan Riedmueller
2019-10-08  8:56 ` [PATCH 2/2] ARM: dts: imx6qdl: pfla02: Remove fec phy-supply Stefan Riedmueller
2019-10-14 10:25 ` [PATCH 1/2] net: fec_imx: Fix resource rollback with regulator errors Sascha Hauer

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