The problem is here: https://github.com/ntfreak/openocd/blob/e41c0f4906e46d1076ce62a0da5518aa1ca280b8/src/jtag/drivers/bcm2835gpio.c#L94 and the fix is here https://github.com/AlphamaxMedia/openocd/blob/6b30bbf42968d2403c9b2458d32a997d13b2ad56/src/jtag/drivers/bcm2835gpio.c#L96