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
No related branches found
No related tags found
1 merge request!136Use sysfs GPIO API instead of 'brcm_fw_tool'.
...@@ -7,11 +7,15 @@ boot() { ...@@ -7,11 +7,15 @@ boot() {
# set static gpios # set static gpios
# one # one
for gpio in $(db -q get hw.board.gpio_one); do 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 done
# zero # zero
for gpio in $(db -q get hw.board.gpio_zero); do 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 done
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment