This is an automated email from Gerrit. "Paul Fertser <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6658
-- gerrit commit a1db10432c09f38375fd95880e0e822820b26426 Author: Paul Fertser <[email protected]> Date: Sat Oct 9 23:32:01 2021 +0300 jtag: drivers: bcm2835gpio: don't allow GPIOs > 31 Current code assumes all the GPIO signals are manipulated via a single 32-bit register so using higher GPIOs silently fails. Fix the check instead of trying to handle additional GPIOs (available on Raspberry Pi Compute Modules) as that would slow the driver down. Change-Id: Ib3b5864afb3b972d952f9b74665201cd93924959 Signed-off-by: Paul Fertser <[email protected]> diff --git a/doc/openocd.texi b/doc/openocd.texi index 7bf0fe98b..b10dde42a 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -3214,6 +3214,8 @@ able to coexist nicely with both sysfs bitbanging and various peripherals' kernel drivers. The driver restores the previous configuration on exit. +GPIO numbers >= 32 can't be used for performance reasons. + See @file{interface/raspberrypi-native.cfg} for a sample config and pinout. diff --git a/src/jtag/drivers/bcm2835gpio.c b/src/jtag/drivers/bcm2835gpio.c index 95e077c33..fd6c28b96 100644 --- a/src/jtag/drivers/bcm2835gpio.c +++ b/src/jtag/drivers/bcm2835gpio.c @@ -198,7 +198,7 @@ static int bcm2835gpio_speed(int speed) static int is_gpio_valid(int gpio) { - return gpio >= 0 && gpio <= 53; + return gpio >= 0 && gpio <= 31; } COMMAND_HANDLER(bcm2835gpio_handle_jtag_gpionums) --
