|
|
@@ -1,3 +1,33 @@
|
|
|
+From a7f79f99541eff4e6bcae0014eb08d3019337565 Mon Sep 17 00:00:00 2001
|
|
|
+From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= <[email protected]>
|
|
|
+Date: Wed, 15 Jul 2020 15:35:14 +0200
|
|
|
+Subject: [PATCH] power: reset: add driver for LinkStation power off
|
|
|
+MIME-Version: 1.0
|
|
|
+Content-Type: text/plain; charset=UTF-8
|
|
|
+Content-Transfer-Encoding: 8bit
|
|
|
+
|
|
|
+Some Buffalo LinkStations perform the power off operation, at restart
|
|
|
+time, depending on the state of an output pin (LED2/INTn) at the ethernet
|
|
|
+PHY. This pin is also used to wake the machine when a WoL packet is
|
|
|
+received by the PHY.
|
|
|
+
|
|
|
+The driver is required by the Buffalo LinkStation LS421DE (ARM MVEBU),
|
|
|
+and other models. Without it, the board remains forever halted if a
|
|
|
+power off command is executed, unless the PSU is disconnected and
|
|
|
+connected again.
|
|
|
+
|
|
|
+Add the driver to provide the power off function and also make the WoL
|
|
|
+feature to be available.
|
|
|
+
|
|
|
+Signed-off-by: Daniel González Cabanelas <[email protected]>
|
|
|
+Signed-off-by: Sebastian Reichel <[email protected]>
|
|
|
+---
|
|
|
+ drivers/power/reset/Kconfig | 11 ++
|
|
|
+ drivers/power/reset/Makefile | 1 +
|
|
|
+ drivers/power/reset/linkstation-poweroff.c | 136 +++++++++++++++++++++
|
|
|
+ 3 files changed, 148 insertions(+)
|
|
|
+ create mode 100644 drivers/power/reset/linkstation-poweroff.c
|
|
|
+
|
|
|
--- a/drivers/power/reset/Kconfig
|
|
|
+++ b/drivers/power/reset/Kconfig
|
|
|
@@ -99,6 +99,17 @@ config POWER_RESET_HISI
|
|
|
@@ -86,7 +116,7 @@
|
|
|
+ __phy_read(phydev, MII_M1011_IEVENT);
|
|
|
+
|
|
|
+ /* If WOL was enabled and a magic packet was received before powering
|
|
|
-+ * off, we won't be able to wake up by sending another magic packet.
|
|
|
++ * off, we won't be able to wake up by sending another magic packet.
|
|
|
+ * Clear WOL status.
|
|
|
+ */
|
|
|
+ __phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_MARVELL_WOL_PAGE);
|