]> git.sur5r.net Git - openocd/commitdiff
jlink: set the speed at JLINK_MAX_SPEED when an exceeded speed is requested
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Mon, 21 Feb 2011 17:59:49 +0000 (18:59 +0100)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 23 Feb 2011 07:13:59 +0000 (08:13 +0100)
it will allow to be at the highest speed of the jlink without touching the
board or cpu config

tested on sam-ice v5 and at91rm9200-ek

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
src/jtag/drivers/jlink.c

index 4a8896baefd13d5896d6b53eccea300d2cfc2bb6..bc5448d5ee467d7692fa05b4e7bf797c5b0c370c 100644 (file)
@@ -236,9 +236,9 @@ static int jlink_speed(int speed)
 
        if (speed > JLINK_MAX_SPEED)
        {
-               LOG_INFO("Ignoring speed request: %dkHz exceeds %dkHz maximum",
+               LOG_INFO("reduce speed request: %dkHz to %dkHz maximum",
                                speed, JLINK_MAX_SPEED);
-               return ERROR_OK;
+               speed = JLINK_MAX_SPEED;
        }
 
        /* check for RTCK setting */