summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-x86
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2017-11-18 13:46:23 -0800
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-12-12 17:46:14 +0000
commitdcdc84c09517dc91ae4de8d03d60213240ce2608 (patch)
treec2f45fedf4dec7717eb1f2a30c45e02c421d16af /meta-openbmc-machines/meta-x86
parent57e510b715d82bdb0c62265885eb01727223b19a (diff)
downloadtalos-openbmc-dcdc84c09517dc91ae4de8d03d60213240ce2608.tar.gz
talos-openbmc-dcdc84c09517dc91ae4de8d03d60213240ce2608.zip
meta-quanta: powerctrl: use dts for gpiochip
The device-tree path should be used to select the gpio chip. Change-Id: I5f5bb6b5ddac1f9102249795130434c4b61201f6 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'meta-openbmc-machines/meta-x86')
-rwxr-xr-xmeta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh2
-rwxr-xr-xmeta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh2
-rwxr-xr-xmeta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh b/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh
index f157112fd..205ecaff0 100755
--- a/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh
+++ b/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/init_once.sh
@@ -12,7 +12,7 @@ function set_gpio_active_low() {
echo $2 > /sys/class/gpio/gpio$1/direction
}
-GPIO_BASE=$(cat /sys/class/gpio/gpiochip*/base)
+GPIO_BASE=$(cat /sys/devices/platform/ahb/ahb:apb/1e780000.gpio/gpio/*/base)
# FM_BMC_READY_N, GPIO Q4, active low
set_gpio_active_low $((${GPIO_BASE} + 128 + 4)) high
diff --git a/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh b/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh
index e429131a7..8e0dae38c 100755
--- a/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh
+++ b/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweroff.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-GPIO_BASE=$(cat /sys/class/gpio/gpiochip*/base)
+GPIO_BASE=$(cat /sys/devices/platform/ahb/ahb:apb/1e780000.gpio/gpio/*/base)
GPIO_NUM=$(($GPIO_BASE + 24 + 3))
echo 1 > /sys/class/gpio/gpio${GPIO_NUM}/value
diff --git a/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh b/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
index a0f032622..f925a33a8 100755
--- a/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
+++ b/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/quanta-powerctrl/files/poweron.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-GPIO_BASE=$(cat /sys/class/gpio/gpiochip*/base)
+GPIO_BASE=$(cat /sys/devices/platform/ahb/ahb:apb/1e780000.gpio/gpio/*/base)
GPIO_NUM=$(($GPIO_BASE + 24 + 3))
echo 1 > /sys/class/gpio/gpio${GPIO_NUM}/value
OpenPOWER on IntegriCloud