@@ -2213,7 +2213,9 @@ static int stk600_open(PROGRAMMER *pgm, const char *port) {
22132213 if (stk500v2_drain (pgm , 0 ) < 0 || stk500v2_getsync (pgm ) < 0 || stk500v2_drain (pgm , 0 ) < 0 )
22142214 return -1 ;
22152215
2216- if (pgm -> bitclock != 0.0 ) {
2216+ if (pgm -> bitclock ) {
2217+ if (!(pgm -> extra_features & HAS_BITCLOCK_ADJ ))
2218+ pmsg_warning ("setting bitclock despite missing HAS_BITCLOCK_ADJ setting in extra_features\n" );
22172219 if (pgm -> set_sck_period (pgm , pgm -> bitclock ) != 0 )
22182220 return -1 ;
22192221 }
@@ -3933,7 +3935,9 @@ static int stk500v2_jtagmkII_open(PROGRAMMER *pgm, const char *port) {
39333935
39343936 my .pgmtype = PGMTYPE_JTAGICE_MKII ;
39353937
3936- if (pgm -> bitclock != 0.0 ) {
3938+ if (pgm -> bitclock ) {
3939+ if (!(pgm -> extra_features & HAS_BITCLOCK_ADJ ))
3940+ pmsg_warning ("setting bitclock despite missing HAS_BITCLOCK_ADJ setting in extra_features\n" );
39373941 if (pgm -> set_sck_period (pgm , pgm -> bitclock ) != 0 )
39383942 return -1 ;
39393943 }
@@ -4028,7 +4032,9 @@ static int stk500v2_dragon_isp_open(PROGRAMMER *pgm, const char *port) {
40284032
40294033 my .pgmtype = PGMTYPE_JTAGICE_MKII ;
40304034
4031- if (pgm -> bitclock != 0.0 ) {
4035+ if (pgm -> bitclock ) {
4036+ if (!(pgm -> extra_features & HAS_BITCLOCK_ADJ ))
4037+ pmsg_warning ("setting bitclock despite missing HAS_BITCLOCK_ADJ setting in extra_features\n" );
40324038 if (pgm -> set_sck_period (pgm , pgm -> bitclock ) != 0 )
40334039 return -1 ;
40344040 }
@@ -4099,7 +4105,9 @@ static int stk500v2_dragon_hv_open(PROGRAMMER *pgm, const char *port) {
40994105 pgm_free (pgmcp );
41004106 my .pgmtype = PGMTYPE_JTAGICE_MKII ;
41014107
4102- if (pgm -> bitclock != 0.0 ) {
4108+ if (pgm -> bitclock ) {
4109+ if (!(pgm -> extra_features & HAS_BITCLOCK_ADJ ))
4110+ pmsg_warning ("setting bitclock despite missing HAS_BITCLOCK_ADJ setting in extra_features\n" );
41034111 if (pgm -> set_sck_period (pgm , pgm -> bitclock ) != 0 )
41044112 return -1 ;
41054113 }
@@ -4136,7 +4144,9 @@ static int stk500v2_jtag3_open(PROGRAMMER *pgm, const char *port) {
41364144
41374145 my .pgmtype = PGMTYPE_JTAGICE3 ;
41384146
4139- if (pgm -> bitclock != 0.0 ) {
4147+ if (pgm -> bitclock ) {
4148+ if (!(pgm -> extra_features & HAS_BITCLOCK_ADJ ))
4149+ pmsg_warning ("setting bitclock despite missing HAS_BITCLOCK_ADJ setting in extra_features\n" );
41404150 if (pgm -> set_sck_period (pgm , pgm -> bitclock ) != 0 )
41414151 return -1 ;
41424152 }
0 commit comments