From fb214784edbc1da7ba155a1cddf7b3f6d0bbfb66 Mon Sep 17 00:00:00 2001 From: ThuBaNguyen Date: Thu, 8 Jul 2021 14:20:43 +0700 Subject: meta-ampere: power control: restructure source code ampere-hostctrl package includes the generic codes and the platform specific codes. The generic sources are applied for all of the Ampere platforms, they are the service files and the scripts to setting the GPIO pins. The platform specific sources are the GPIO pin config file and the gpio monitor config files. This commit moves the platform specific files to the platform code. Tested: 1. Do the power control actions use ipmitool, BMC web and Redfish. 2. Make sure the server states are changed as expected. Signed-off-by: ThuBaNguyen Change-Id: Ic0e261109f7a5dfaf38c883bff0afedab763a0b6 --- .../gpio/host-gpio-handling/ampere-host-shutdown-ack@.service | 8 ++++++++ .../recipes-phosphor/gpio/host-gpio-handling/obmc/gpio/reboot_ack | 4 ++++ .../gpio/host-gpio-handling/obmc/gpio/shutdown_ack | 4 ++++ 3 files changed, 16 insertions(+) create mode 100644 meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/ampere-host-shutdown-ack@.service create mode 100644 meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/obmc/gpio/reboot_ack create mode 100644 meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/obmc/gpio/shutdown_ack (limited to 'meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling') diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/ampere-host-shutdown-ack@.service b/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/ampere-host-shutdown-ack@.service new file mode 100644 index 000000000..6588191aa --- /dev/null +++ b/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/ampere-host-shutdown-ack@.service @@ -0,0 +1,8 @@ +[Unit] +Description=Ampere Computing LLC host shutdown ACK +Conflicts=obmc-chassis-poweron@0.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/env ampere_power_util.sh mb shutdown_ack +SyslogIdentifier=ampere_host_shutdown_ack diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/obmc/gpio/reboot_ack b/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/obmc/gpio/reboot_ack new file mode 100644 index 000000000..a8ad98ee7 --- /dev/null +++ b/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/obmc/gpio/reboot_ack @@ -0,0 +1,4 @@ +DEVPATH=/dev/input/event0 +KEY=75 +POLARITY=1 +TARGET=obmc-host-force-warm-reboot@0.target diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/obmc/gpio/shutdown_ack b/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/obmc/gpio/shutdown_ack new file mode 100644 index 000000000..18cc87246 --- /dev/null +++ b/meta-ampere/meta-jade/recipes-phosphor/gpio/host-gpio-handling/obmc/gpio/shutdown_ack @@ -0,0 +1,4 @@ +DEVPATH=/dev/input/event0 +KEY=50 +POLARITY=1 +TARGET=ampere-host-shutdown-ack@0.service -- cgit v1.2.3