linux_dsm_epyc7002/drivers/power/reset
Linus Walleij f7a388d6cd power: reset: Add a driver for the Gemini poweroff
The Gemini (SL3516) SoC has a special power controller block
that only deal with shutting down the system.

If you do not register a driver and activate the block, the
power button on the systems utilizing this SoC will do an
uncontrolled power cut, which is why it is important to have
a special poweroff driver.

The most basic functionality is to just shut down the system
by writing a special bit in the control register after the
system has reached pm_poweroff.

It also handles the poweroff from a button or other sources:

When the poweroff button is pressed, or a signal is sent to
poweroff from an infrared remote control, or when the RTC
fires a special alarm (!) the system emits an interrupt.
At this point, Linux must acknowledge the interrupt and
proceed to do an orderly shutdown of the system.

After adding this driver, pressing the poweroff button gives
this dmesg:

root@gemini:/
root@gemini:/ gemini-poweroff 4b000000.power-controller:
poweroff button pressed

calling shutdown scripts..
setting /dev/rtc0 from system time
unmounting file systems...
umount: tmpfs busy - remounted read-only
umount: can't unmount /: Invalid argument
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system poweroff
uhci_hcd 0000:00:09.1: HCRESET not completed yet!
uhci_hcd 0000:00:09.0: HCRESET not completed yet!
reboot: Power down
gemini-poweroff 4b000000.power-controller: Gemini power off

Cc: Janos Laube <janos.dev@gmail.com>
Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-pm@vger.kernel.org
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2017-04-14 01:41:33 +02:00
..
arm-versatile-reboot.c power/reset: versatile: support the actual versatile 2016-02-15 05:45:22 +01:00
as3722-poweroff.c power: reset: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
at91-poweroff.c power: reset: at91-poweroff: timely shutdown LPDDR memories 2017-01-16 23:21:33 +01:00
at91-reset.c power: reset: at91-reset: remove leftover platform_device_id 2017-01-18 17:05:46 +01:00
at91-sama5d2_shdwc.c power: reset: at91-poweroff: timely shutdown LPDDR memories 2017-01-16 23:21:33 +01:00
axxia-reset.c power/reset: axxia: Register with kernel restart handler 2014-11-17 03:07:10 +01:00
brcm-kona-reset.c power: Introduce Broadcom kona reset driver 2016-06-06 16:17:33 -07:00
brcmstb-reboot.c power/reset: brcmstb: Add support for old 65nm chips 2015-01-22 02:25:32 +01:00
gemini-poweroff.c power: reset: Add a driver for the Gemini poweroff 2017-04-14 01:41:33 +02:00
gpio-poweroff.c power: reset: gpio-poweroff: let devm_gpiod_get set direction of gpio 2015-05-23 20:03:30 +02:00
gpio-restart.c power: reset: gpio-restart: increase priority slightly 2015-06-02 20:59:03 +02:00
hisi-reboot.c power: reset: hisi-reboot: Unmap region obtained by of_iomap 2016-08-12 22:42:37 +02:00
imx-snvs-poweroff.c power: reset: imx-snvs-poweroff: add power off driver for i.mx6 2014-11-23 14:57:11 +08:00
Kconfig power: reset: Add a driver for the Gemini poweroff 2017-04-14 01:41:33 +02:00
keystone-reset.c power: reset: add in missing white space in error message text 2016-09-19 21:19:46 +02:00
ltc2952-poweroff.c ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
Makefile power: reset: Add a driver for the Gemini poweroff 2017-04-14 01:41:33 +02:00
msm-poweroff.c power: reset: use restart_notifier mechanism for msm-poweroff 2014-09-26 19:54:33 +02:00
piix4-poweroff.c power: reset: Add Intel PIIX4 poweroff driver 2016-10-18 05:13:37 +02:00
qnap-poweroff.c power: reset: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
reboot-mode.c power: reset: reboot-mode: Add managed resource API 2016-08-16 00:29:22 +02:00
reboot-mode.h power: reset: reboot-mode: Add managed resource API 2016-08-16 00:29:22 +02:00
restart-poweroff.c power/reset: restart-poweroff: Remove arm dependencies 2015-01-25 22:13:18 +01:00
rmobile-reset.c power: reset: Add reset driver for R-Mobile platforms 2015-01-21 16:32:05 +01:00
st-poweroff.c power: reset: st-poweroff: Remove obsolete platforms. 2016-09-19 21:32:22 +02:00
syscon-poweroff.c power: reset: syscon-poweroff: add a mask property 2017-04-14 01:41:33 +02:00
syscon-reboot-mode.c power: reset: syscon-reboot-mode: Fix module autoload 2016-10-19 05:16:09 +02:00
syscon-reboot.c drivers/power: Convert non-modular syscon-reboot to use builtin_platform_driver 2015-06-16 14:12:38 -04:00
vexpress-poweroff.c power: vexpress: make dev_attr_active static 2016-06-13 09:55:51 +01:00
xgene-reboot.c power: reset: xgene-reboot: Unmap region obtained by of_iomap 2016-09-19 21:24:06 +02:00
zx-reboot.c power: reset: zx-reboot: Fix module autoload 2016-10-19 05:16:09 +02:00