Skip to content
Snippets Groups Projects
Commit 11136c62 authored by Markus Gothe's avatar Markus Gothe :ok_hand:
Browse files

Use sysfs GPIO API instead of 'brcm_fw_tool'.

'brcm_fw_tool' cannot be used for controlling GPIOs
in IOP6. In IOP5 we used 'brcm_fw_tool' to setup the
GPIOs for the laser interfaces on the Panther platform.

Because of this the Panther hardware doesn't get a
fiber uplink in IOP6.
parent 21b67fd6
Branches
Tags
1 merge request!136Use sysfs GPIO API instead of 'brcm_fw_tool'.
......@@ -7,11 +7,15 @@ boot() {
# set static gpios
# one
for gpio in $(db -q get hw.board.gpio_one); do
brcm_fw_tool set -x $gpio -p 1 >/dev/null
echo "$gpio" > "/sys/class/gpio/export"
echo out > "/sys/class/gpio/gpio${gpio}/direction"
echo 1 > "/sys/class/gpio/gpio${gpio}/value"
done
# zero
for gpio in $(db -q get hw.board.gpio_zero); do
brcm_fw_tool set -x $gpio -p 0 >/dev/null
echo "$gpio" > "/sys/class/gpio/export"
echo out > "/sys/class/gpio/gpio${gpio}/direction"
echo 0 > "/sys/class/gpio/gpio${gpio}/value"
done
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment