This is an automated email from Gerrit.

"Steve Marple <stevemar...@googlemail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6938

-- gerrit

commit a585a2995019934db8c57fb2990b087d8b1f78fa
Author: Steve Marple <stevemar...@googlemail.com>
Date:   Tue Apr 19 23:22:31 2022 +0100

    bcm2835gpio: Fix bug swdio_drive GPIO validation
    
    Incorrect validation prevented GPIO0 from controlling the direction of
    the SWDIO buffer.
    
    Change-Id: Ib8fb704ab588a618ac41c111f6168d658891d92c
    Signed-off-by: Steve Marple <stevemar...@googlemail.com>

diff --git a/src/jtag/drivers/bcm2835gpio.c b/src/jtag/drivers/bcm2835gpio.c
index fd6c28b964..3445c91a91 100644
--- a/src/jtag/drivers/bcm2835gpio.c
+++ b/src/jtag/drivers/bcm2835gpio.c
@@ -151,7 +151,7 @@ static int bcm2835gpio_reset(int trst, int srst)
 
 static void bcm2835_swdio_drive(bool is_output)
 {
-       if (swdio_dir_gpio > 0) {
+       if (swdio_dir_gpio != -1) {
                if (is_output) {
                        GPIO_SET = 1 << swdio_dir_gpio;
                        OUT_GPIO(swdio_gpio);

-- 

Reply via email to