diff options
author | Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> | 2023-11-24 11:02:08 +0300 |
---|---|---|
committer | Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> | 2023-11-29 05:54:10 +0300 |
commit | 085d61971f902422d031bf8e3ca550a4d9d01921 (patch) | |
tree | dcabd72969926ccc340ed0429e323d7e4c0b3b10 /meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor | |
parent | 9496d11bfce474026cf1db8c4c5f0e9e030d6c8f (diff) | |
download | openbmc-085d61971f902422d031bf8e3ca550a4d9d01921.tar.xz |
meta-facebook: yosemite4: rescan eeproms after chassis on/off
Add service for rescanning the eeproms after chassis on/off event
detected by gpio-monitor.
Tested: power on/off chassis and check dbus path on FruDevice.
Change-Id: Ie85f1526bf14cd87f92f93e37839bc80cf9044a4
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Diffstat (limited to 'meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor')
3 files changed, 37 insertions, 16 deletions
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/rescan-fru-device b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/rescan-fru-device new file mode 100644 index 0000000000..611d5e94bf --- /dev/null +++ b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/rescan-fru-device @@ -0,0 +1,6 @@ +#!/bin/bash + +bus=$(($1 + 15)) + +# rescan eeprom for fru information +busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q $bus diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/rescan-fru-device@.service b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/rescan-fru-device@.service new file mode 100644 index 0000000000..8b4438e1a6 --- /dev/null +++ b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/rescan-fru-device@.service @@ -0,0 +1,7 @@ +[Unit] +Description=Rescan FruDevice for slot %i + +[Service] +Type=oneshot +ExecStart=/usr/libexec/phosphor-gpio-monitor/rescan-fru-device %i +SyslogIdentifier=rescan-fru-device%i diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/yosemite4-phosphor-multi-gpio-monitor.json b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/yosemite4-phosphor-multi-gpio-monitor.json index 96a06f2ff0..31f9fd4370 100644 --- a/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/yosemite4-phosphor-multi-gpio-monitor.json +++ b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/yosemite4-phosphor-multi-gpio-monitor.json @@ -13,9 +13,10 @@ "Name": "PWROK_STBY_BMC_SLOT1", "ChipId": "0", "GpioNum": 10, - "EventMon": "RISING", + "EventMon": "BOTH", "Targets": { - "RISING": ["probe-slot-device@1.service"] + "RISING": ["probe-slot-device@1.service", "rescan-fru-device@1.service"], + "FALLING": ["rescan-fru-device@1.service"] }, "Continue": true }, @@ -23,9 +24,10 @@ "Name": "PWROK_STBY_BMC_SLOT2", "ChipId": "0", "GpioNum": 11, - "EventMon": "RISING", + "EventMon": "BOTH", "Targets": { - "RISING": ["probe-slot-device@2.service"] + "RISING": ["probe-slot-device@2.service", "rescan-fru-device@2.service"], + "FALLING": ["rescan-fru-device@2.service"] }, "Continue": true }, @@ -33,9 +35,10 @@ "Name": "PWROK_STBY_BMC_SLOT3", "ChipId": "0", "GpioNum": 12, - "EventMon": "RISING", + "EventMon": "BOTH", "Targets": { - "RISING": ["probe-slot-device@3.service"] + "RISING": ["probe-slot-device@3.service", "rescan-fru-device@3.service"], + "FALLING": ["rescan-fru-device@3.service"] }, "Continue": true }, @@ -43,9 +46,10 @@ "Name": "PWROK_STBY_BMC_SLOT4", "ChipId": "0", "GpioNum": 13, - "EventMon": "RISING", + "EventMon": "BOTH", "Targets": { - "RISING": ["probe-slot-device@4.service"] + "RISING": ["probe-slot-device@4.service", "rescan-fru-device@4.service"], + "FALLING": ["rescan-fru-device@4.service"] }, "Continue": true }, @@ -53,9 +57,10 @@ "Name": "PWROK_STBY_BMC_SLOT5", "ChipId": "0", "GpioNum": 190, - "EventMon": "RISING", + "EventMon": "BOTH", "Targets": { - "RISING": ["probe-slot-device@5.service"] + "RISING": ["probe-slot-device@5.service", "rescan-fru-device@5.service"], + "FALLING": ["rescan-fru-device@5.service"] }, "Continue": true }, @@ -63,9 +68,10 @@ "Name": "PWROK_STBY_BMC_SLOT6", "ChipId": "0", "GpioNum": 191, - "EventMon": "RISING", + "EventMon": "BOTH", "Targets": { - "RISING": ["probe-slot-device@6.service"] + "RISING": ["probe-slot-device@6.service", "rescan-fru-device@6.service"], + "FALLING": ["rescan-fru-device@6.service"] }, "Continue": true }, @@ -73,9 +79,10 @@ "Name": "PWROK_STBY_BMC_SLOT7", "ChipId": "0", "GpioNum": 195, - "EventMon": "RISING", + "EventMon": "BOTH", "Targets": { - "RISING": ["probe-slot-device@7.service"] + "RISING": ["probe-slot-device@7.service", "rescan-fru-device@7.service"], + "FALLING": ["rescan-fru-device@7.service"] }, "Continue": true }, @@ -83,9 +90,10 @@ "Name": "PWROK_STBY_BMC_SLOT8", "ChipId": "0", "GpioNum": 202, - "EventMon": "RISING", + "EventMon": "BOTH", "Targets": { - "RISING": ["probe-slot-device@8.service"] + "RISING": ["probe-slot-device@8.service", "rescan-fru-device@8.service"], + "FALLING": ["rescan-fru-device@8.service"] }, "Continue": true } |